/**
 * Órbita Crítica — Login Page
 * Diseño split: panel izquierdo animado · panel derecho con formulario
 */

*, *::before, *::after { box-sizing: border-box; }

/* ─── LAYOUT SPLIT ─────────────────────────────────────────────────────── */

body.login {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* El panel izquierdo lo añadimos via login_footer (al final del DOM),
   pero con order: 0 lo mostramos primero visualmente. */
#oc-login-left {
    order: 0;
    position: relative;
    width: 44%;
    min-height: 100vh;
    background: #131c2c;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

body.login #login {
    order: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 48px 40px;
    background: #fff;
    /* Resetear estilos de WP */
    width: auto !important;
    max-width: none !important;
}

/* ─── CANVAS ANIMACIÓN ──────────────────────────────────────────────────── */

#oc-login-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* ─── BRAND (panel izquierdo) ───────────────────────────────────────────── */

.oc-login-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 52px;
    color: #fff;
    pointer-events: none;
}

.oc-login-logo {
    margin-bottom: 28px;
}

.oc-login-logo--img {
    margin-bottom: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.oc-login-logo__img {
    display: block;
    width: 260px;
    max-width: 260px;
    height: auto;
    object-fit: contain;
}

.oc-login-logo__orbita {
    display: block;
    font-size: clamp(44px, 4.5vw, 68px);
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.03em;
}

.oc-login-logo__critica {
    display: block;
    font-size: clamp(22px, 2.5vw, 38px);
    font-weight: 300;
    color: #d8b242;
    line-height: 1.1;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-style: italic;
    margin-top: 4px;
}

/* Línea dorada bajo el logo (solo versión texto, no imagen) */
.oc-login-logo:not(.oc-login-logo--img)::after {
    content: '';
    display: block;
    width: 44px;
    height: 3px;
    background: #d8b242;
    border-radius: 2px;
    margin: 22px auto 0;
}

.oc-login-tagline {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.60);
    line-height: 1.7;
    margin: 0 0 14px;
    font-weight: 400;
}

.oc-login-location {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.30);
    margin: 0;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

/* ─── BIENVENIDA (panel derecho, sobre el form) ─────────────────────────── */

.oc-login-welcome {
    text-align: center;
    margin-bottom: 28px;
    width: 100%;
    max-width: 380px;
}

.oc-login-welcome__sub {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #2c83bf;
    margin: 0 0 8px;
}

.oc-login-welcome__title {
    font-size: 26px;
    font-weight: 700;
    color: #131c2c;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    font-family: 'Inter', sans-serif;
}

.oc-login-welcome__desc {
    font-size: 14px;
    color: #787c82;
    margin: 0;
    line-height: 1.6;
}

/* ─── OCULTAR LOGO NATIVO DE WP ─────────────────────────────────────────── */

body.login h1 { display: none !important; }

/* ─── FORMULARIO ────────────────────────────────────────────────────────── */

body.login form#loginform {
    background: #fff;
    border: 1.5px solid #e4e7ec;
    border-radius: 14px;
    padding: 36px 40px;
    box-shadow: 0 4px 28px rgba(0, 0, 0, 0.07);
    width: 100%;
    max-width: 380px;
    margin: 0 !important;
}

body.login form label {
    font-size: 13px;
    font-weight: 600;
    color: #131c2c;
    font-family: inherit;
    display: block;
    margin-bottom: 5px;
}

body.login form .input,
body.login form input[type="text"],
body.login form input[type="password"] {
    border: 1.5px solid #dcdfe6;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    width: 100%;
    background: #f9fafb;
    font-family: inherit;
    color: #131c2c;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
    box-shadow: none;
}

body.login form .input:focus,
body.login form input[type="text"]:focus,
body.login form input[type="password"]:focus {
    border-color: #2c83bf;
    box-shadow: 0 0 0 3px rgba(44, 131, 191, 0.14);
    background: #fff;
    outline: none;
}

/* Checkbox "Recordarme" */
body.login form .forgetmenot {
    display: flex;
    align-items: center;
    gap: 7px;
}

body.login form .forgetmenot label {
    font-size: 13px;
    font-weight: 400;
    color: #50575e;
    margin: 0;
}

/* Separación entre Recuérdame y botón */
#loginform p.forgetmenot {
    padding-bottom: 20px !important;
}

#loginform p.submit {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Botón submit */
body.login #wp-submit {
    width: 100%;
    padding: 2px 0;
    background: #131c2c;
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(19, 28, 44, 0.18);
}

body.login #wp-submit:hover {
    background: #d8b242;
    color: #131c2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(216, 178, 66, 0.32);
}

body.login #wp-submit:active {
    transform: translateY(0);
}

/* ─── LINKS INFERIORES ──────────────────────────────────────────────────── */

body.login #nav,
body.login #backtoblog {
    text-align: center;
    max-width: 380px;
    width: 100%;
    margin: 10px 0 0 !important;
    padding: 0 !important;
    background: none;
    box-shadow: none;
    border: none;
}

body.login #nav a,
body.login #backtoblog a {
    color: #787c82;
    font-size: 13px;
    text-decoration: none;
    font-family: inherit;
    transition: color 0.15s;
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
    color: #2c83bf;
    text-decoration: none;
}

/* Mensajes de error */
body.login #login_error,
body.login .message,
body.login .success {
    max-width: 380px;
    width: 100%;
    border-radius: 8px;
    border-left-width: 4px;
    font-family: inherit;
    font-size: 14px;
    margin: 0 0 16px !important;
    padding: 12px 16px !important;
}

body.login #login_error { border-left-color: #dc2626; background: #fef2f2; color: #991b1b; }
body.login .message     { border-left-color: #2c83bf; background: #eff8ff; color: #1d4ed8; }
body.login .success     { border-left-color: #16a34a; background: #f0fdf4; color: #166534; }

/* ─── OCULTAR SELECTOR DE IDIOMA ───────────────────────────────────────── */

.language-switcher,
#language-switcher,
.login-footer-language-switcher {
    display: none !important;
}

/* ─── RESPONSIVE ────────────────────────────────────────────────────────── */

@media (max-width: 820px) {
    body.login {
        flex-direction: column;
    }

    #oc-login-left {
        width: 100%;
        min-height: 220px;
        order: 0;
    }

    .oc-login-logo__orbita  { font-size: 36px; }
    .oc-login-logo__critica { font-size: 20px; }
    .oc-login-tagline       { font-size: 13px; }
    .oc-login-brand         { padding: 28px 24px; }

    body.login #login {
        order: 1;
        min-height: auto;
        padding: 36px 24px;
    }

    body.login form#loginform { padding: 28px 24px; }
}

@media (max-width: 480px) {
    #oc-login-left { min-height: 180px; }
    body.login form#loginform { padding: 24px 20px; }
}
