/**
 * Amics de Riba-Roja d'Ebre — Custom Login Page
 * Glassmorphism dark theme matching the project design system.
 */

/* ------------------------------------------------------------------ */
/* Page background                                                     */
/* ------------------------------------------------------------------ */
body.login {
    background: #1F1C18;
    background-image:
        radial-gradient(ellipse 60% 50% at 50% 40%, rgba(217, 93, 57, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 70% 60%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ------------------------------------------------------------------ */
/* Wrapper — centre the card                                           */
/* ------------------------------------------------------------------ */
#login {
    width: 380px;
    max-width: 90vw;
    padding: 0;
    margin: 0;
}

/* ------------------------------------------------------------------ */
/* Logo / header area                                                  */
/* ------------------------------------------------------------------ */
#login h1 a {
    background-image: none;
    width: auto;
    height: auto;
    margin: 0 auto 8px;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #FDFBF7;
    text-indent: 0;
    letter-spacing: -0.02em;
    display: block;
    text-align: center;
}

/* Subtitle injected via login_head */
.amics-login-subtitle {
    text-align: center;
    color: rgba(253, 251, 247, 0.5);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 400;
    margin: 0 0 28px;
    letter-spacing: 0.01em;
}

/* ------------------------------------------------------------------ */
/* Glass card                                                          */
/* ------------------------------------------------------------------ */
#loginform,
#lostpasswordform,
#registerform {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 0;
    padding: 32px 28px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    margin-top: 0;
}

/* ------------------------------------------------------------------ */
/* Labels                                                              */
/* ------------------------------------------------------------------ */
#loginform label,
#lostpasswordform label,
#registerform label {
    color: rgba(253, 251, 247, 0.7);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 500;
}

/* ------------------------------------------------------------------ */
/* Input fields                                                        */
/* ------------------------------------------------------------------ */
#loginform input[type="text"],
#loginform input[type="password"],
#lostpasswordform input[type="text"],
#registerform input[type="text"],
#registerform input[type="email"] {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 0;
    color: #FDFBF7;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    padding: 10px 14px;
    height: auto;
    box-shadow: none;
    transition: border-color 0.25s ease, background 0.25s ease;
}

#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: rgba(255, 255, 255, 0.1);
    border-color: rgba(217, 93, 57, 0.6);
    box-shadow: 0 0 0 1px rgba(217, 93, 57, 0.3);
    outline: none;
    color: #FDFBF7;
}

/* Placeholder */
#loginform input::placeholder,
#lostpasswordform input::placeholder,
#registerform input::placeholder {
    color: rgba(253, 251, 247, 0.35);
}

/* ------------------------------------------------------------------ */
/* Password visibility toggle (WP eye icon)                            */
/* ------------------------------------------------------------------ */
.wp-pwd .button.wp-hide-pw {
    color: rgba(253, 251, 247, 0.5);
    background: transparent;
    border: none;
    box-shadow: none;
}

.wp-pwd .button.wp-hide-pw:hover,
.wp-pwd .button.wp-hide-pw:focus {
    color: #FDFBF7;
    background: transparent;
    border: none;
    box-shadow: none;
}

.wp-pwd .button.wp-hide-pw .dashicons {
    color: inherit;
}

/* ------------------------------------------------------------------ */
/* Remember me checkbox                                                */
/* ------------------------------------------------------------------ */
.forgetmenot label {
    color: rgba(253, 251, 247, 0.6) !important;
    font-size: 13px !important;
}

#rememberme {
    accent-color: #D95D39;
}

/* ------------------------------------------------------------------ */
/* Submit button                                                       */
/* ------------------------------------------------------------------ */
#wp-submit {
    background: #D95D39;
    border: none;
    border-radius: 0;
    color: #FDFBF7;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    text-shadow: none;
    box-shadow: none;
    width: 100%;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease;
    float: none;
    margin-top: 8px;
}

#wp-submit:hover {
    background: #c4522f;
}

#wp-submit:active {
    background: #b0482a;
    transform: scale(0.98);
}

#wp-submit:focus {
    box-shadow: 0 0 0 2px rgba(217, 93, 57, 0.8);
    outline: none;
}

/* Make button full-width — override WP float layout */
.submit {
    text-align: center;
}

.forgetmenot {
    float: none !important;
    margin-bottom: 16px;
}

/* ------------------------------------------------------------------ */
/* Navigation links (Lost password, Back to site)                      */
/* ------------------------------------------------------------------ */
#nav,
#backtoblog {
    text-align: center;
    padding: 0;
    margin: 16px 0 0;
}

#nav a,
#backtoblog a {
    color: rgba(253, 251, 247, 0.5);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
}

#nav a:hover,
#backtoblog a:hover {
    color: #D95D39;
    text-decoration: none;
}

/* Separator between nav links */
#nav .privacy-policy-page-link::before {
    color: rgba(253, 251, 247, 0.25);
}

/* ------------------------------------------------------------------ */
/* Error & info messages                                               */
/* ------------------------------------------------------------------ */
#login_error,
.message,
.success {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: none;
}

#login_error {
    border-left: 3px solid #D95D39;
    color: rgba(253, 251, 247, 0.85);
}

#login_error a {
    color: #D95D39;
}

.message {
    border-left: 3px solid rgba(253, 251, 247, 0.4);
    color: rgba(253, 251, 247, 0.85);
}

.success {
    border-left: 3px solid #6abf69;
    color: rgba(253, 251, 247, 0.85);
}

/* ------------------------------------------------------------------ */
/* Footer text                                                         */
/* ------------------------------------------------------------------ */
.privacy-policy-page-link a {
    color: rgba(253, 251, 247, 0.35) !important;
    font-size: 12px;
}

/* ------------------------------------------------------------------ */
/* Language switcher (WP 5.9+)                                         */
/* ------------------------------------------------------------------ */
.language-switcher {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.language-switcher label {
    color: rgba(253, 251, 247, 0.5) !important;
}

.language-switcher select {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #FDFBF7 !important;
    border-radius: 0 !important;
}

.language-switcher .button {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: rgba(253, 251, 247, 0.7) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

/* ------------------------------------------------------------------ */
/* Hide default WP arrow on password field                             */
/* ------------------------------------------------------------------ */
input[type="password"]::-ms-reveal {
    filter: invert(1);
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media screen and (max-width: 480px) {
    #login {
        width: 100%;
        max-width: 100vw;
        padding: 0 16px;
        box-sizing: border-box;
    }

    #loginform,
    #lostpasswordform,
    #registerform {
        padding: 24px 20px;
    }
}
