/* ─────────────────────────────────────────────────────────────────
   auth.css — Pilar TV Pública
   Login / Registro premium. Self-contained (sin custom properties)
   ───────────────────────────────────────────────────────────────── */

/* Reset base de login */
html,
body.login {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.login {
    background: #07111f;
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(31, 85, 165, 0.35) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 90%, rgba(237, 28, 36, 0.2) 0%, transparent 55%);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    padding: 24px 16px;
}

/* Contenedor principal */
body.login #login {
    width: 420px;
    max-width: 92vw;
    padding: 0;
    margin: auto 0 !important; /* Centrado vertical flexible sin cortes superiores */
}

/* ─── Logo ─── */
body.login h1 {
    margin: 0;
    text-align: center;
}

body.login h1 a {
    display: block;
    width: 200px;
    height: 72px;
    margin: 0 auto;
    background-image: none; /* sobreescrita por el inline CSS del PHP */
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    text-indent: -9999px;
    overflow: hidden;
    /* Fallback: si el logo no carga, mostramos el nombre */
    font-size: 0;
}

/* Subtítulo debajo del logo */
body.login h1 a::after {
    content: 'Portal de Noticias';
    display: block;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    font-weight: 500;
    margin-top: 4px;
    text-indent: 0;
    font-family: 'Inter', sans-serif;
}

/* ─── Formulario / Card ─── */
body.login form#loginform,
body.login form#registerform,
body.login form#lostpasswordform {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.08);
    padding: 24px 28px 24px;
    margin-top: 12px;
    color: #ffffff;
}

/* Compresión de márgenes del formulario nativo */
body.login form p {
    margin-bottom: 12px !important;
}
body.login form p.submit {
    margin-top: 16px !important;
    margin-bottom: 0 !important;
}

/* ─── Labels ─── */
body.login label {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.02em;
    display: block;
    margin-bottom: 0;
}

/* ─── Inputs ─── */
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    padding: 11px 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    margin-top: 6px;
}

body.login input[type="text"]::placeholder,
body.login input[type="password"]::placeholder,
body.login input[type="email"]::placeholder {
    color: rgba(255,255,255,0.3) !important;
}

body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
    border-color: #1f55a5 !important;
    background: rgba(31, 85, 165, 0.12) !important;
    box-shadow: 0 0 0 3px rgba(31, 85, 165, 0.25) !important;
    outline: none !important;
}

/* ─── Checkbox "recordar" ─── */
body.login .forgetmenot {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.login .forgetmenot label {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin: 0;
    cursor: pointer;
}

/* ─── Submit Button ─── */
body.login .button-primary,
body.login input[type="submit"] {
    background: linear-gradient(135deg, #ed1c24 0%, #c0141b 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    cursor: pointer !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em !important;
    padding: 13px 24px !important;
    text-shadow: none !important;
    width: 100% !important;
    box-shadow: 0 6px 24px rgba(237, 28, 36, 0.4) !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

body.login .button-primary:hover,
body.login input[type="submit"]:hover {
    background: linear-gradient(135deg, #ff2d35 0%, #ed1c24 100%) !important;
    box-shadow: 0 8px 32px rgba(237, 28, 36, 0.55) !important;
    transform: translateY(-1px);
}

body.login .button-primary:active,
body.login input[type="submit"]:active {
    transform: translateY(0);
}

/* ─── Submit wrap (alinea el botón) ─── */
body.login .submit {
    margin-top: 8px;
}

/* ─── Separador visual ─── */
body.login #login-form-submit + .forgetmenot,
body.login .submit ~ .forgetmenot {
    margin-top: 12px;
}

/* ─── Links de navegación ─── */
body.login #nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    font-size: 0; /* Oculta la barra vertical '|' de WordPress */
    padding: 0;
    text-align: center;
    background: none;
    box-shadow: none;
    border: none;
}

body.login #nav a {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.5) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    display: inline-block;
    padding: 4px 8px !important;
}

body.login #nav a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

body.login #backtoblog {
    text-align: center;
    margin-top: 20px;
    padding: 0;
    background: none;
    box-shadow: none;
    border: none;
}

body.login #backtoblog a {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    text-decoration: none !important;
    background: rgba(31, 85, 165, 0.2) !important;
    border: 1px solid rgba(31, 85, 165, 0.4) !important;
    padding: 10px 24px !important;
    border-radius: 20px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

body.login #backtoblog a:hover {
    background: #ed1c24 !important;
    border-color: #ed1c24 !important;
    box-shadow: 0 6px 20px rgba(237, 28, 36, 0.4) !important;
    transform: translateY(-1px);
}

/* ─── Mensajes de error / éxito ─── */
body.login #login_error,
body.login .message {
    border-radius: 8px;
    border-left: 4px solid #ed1c24;
    background: rgba(237, 28, 36, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

body.login .message {
    border-left-color: #1f55a5;
    background: rgba(31, 85, 165, 0.15);
}

/* ─── Ocultar elementos innecesarios y selector de idioma ─── */
body.login .privacy-policy-page-link,
body.login #login_form + .description,
body.login .language-switcher,
body.login #language-switcher {
    display: none !important;
}

/* ─── Responsive ─── */
@media (max-width: 440px) {
    body.login form#loginform,
    body.login form#registerform,
    body.login form#lostpasswordform {
        padding: 28px 20px 24px;
        border-radius: 12px;
    }
}
