/**
 * WP Unified Login - Login Page Styles
 *
 * Base styles for the branded WordPress login page.
 * Settings-driven styles are added inline via class-login-branding.php
 *
 * @package WP_Unified_Login
 * @since 1.0.0
 */

/* ==========================================================================
   Base Login Page Styles
   ========================================================================== */

body.login.wpul-branded {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

/* ==========================================================================
   Login Form Container
   ========================================================================== */

#login {
    padding: 20px 0;
}

.login form {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: none;
    padding: 26px 24px 34px;
    margin-top: 20px;
}

/* ==========================================================================
   Logo Styles
   ========================================================================== */

#login h1 a,
.login h1 a {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    display: block;
    margin: 0 auto 25px;
    padding: 0;
    text-indent: -9999px;
    outline: none;
}

/* ==========================================================================
   Form Elements
   ========================================================================== */

.login label {
    font-size: 14px;
    font-weight: 500;
    color: #1e1e1e;
}

.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    font-size: 16px;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #8c8f94;
    box-shadow: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    outline: none;
}

/* ==========================================================================
   Submit Button
   ========================================================================== */

.wp-core-ui .button-primary {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 18px;
    height: auto;
    border-radius: 4px;
    box-shadow: none;
    text-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.wp-core-ui .button-primary:active {
    transform: translateY(1px);
}

/* ==========================================================================
   Links and Navigation
   ========================================================================== */

#login #nav,
#login #backtoblog {
    text-align: center;
    margin: 16px 0 0;
    padding: 0;
}

#login #nav a,
#login #backtoblog a {
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

#login #nav a:hover,
#login #backtoblog a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Messages and Errors
   ========================================================================== */

.login .message,
.login .success,
.login #login_error {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 12px 16px;
    margin-bottom: 20px;
}

.login .message,
.login .success {
    background: #fff;
    border-left: 4px solid #00a32a;
}

.login #login_error {
    background: #fff;
    border-left: 4px solid #d63638;
}

/* ==========================================================================
   Remember Me Checkbox
   ========================================================================== */

.login .forgetmenot {
    font-size: 13px;
}

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

/* ==========================================================================
   Privacy Policy Link
   ========================================================================== */

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

.login .privacy-policy-page-link a {
    font-size: 12px;
    text-decoration: none;
}

/* ==========================================================================
   Background Image Overlay (when background image is set)
   ========================================================================== */

body.login.wpul-has-bg-image::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
}

body.login.wpul-has-bg-image .login form {
    background: rgba(255, 255, 255, 0.95);
}

body.login.wpul-has-bg-image #login #nav,
body.login.wpul-has-bg-image #login #backtoblog {
    background: rgba(255, 255, 255, 0.9);
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 12px;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media screen and (max-width: 782px) {
    .login form {
        padding: 20px 16px 26px;
    }
    
    #login h1 a,
    .login h1 a {
        max-width: 280px;
    }
}

@media screen and (max-width: 480px) {
    body.login.wpul-branded {
        padding: 20px;
    }
    
    #login {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Two-Factor Authentication Styles (Solid Security Pro)
   ========================================================================== */

.login .itsec-two-factor-form,
.login .solid-security-2fa {
    margin-top: 20px;
}

.login .itsec-two-factor-form input[type="text"],
.login .solid-security-2fa input[type="text"] {
    font-size: 18px;
    letter-spacing: 4px;
    text-align: center;
}

/* Passkey button styling */
.login .itsec-passkey-button,
.login .webauthn-button,
.login [class*="passkey"] button {
    width: 100%;
    margin-top: 10px;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 4px;
}
