/**
 * Lost Password Page Styling
 * Modern, minimalistic design with green and white theme
 */

/* Override WordPress default login styles */
body.login {
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Main login container */
#login {
    width: 420px !important;
    padding: 5% 0 0;
    margin: auto;
}

/* Logo area */
.login h1 {
    text-align: center;
    margin-bottom: 30px;
}

.login h1 a {
    background-image: url("../images/logo-mit-text.png") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 280px !important;
    height: 70px !important;
    text-indent: -9999px !important;
    display: block;
    margin: 0 auto;
    transition: opacity 0.3s ease;
}

.login h1 a:hover {
    opacity: 0.9;
}

/* Remove the old P logo styles */
.login h1 a:before,
.login h1 a:after {
    display: none;
}

/* Form container */
.login form {
    background: #ffffff;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px 35px;
    margin-top: 0;
}

/* Message box styling */
.login .message,
.login .notice,
.login #login_error {
    border-left: 4px solid #74b72a;
    padding: 16px;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 25px;
    background: #f0f9e8;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(116, 183, 42, 0.1);
    color: #2e5a0e;
    font-size: 14px;
    line-height: 1.5;
}

.login #login_error {
    border-left-color: #dc3232;
    background: #fef2f2;
    color: #991b1b;
}

/* Input fields */
.login label {
    color: #333333;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    margin-top: 4px;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    border-color: #74b72a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(116, 183, 42, 0.1);
}

/* Submit button */
.login .button-primary,
.login .submit input[type="submit"] {
    background: #74b72a !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    padding: 12px 24px !important;
    width: 100% !important;
    height: auto !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    margin-top: 20px;
}

.login .button-primary:hover,
.login .submit input[type="submit"]:hover {
    background: #5a9622 !important;
    box-shadow: 0 4px 12px rgba(116, 183, 42, 0.3) !important;
    transform: translateY(-1px);
}

.login .button-primary:active,
.login .submit input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Links */
.login #nav,
.login #backtoblog {
    text-align: center;
    padding: 0;
    margin: 24px 0 0 0;
}

.login #nav a,
.login #backtoblog a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 8px 12px;
    border-radius: 6px;
}

.login #nav a:hover,
.login #backtoblog a:hover {
    color: #74b72a;
    background: rgba(116, 183, 42, 0.05);
}

/* Separator between links */
.login #nav {
    margin-bottom: 16px;
}

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

.login .privacy-policy-page-link a {
    color: #9ca3af;
    font-size: 13px;
    text-decoration: none;
}

.login .privacy-policy-page-link a:hover {
    color: #74b72a;
    text-decoration: underline;
}

/* Language switcher */
.login .language-switcher {
    margin: 20px auto 0;
    text-align: center;
}

.login .language-switcher select {
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-size: 14px;
    color: #333333;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.3s ease;
}

.login .language-switcher select:hover {
    border-color: #74b72a;
}

.login .language-switcher select:focus {
    outline: none;
    border-color: #74b72a;
    box-shadow: 0 0 0 3px rgba(116, 183, 42, 0.1);
}

.login .language-switcher input[type="submit"] {
    background: #74b72a !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    margin-left: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login .language-switcher input[type="submit"]:hover {
    background: #5a9622 !important;
}

/* Checkbox styling */
.login form .forgetmenot {
    margin-bottom: 16px;
}

.login form .forgetmenot label {
    font-size: 14px;
    font-weight: 400;
    color: #4b5563;
}

.login form .forgetmenot input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive design */
@media screen and (max-width: 480px) {
    #login {
        width: 100% !important;
        padding: 20px !important;
    }
    
    .login form {
        padding: 30px 20px;
        border-radius: 8px;
        margin: 0 10px;
    }
    
    .login h1 a:before {
        width: 72px;
        height: 72px;
    }
    
    .login h1 a:after {
        width: 72px;
        height: 72px;
        font-size: 36px;
    }
}

/* Animation for form appearance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login form {
    animation: fadeInUp 0.5s ease-out;
}

/* Custom scrollbar for select elements */
.login select::-webkit-scrollbar {
    width: 8px;
}

.login select::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.login select::-webkit-scrollbar-thumb {
    background: #74b72a;
    border-radius: 4px;
}

.login select::-webkit-scrollbar-thumb:hover {
    background: #5a9622;
}

/* Focus styles for accessibility */
.login a:focus,
.login input:focus,
.login select:focus,
.login button:focus {
    outline: 2px solid #74b72a;
    outline-offset: 2px;
}

/* Loading state for button */
.login .button-primary.loading {
    position: relative;
    color: transparent !important;
}

.login .button-primary.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}