/* ScholarLink WordPress Login Screen Customization */

/* Remove default WordPress branding and customize background */
body.login {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Login form container styling */
.login #login {
    width: 400px;
    margin: auto;
}

.login #loginform {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    padding: 40px;
    margin-bottom: 30px;
    border: none;
}

/* Logo customization */
.login h1 {
    text-align: center;
    margin-bottom: 30px;
}

.login h1 a {
    display: block;
    width: 280px !important;
    height: 60px !important;
    margin: 0 auto;
    text-indent: -9999px;
    outline: none;
    overflow: hidden;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Input field styling */
.login form .input,
.login form input[type="text"],
.login form input[type="password"],
.login form input[type="email"] {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    color: #495057;
    font-size: 16px;
    height: 50px;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    margin-bottom: 16px;
}

.login form .input:focus,
.login form input[type="text"]:focus,
.login form input[type="password"]:focus,
.login form input[type="email"]:focus {
    background: #fff;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    outline: none;
}

/* Submit button styling */
.login form .submit {
    margin-top: 20px;
    text-align: center;
}

.login form .submit .button-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    height: 50px;
    letter-spacing: 0.5px;
    text-shadow: none;
    text-transform: uppercase;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

.login form .submit .button-primary:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    transform: translateY(-1px);
}

.login form .submit .button-primary:focus {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2), 0 4px 15px rgba(76, 175, 80, 0.4);
    outline: none;
}

.login form .submit .button-primary:active {
    transform: translateY(0);
}

/* Remember me checkbox */
.login form .forgetmenot {
    margin-bottom: 20px;
}

.login form .forgetmenot label {
    color: #6c757d;
    font-size: 14px;
    font-weight: normal;
}

.login form .forgetmenot input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
}

/* Navigation links */
.login #nav,
.login #backtoblog {
    text-align: center;
    margin: 16px 0;
}

.login #backtoblog {
    display: none;
}

.login #nav a,
.login #backtoblog a {
    color: #4CAF50;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.login #nav a:hover,
.login #backtoblog a:hover {
    color: #388e3c;
    text-decoration: underline;
}

/* Messages and notices */
.login .message {
    background: #e8f5e8;
    border: 1px solid #4CAF50;
    border-radius: 6px;
    color: #2e7d32;
    margin: 16px 0 20px;
    padding: 16px;
}

.login .message.error {
    background: #fdeaea;
    border-color: #dc3545;
    color: #721c24;
}

.login #login_error {
    background: #fdeaea;
    border: 1px solid #dc3545;
    border-radius: 6px;
    color: #721c24;
    margin: 16px 0 20px;
    padding: 16px;
}

/* Loading state */
.login form.loading .submit .button-primary {
    opacity: 0.7;
    cursor: not-allowed;
}

.login form.loading .submit .button-primary:after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Privacy notice styling */
.login .privacy-policy-page-link {
    text-align: center;
    margin-top: 20px;
}

.login .privacy-policy-page-link a {
    color: #6c757d;
    font-size: 13px;
    text-decoration: none;
}

.login .privacy-policy-page-link a:hover {
    color: #4CAF50;
    text-decoration: underline;
}

/* Language switcher */
.login .language-switcher {
    text-align: center;
    margin-top: 20px;
}

.login .language-switcher select {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    color: #495057;
    font-size: 13px;
    padding: 6px 10px;
}

/* Responsive design */
@media screen and (max-width: 480px) {
    .login #login {
        width: 90%;
        padding: 4% 0 0;
    }
    
    .login #loginform {
        padding: 20px;
    }
    
    .login h1 a {
        width: 240px !important;
        height: 50px !important;
    }
    
    .login form .input,
    .login form input[type="text"],
    .login form input[type="password"],
    .login form input[type="email"] {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body.login {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .login #loginform {
        background: #2c2c54;
        color: #fff;
    }
    
    .login form .input,
    .login form input[type="text"],
    .login form input[type="password"],
    .login form input[type="email"] {
        background: #40407a;
        border-color: #5a5a8a;
        color: #fff;
    }
    
    .login form .input:focus,
    .login form input[type="text"]:focus,
    .login form input[type="password"]:focus,
    .login form input[type="email"]:focus {
        background: #40407a;
        border-color: #4CAF50;
    }
    
    .login form .forgetmenot label {
        color: #b8b8d4;
    }
    
    .login #nav a,
    .login #backtoblog a {
        color: #81c784;
    }
    
    .login #nav a:hover,
    .login #backtoblog a:hover {
        color: #4CAF50;
    }
}

/* Custom utility classes */
.login .text-center {
    text-align: center;
}

.login .mt-20 {
    margin-top: 20px;
}

.login .mb-20 {
    margin-bottom: 20px;
}

.login .hidden {
    display: none;
}

.login .visible {
    display: block;
} 