/* ============================================================
   Abogados.Work — Client Auth (login + registro)
   Basado en el referente split-screen, scoped a .aw-auth
   ============================================================ */

/* Visby — tres pesos oficiales del proyecto */
@font-face {
    font-family: 'Visby';
    src: url('https://abogados.work/wp-content/uploads/2026/04/VisbyRegular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Visby';
    src: url('https://abogados.work/wp-content/uploads/2026/04/VisbyMedium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Visby';
    src: url('https://abogados.work/wp-content/uploads/2026/04/VisbyBold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

.aw-auth {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: 'Visby', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    color: #0f172a;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
.aw-auth a { color: inherit; text-decoration: none; }
.aw-auth button { font-family: inherit; cursor: pointer; border: none; background: none; }
.aw-auth input { font-family: inherit; }

/* ── Layout ────────────────────────────────────────────────── */
.aw-auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    padding: 16px;
    background: #ffffff;
}

/* ── Carousel (left) ───────────────────────────────────────── */
.aw-auth-carousel {
    position: relative;
    flex: 1 1 auto;
    border-radius: 18px;
    overflow: hidden;
    min-height: calc(100vh - 32px);
    color: #fff;
    isolation: isolate;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #2563eb 100%);
}
.aw-auth-slides {
    position: absolute;
    inset: 0;
}
.aw-auth-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.1s ease;
}
.aw-auth-slide.is-active { opacity: 1; }
.aw-auth-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.0) 35%, rgba(0,0,0,0.55) 100%);
    pointer-events: none;
    z-index: 1;
}
.aw-auth-slide__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
    background: #0f172a;
}

.aw-auth-brand {
    position: absolute;
    top: 32px;
    left: 36px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 3;
}
.aw-auth-brand__name {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.01em;
    color: #fff;
}
.aw-auth-brand__logo {
    display: block;
    height: 38px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.aw-auth-back {
    position: absolute;
    top: 40px;
    right: 36px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0.95;
    transition: opacity 0.2s ease;
}
.aw-auth-back:hover { opacity: 1; }
.aw-auth-back svg { width: 14px; height: 14px; }

.aw-auth-slide__content {
    position: absolute;
    left: 48px;
    right: 48px;
    bottom: 56px;
    z-index: 3;
    max-width: 640px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.7s ease 0.15s, transform 0.7s ease 0.15s;
}
.aw-auth-slide.is-active .aw-auth-slide__content {
    opacity: 1;
    transform: translateY(0);
}
.aw-auth-slide__headline {
    font-size: clamp(32px, 3.4vw, 52px);
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    color: #ffffff;
    text-wrap: balance;
}
.aw-auth-slide__subtext {
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255,255,255,0.82);
    margin: 0;
    max-width: 520px;
    text-wrap: pretty;
}
.aw-auth-dots {
    display: flex;
    gap: 8px;
    margin-top: 28px;
}
.aw-auth-dot {
    width: 28px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.35);
    transition: background 0.3s ease, width 0.3s ease;
}
.aw-auth-dot.is-active {
    background: #fff;
    width: 36px;
}

/* ── Form panel (right) ────────────────────────────────────── */
.aw-auth-panel {
    position: relative;
    flex: 0 0 460px;
    background: #fff;
    border-radius: 18px;
    margin-left: 16px;
    padding: 56px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self: stretch;
    min-height: calc(100vh - 32px);
}
.aw-auth-panel__icon {
    display: block;
    width: 38px;
    height: 38px;
    margin: 0 auto 14px;
    object-fit: contain;
}
.aw-auth-panel__inner {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}
.aw-auth .aw-auth-panel h1 {
    font-size: 36px;
    line-height: 1.15;
    font-weight: 700;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
    color: #040813 !important;
}
.aw-auth-subtitle {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 30px;
}

/* Registro: títulos centrados en cualquier viewport */
.aw-auth--register .aw-auth-panel h1,
.aw-auth--register .aw-auth-subtitle {
    text-align: center;
}

/* ── Notice (success / error inline) ───────────────────────── */
.aw-auth-notice {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
    border: 1px solid transparent;
}
.aw-auth-notice--error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.aw-auth-notice--success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.aw-auth-notice--info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.aw-auth-notice a { font-weight: 600; text-decoration: underline; }

