/**
 * Services Triad - Login Page Branding
 * Version: 1.0.0
 */

/* Background */
body.login {
    background-color: #1D5175 !important;
}

/* Main container */
#login {
    padding-top: 5%;
}

/* Logo */
#login h1 a, 
.login h1 a {
    background-image: url('https://www.servicestriad.com/wp-content/uploads/2025/06/freepik_br_f029999d-50a2-495d-b425-c4c79612d01c.png') !important;
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    width: 320px !important;
    height: 120px !important;
    margin-bottom: 25px !important;
    padding: 0 !important;
}

/* Login form boxes */
#loginform,
#lostpasswordform,
#registerform {
    background: #ffffff;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 30px;
}

/* Form labels */
.login label {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

/* Input fields */
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 16px;
    background: #fff;
    line-height: 1.5;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    border-color: #1D5175;
    box-shadow: 0 0 0 1px #1D5175;
    outline: none;
}

/* Submit button */
.login input[type="submit"],
.wp-core-ui .button-primary {
    background: #1D5175 !important;
    border-color: #1D5175 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-radius: 4px;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 600;
    height: auto;
    line-height: 1.5;
    transition: all 0.3s ease;
    cursor: pointer;
}

.login input[type="submit"]:hover,
.login input[type="submit"]:focus,
.login input[type="submit"]:active,
.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus {
    background: #143d56 !important;
    border-color: #143d56 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* Navigation links container */
.login #nav,
.login #backtoblog {
    text-align: center;
    padding: 0;
    margin: 16px 0 0 0;
}

/* Navigation links */
.login #nav a,
.login #backtoblog a {
    color: #ffffff !important;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.login #nav a:hover,
.login #backtoblog a:hover {
    color: #e0e0e0 !important;
    text-decoration: underline;
}

/* Remember me checkbox */
.login .forgetmenot {
    margin-bottom: 16px;
}

.login .forgetmenot label {
    color: #333;
    font-size: 13px;
    font-weight: normal;
}

.login .forgetmenot input[type="checkbox"] {
    margin-right: 8px;
}

.login .forgetmenot input[type="checkbox"]:checked::before {
    color: #1D5175;
}

/* Error messages */
#login_error {
    border-left: 4px solid #dc3232;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 12px;
}

/* Success messages */
.login .message,
.login .success {
    border-left: 4px solid #46b450;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 12px;
}

/* Info messages */
.login .message {
    border-left-color: #1D5175;
}

/* Privacy policy link */
.login .privacy-policy-page-link {
    text-align: center;
    margin-top: 16px;
}

.login .privacy-policy-page-link a {
    color: #ffffff !important;
    font-size: 13px;
}

.login .privacy-policy-page-link a:hover {
    color: #e0e0e0 !important;
}

/* Language switcher (WPML/Polylang) */
.login .language-switcher {
    text-align: center;
    margin-top: 20px;
}

.login .language-switcher a {
    color: #ffffff !important;
    margin: 0 8px;
    font-size: 13px;
    text-decoration: none;
}

.login .language-switcher a:hover {
    color: #e0e0e0 !important;
    text-decoration: underline;
}

/* Interim login styles */
.interim-login #login {
    padding-top: 10%;
}

.interim-login.login h1 a {
    width: 250px !important;
}

/* Lost password form adjustments */
#lostpasswordform p {
    margin-bottom: 16px;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    #login {
        padding-top: 10%;
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    #login h1 a {
        width: 250px !important;
        height: 90px !important;
    }
    
    #loginform,
    #lostpasswordform,
    #registerform {
        padding: 24px 20px;
    }
    
    .login input[type="text"],
    .login input[type="password"],
    .login input[type="email"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media screen and (max-width: 480px) {
    #login h1 a {
        width: 200px !important;
        height: 75px !important;
    }
    
    .login input[type="submit"] {
        width: 100%;
    }
}

/* Fix for Polylang language switcher if present */
.login .lang-item {
    display: inline-block;
    margin: 0 5px;
}

.login .lang-item a {
    color: #ffffff !important;
    padding: 4px 8px;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.login .lang-item a:hover,
.login .lang-item.current a {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* Loading state */
.login .button.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}