/**
 * Dagora Custom Login Page Styles
 *
 * Brand colors referenced from includes/config/colors.php
 * --brand-blue: #007CC5
 * --brand-blue-dark: #005A8F
 * --brand-green: #9CBF4A
 * --color-dark: #151C2F
 * --color-dark-2: #1E2640
 * --color-gray: #3A3A3A
 *
 * @version 1.0.0
 */

/* ===========================================
   BASE / BACKGROUND
   =========================================== */
body.login {
    background: linear-gradient(135deg, #151C2F 0%, #1E2640 50%, #2A3352 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Subtle pattern overlay for depth */
body.login::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(0, 124, 197, 0.03) 0%, transparent 50%),
                      radial-gradient(circle at 75% 75%, rgba(156, 191, 74, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ===========================================
   LOGO
   =========================================== */
#login h1 a {
    background-image: url('/wp-content/uploads/2024/08/Dagora_LIH_TOTAL_WHITE.webp');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 280px;
    height: 80px;
    margin-bottom: 2rem;
    display: block;
}

/* ===========================================
   MAIN FORM CONTAINER
   =========================================== */
#login {
    width: 100%;
    max-width: 400px;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

#loginform,
#lostpasswordform,
#registerform {
    background: #FFFFFF;
    border: none;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-top: 0;
}

/* ===========================================
   FORM LABELS
   =========================================== */
#loginform label,
#lostpasswordform label,
#registerform label {
    color: #3A3A3A;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ===========================================
   INPUT FIELDS
   =========================================== */
#loginform input[type="text"],
#loginform input[type="password"],
#lostpasswordform input[type="text"],
#registerform input[type="text"],
#registerform input[type="email"] {
    background: #F5F5F7;
    border: 2px solid #E8E8E8;
    border-radius: 8px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: #3A3A3A;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    width: 100%;
    margin-top: 0.5rem;
}

#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus,
#lostpasswordform input[type="text"]:focus,
#registerform input[type="text"]:focus,
#registerform input[type="email"]:focus {
    background: #FFFFFF;
    border-color: #007CC5;
    box-shadow: 0 0 0 3px rgba(0, 124, 197, 0.15);
    outline: none;
}

#loginform input[type="text"]::placeholder,
#loginform input[type="password"]::placeholder {
    color: #9B9B9B;
}

/* ===========================================
   REMEMBER ME CHECKBOX
   =========================================== */
.forgetmenot {
    margin-top: 1rem;
}

.forgetmenot label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6B6B6B;
    cursor: pointer;
}

#loginform input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #E8E8E8;
    border-radius: 4px;
    background: #F5F5F7;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

#loginform input[type="checkbox"]:checked {
    background: #007CC5;
    border-color: #007CC5;
}

#loginform input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

#loginform input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(0, 124, 197, 0.15);
    outline: none;
}

/* ===========================================
   SUBMIT BUTTON
   =========================================== */
#loginform .submit,
#lostpasswordform .submit,
#registerform .submit {
    margin-top: 1.5rem;
}

#wp-submit,
#lostpasswordform input[type="submit"],
#registerform input[type="submit"] {
    background: linear-gradient(135deg, #007CC5 0%, #005A8F 100%);
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    width: 100%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-shadow: none;
}

#wp-submit:hover,
#lostpasswordform input[type="submit"]:hover,
#registerform input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 124, 197, 0.35);
}

#wp-submit:active,
#lostpasswordform input[type="submit"]:active,
#registerform input[type="submit"]:active {
    transform: translateY(0);
}

#wp-submit:focus,
#lostpasswordform input[type="submit"]:focus,
#registerform input[type="submit"]:focus {
    box-shadow: 0 0 0 3px rgba(0, 124, 197, 0.3), 0 8px 20px rgba(0, 124, 197, 0.25);
    outline: none;
}

/* ===========================================
   NAVIGATION LINKS
   =========================================== */
#nav,
#backtoblog {
    padding: 0 1rem;
}

#nav a,
#backtoblog a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

#nav a:hover,
#backtoblog a:hover {
    color: #FFFFFF;
}

#nav a:focus,
#backtoblog a:focus {
    color: #9CBF4A;
    box-shadow: none;
    outline: none;
}

/* Separator in nav */
#nav {
    text-align: center;
    margin-top: 1.5rem;
}

#nav a {
    display: inline-block;
    padding: 0.25rem 0.5rem;
}

#backtoblog {
    text-align: center;
    margin-top: 1rem;
}

/* ===========================================
   ERROR / MESSAGE BOXES
   =========================================== */
#login_error,
.message,
.success {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-left-width: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

#login_error {
    background: #FEF2F2;
    border-left-color: #DC3545;
    color: #991B1B;
}

#login_error a {
    color: #DC3545;
}

.message {
    background: rgba(0, 124, 197, 0.1);
    border-left-color: #007CC5;
    color: #151C2F;
}

.success {
    background: rgba(156, 191, 74, 0.15);
    border-left-color: #9CBF4A;
    color: #3A3A3A;
}

/* ===========================================
   PRIVACY POLICY LINK
   =========================================== */
.privacy-policy-page-link {
    margin-top: 1.5rem;
    text-align: center;
}

.privacy-policy-page-link a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.privacy-policy-page-link a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* ===========================================
   LANGUAGE SWITCHER (if enabled)
   =========================================== */
.language-switcher {
    margin-top: 1rem;
}

.language-switcher select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ===========================================
   PASSWORD VISIBILITY TOGGLE (WP 5.3+)
   =========================================== */
.wp-pwd {
    position: relative;
}

.wp-pwd .dashicons {
    color: #6B6B6B;
}

.wp-pwd button.wp-hide-pw {
    background: transparent;
    border: none;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    padding: 0.5rem;
    color: #6B6B6B;
    transition: color 0.2s ease;
}

.wp-pwd button.wp-hide-pw:hover {
    color: #007CC5;
}

.wp-pwd button.wp-hide-pw:focus {
    color: #007CC5;
    outline: none;
    box-shadow: none;
}

/* ===========================================
   INTERIM LOGIN (modal style)
   =========================================== */
.interim-login #login {
    padding-top: 0;
}

.interim-login.login h1 a {
    width: 200px;
    height: 60px;
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */
@media screen and (max-width: 480px) {
    #login h1 a {
        width: 220px;
        height: 65px;
    }

    #loginform,
    #lostpasswordform,
    #registerform {
        padding: 1.5rem;
    }

    #login {
        padding: 0 1rem;
    }
}

/* ===========================================
   DARK MODE SUPPORT
   =========================================== */
@media (prefers-color-scheme: dark) {
    /* Already dark by default, but ensure consistency */
    body.login {
        background: linear-gradient(135deg, #151C2F 0%, #1E2640 50%, #2A3352 100%);
    }
}

/* ===========================================
   REDUCED MOTION
   =========================================== */
@media (prefers-reduced-motion: reduce) {
    #wp-submit,
    #loginform input[type="text"],
    #loginform input[type="password"],
    #loginform input[type="checkbox"],
    #nav a,
    #backtoblog a {
        transition: none;
    }

    #wp-submit:hover {
        transform: none;
    }
}