/* ── Fields ────────────────────────────────────────────────── */
.aw-auth-field { margin-bottom: 18px; }
.aw-auth-field__label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 8px;
}
.aw-auth-field__wrap { position: relative; }
.aw-auth .aw-auth-field__input {
    width: 100% !important;
    height: 46px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 15px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    color: #0f172a !important;
    background: #ffffff !important;
    outline: none !important;
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    line-height: normal !important;
}
.aw-auth .aw-auth-field__input::placeholder { color: #9ca3af !important; opacity: 1; }
.aw-auth .aw-auth-field__input:focus {
    border-color: #0f172a !important;
    box-shadow: 0 0 0 3px rgba(15,23,42,0.06) !important;
}
.aw-auth .aw-auth-field__input--has-icon { padding-right: 44px !important; }
.aw-auth .aw-auth-field__wrap { position: relative; line-height: 0; }
.aw-auth .aw-auth-field__icon-btn {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 30px !important;
    height: 30px !important;
    min-height: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    display: grid !important;
    place-items: center !important;
    line-height: 1 !important;
    color: #6b7280 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}
.aw-auth .aw-auth-field__icon-btn:hover {
    color: #0f172a !important;
    background: #f3f4f6 !important;
}
.aw-auth .aw-auth-field__icon-btn svg { width: 18px !important; height: 18px !important; display: block; }
.aw-auth-hint {
    margin: 6px 2px 0;
    font-size: 11.5px;
    color: #9ca3af;
}

/* ── Options row ───────────────────────────────────────────── */
.aw-auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 0 22px;
    font-size: 13px;
}
.aw-auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    cursor: pointer;
    user-select: none;
}
.aw-auth-checkbox input { position: absolute; opacity: 0; pointer-events: none; }
.aw-auth-checkbox__box {
    width: 16px;
    height: 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.aw-auth-checkbox input:checked + .aw-auth-checkbox__box {
    background: #0f172a;
    border-color: #0f172a;
}
.aw-auth-checkbox__box svg {
    width: 10px; height: 10px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.aw-auth-checkbox input:checked + .aw-auth-checkbox__box svg { opacity: 1; }
.aw-auth-forgot {
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
}
.aw-auth-forgot:hover { color: #0f172a; }

/* ── Modal "¿Olvidaste tu contraseña?" ─────────────────────── */
.aw-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 8, 19, 0.55);
    backdrop-filter: blur(2px);
}
.aw-auth-modal[hidden] { display: none; }
.aw-auth-modal__card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 60px -20px rgba(4, 8, 19, 0.45);
    padding: 30px 28px 28px;
}
.aw-auth-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: none;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
}
.aw-auth-modal__close:hover { color: #0f172a; }
.aw-auth-modal__title {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: #0b1220;
}
.aw-auth-modal__text {
    margin: 0 0 18px;
    font-size: 13.5px;
    line-height: 1.55;
    color: #6b7280;
}
.aw-auth-modal__notice {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.aw-auth-modal__notice--error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.aw-auth-modal__notice--success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }

/* ── Buttons ───────────────────────────────────────────────── */
.aw-auth .aw-auth-btn {
    width: 100% !important;
    height: 50px !important;
    border-radius: 999px !important;
    border: none !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-shadow: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    transition: transform 0.05s ease, background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.aw-auth .aw-auth-btn:active { transform: translateY(1px); }
.aw-auth .aw-auth-btn[disabled] { opacity: 0.55 !important; cursor: progress !important; }
.aw-auth .aw-auth-btn--primary,
.aw-auth .aw-auth-btn--primary:link,
.aw-auth .aw-auth-btn--primary:visited {
    background-color: #040813 !important;
    background-image: none !important;
    color: #FFFFFF !important;
}
.aw-auth .aw-auth-btn--primary:hover,
.aw-auth .aw-auth-btn--primary:focus,
.aw-auth .aw-auth-btn--primary:active {
    background-color: #1a2235 !important;
    color: #FFFFFF !important;
}

/* ── Spinner del botón ─────────────────────────────────────── */
.aw-auth-spinner {
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    animation: aw-auth-spin 0.7s linear infinite;
}
@keyframes aw-auth-spin { to { transform: rotate(360deg); } }

/* ── Footer link ───────────────────────────────────────────── */
.aw-auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: #6b7280;
}
.aw-auth-footer a {
    color: #0f172a;
    font-weight: 500;
}
.aw-auth-footer a:hover { text-decoration: underline; }

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .aw-auth-page {
        padding: 0;
        background: #fff;
    }
    .aw-auth-carousel { display: none; }
    .aw-auth-panel {
        flex: 1 1 auto;
        margin-left: 0;
        border-radius: 0;
        padding: 32px 22px;
        min-height: 100vh;
    }
    .aw-auth-panel h1 { font-size: 30px; text-align: center; }
    .aw-auth-subtitle { text-align: center; }
    .aw-auth-panel__icon { width: 32px; height: 32px; margin-bottom: 12px; }
}
