/**
 * Custom Login Page Styles
 *
 * @package CloveTheme
 * @since 1.0.0
 */

/* Background */
body.login {
    background: #ffffff; /* White background as per screenshot or very light grey */
    background: radial-gradient(circle at center, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column; /* Stack login card and language switcher vertically */
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--color-text-primary);
}

/* Login Box */
#login {
    padding: 0;
    width: 100%;
    max-width: 420px;
    margin: auto;
}

/* Headings */
.login-heading {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-bold);
    color: var(--color-text-primary);
    text-align: center;
    margin-bottom: var(--space-2);
    line-height: var(--leading-tight);
}

.login-subheading {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    text-align: center;
    margin-bottom: var(--space-8);
}

#loginform,
#registerform,
#lostpasswordform {
    background: #ffffff;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-2xl);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    padding: 40px;
    margin-top: 0;
}

/* Logo - Hide standard logo */
#login h1 {
    display: none;
}

/* Labels */
#loginform label,
#registerform label,
#lostpasswordform label {
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Password Label Row (label + forgot link) */
/* Target specific password label if specific ID available, standard WP uses .user-pass-wrap */
.user-pass-wrap label {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Ensure vertical center alignment */
    width: 100%;
}

.forgot-password-link {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary); /* Muted by default */
    text-decoration: none;
    font-weight: var(--weight-medium);
    /* margin-left auto handles right alignment, strict vertical align via parent flex */
}

.forgot-password-link:hover {
    color: var(--color-brand-primary);
    text-decoration: underline;
}

/* Inputs */
#loginform input[type="text"],
#loginform input[type="password"],
#registerform input[type="text"],
#registerform input[type="email"],
#lostpasswordform input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-size: var(--text-base);
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-lg);
    background: #ffffff;
    transition: all var(--duration-200) var(--ease-out);
    margin-top: 0;
    margin-bottom: var(--space-5); /* Consistent field spacing */
    color: var(--color-text-primary);
    box-shadow: none;
    height: 48px; /* Force consistent height */
}

#loginform input:focus,
#registerform input:focus,
#lostpasswordform input:focus {
    border-color: var(--color-brand-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Submit Button */
/* Alerts & Messages - Premium Minimalist */
.login .message,
.login .success,
.login #login_error,
.login .notice {
    background-color: #F9FAFB; /* Default soft gray */
    border: 1px solid var(--color-border-subtle);
    box-shadow: none; /* Flat/Minimal */
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: var(--space-6);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    text-align: left;
}

.login #login_error {
    background-color: #FEF2F2; /* Soft Red 50 */
    border-color: #FECACA; /* Red 200 */
    color: #991B1B; /* Red 800 */
}

.login .success,
.login .message {
    background-color: #EFF6FF; /* Soft Blue 50 */
    border-color: #BFDBFE; /* Blue 200 */
    color: #1E40AF; /* Blue 800 */
}

/* Eye Icon */
.login .dashicons-visibility,
.login .dashicons-hidden {
    color: var(--color-text-tertiary);
    transition: color var(--duration-200) var(--ease-out);
}

.login .dashicons-visibility:hover,
.login .dashicons-hidden:hover {
    color: var(--color-text-primary); /* Darken on hover, keeps it monochrome/premium */
}

/* Submit Button */
#wp-submit,
#registerform .button-primary,
#lostpasswordform .button-primary {
    width: 100%;
    padding: 0 24px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    background: var(--color-brand-primary);
    border: none;
    border-radius: var(--radius-lg);
    color: #ffffff;
    cursor: pointer;
    transition: all var(--duration-200) var(--ease-out);
    margin-top: var(--space-3);
    text-shadow: none;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

#wp-submit:hover,
#registerform .button-primary:hover,
#lostpasswordform .button-primary:hover {
    background: var(--color-brand-primary-hover);
    transform: translateY(-1px);
}

/* Remember Me */
.forgetmenot {
    margin-top: 0;
    margin-bottom: var(--space-1);
    float: none !important;
    display: flex;
    align-items: center;
    gap: var(--space-2); /* Added gap between checkbox and label */
}

.forgetmenot label {
    font-size: var(--text-sm);
    color: var(--color-text-primary) !important;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    /* gap removed as it only affects label children */
}

.forgetmenot input[type="checkbox"] {
    margin: 0 !important;
    border-radius: 4px;
    border: 1px solid var(--color-border-default);
    width: 16px;
    height: 16px;
    margin-top: 2px !important; /* Optical adjustment for vertical center */
}

/* Bottom "Sign Up" Text */
.sign-up-text {
    text-align: center;
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

.sign-up-text a {
    color: var(--color-text-primary);
    font-weight: var(--weight-semibold);
    text-decoration: none;
}

.sign-up-text a:hover {
    text-decoration: underline;
}

/* Hide Default Nav & Back to Box */
#nav,
#backtoblog {
    display: none;
}

/* Links */
.login .privacy-policy-page-link {
    margin-top: var(--space-4);
    text-align: center;
}

/* Language Switcher */
.language-switcher {
    margin-top: var(--space-6);
    display: flex;
    justify-content: center;
    width: 100%;
    position: relative; /* Override WP default absolute/fixed if any */
    z-index: 10;
    clear: both;
}

.language-switcher label {
    color: var(--color-text-tertiary);
}

.language-switcher select {
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-md);
    padding: 4px 8px;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    background: transparent;
}

/* Responsive */
@media (max-width: 480px) {
    #loginform {
        padding: 30px 24px;
        box-shadow: none;
        border: none;
    }

    #login {
        max-width: 100%;
        padding: 0 16px;
    }
}
