﻿
/* =========================
   Venta en Línea (Checkout v2)   
   ========================= */

.vl-body {
    font-family: "Montserrat", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #111827;
    background: linear-gradient(0deg,rgba(177, 230, 220, 0.2) 0%, rgba(22, 35, 60, 0.2) 50%, rgba(177, 230, 220, 0.2) 100%);
}

/* Header */
.vl-header {
    max-width: 1180px;
    margin: 22px auto 0;
    padding: 18px 18px 0;
    display: flex;
    gap: 16px;
    align-items: center;
}

.vl-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.vl-logo {
    width: 86px;
    height: auto;
}

.vl-title {
    margin: 0 0 6px;
    font-size: clamp(20px, 2.4vw, 30px);
    letter-spacing: .2px;
    color: #0f172a;
}

.vl-subtitle {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.4;
}

/* Layout */
.vl-main {
    max-width: 1180px;
    margin: 14px auto 40px;
    padding: 0 18px 90px;
}

.vl-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 18px;
}

@media (max-width: 980px) {
    .vl-grid {
        grid-template-columns: 1fr;
    }

    .vl-logo {
        width: 74px;
    }
}

/* Cards */
.vl-card {
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 18px;
    box-shadow: 0 18px 55px rgba(2,6,23,.10);
    padding: 16px;
    backdrop-filter: blur(8px);
}

.vl-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.vl-card-title {
    margin: 0;
    font-size: 16px;
    letter-spacing: .2px;
    color: #0f172a;
}

/* “Paso” chip discreto con dorado */
.vl-chip {
    border: 1px solid rgba(230,203,111,.55);
    background: rgba(230,203,111,.18);
    color: #6b5a1a;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
}

/* Blocks inside card */
.vl-block {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,.08);
    background: rgba(248,250,252,.90);
    margin-top: 12px;
}

.vl-block-title {
    margin: 0;
    font-size: 14px;
    color: #0f172a;
}

.vl-block-sub {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 12.5px;
}

/* Inputs */
.vl-input,
.vl-select {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid rgba(15,23,42,.14);
    background: #ffffff;
    color: #0f172a;
    padding: 10px 12px;
    outline: none;
}

    .vl-input:focus,
    .vl-select:focus {
        border-color: rgba(236,99,66,.65); /* coral sutil */
        box-shadow: 0 0 0 .22rem rgba(236,99,66,.14); /* glow suave */
    }

/* Tabla */
.vl-table-wrap {
    overflow: auto;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,.08);
    background: #ffffff;
}

.vl-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
    font-size: 13px;
}

    .vl-table th,
    .vl-table td {
        padding: 10px 12px;
        border-bottom: 1px solid rgba(15,23,42,.06);
        vertical-align: middle;
    }

    .vl-table thead th {
        position: sticky;
        top: 0;
        background: #f8fafc;
        z-index: 1;
        text-align: left;
        font-weight: 650;
        color: #0f172a;
    }

/* Form grid */
.vl-form-grid {
    /*display: grid;*/
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 10px;
}

@media (max-width: 980px) {
    .vl-form-grid {
        grid-template-columns: 1fr;
    }
}

.vl-form-section {
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,.08);
    background: rgba(248,250,252,.90);
}

.vl-form-title {
    margin: 0 0 10px;
    font-size: 14px;
    color: #0f172a;
}

.vl-label {
    display: block;
    margin: 0 0 6px;
    color: #64748b;
    font-size: 12.5px;
}

/* Errors */
.vl-error {
    display: block;
    margin-top: 6px;
    color: #b42318;
    font-size: 12px;
}

/* Footerbar */
.vl-footerbar {
    position: sticky;
    bottom: 0;
    margin-top: 18px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    box-shadow: 0 18px 55px rgba(2,6,23,.08);
}

.vl-total-label {
    color: #64748b;
    font-size: 12px;
}

.vl-total-value {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.vl-total-sub {
    color: #64748b;
    font-size: 12px;
    margin-top: 2px;
}

/* CTA: coral discreto, no saturado */
.vl-btn-primary {
    border: 0;
    border-radius: 14px;
    padding: 12px 14px;
    min-width: 240px;
    background: linear-gradient(180deg, rgba(236,99,66,.92), #EC6342);
    color: #fff;
    font-weight: 750;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(236,99,66,.22);
}

    .vl-btn-primary:hover {
        filter: brightness(1.03);
    }

.vl-btn-ghost {
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(15,23,42,.14);
    background: #ffffff;
    color: #0f172a;
    cursor: pointer;
}

/* Dialog */
.vl-dialog {
    border: 1px solid rgba(15,23,42,.14);
    border-radius: 18px;
    padding: 0;
    background: rgba(255,255,255,.98);
    color: #0f172a;
    box-shadow: 0 24px 80px rgba(2,6,23,.18);
    max-width: 720px;
    width: calc(100% - 24px);
}

    .vl-dialog::backdrop {
        background: rgba(2,6,23,.45);
    }

.vl-dialog-form {
    padding: 16px;
}

.vl-dialog-title {
    margin: 0 0 10px;
}

.vl-dialog-warn {
    color: #9a3412;
    font-size: 12.5px;
    margin: 10px 0 0;
}

.vl-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}



/* =========================
   Dialog (Confirmación compra) - Mejorado
   ========================= */

.vl-dialog {
    border: 1px solid rgba(15,23,42,.14);
    border-radius: 18px;
    padding: 0;
    background: rgba(255,255,255,.98);
    color: #0f172a;
    box-shadow: 0 30px 90px rgba(2,6,23,.22);
    max-width: 760px;
    width: min(760px, calc(100% - 24px));
    overflow: hidden;
    transform: translateY(8px);
    opacity: 0;
}

    /* Backdrop más “premium” */
    .vl-dialog::backdrop {
        background: radial-gradient(900px 450px at 20% -10%, rgba(230,203,111,.22), transparent 60%), radial-gradient(900px 450px at 95% 10%, rgba(236,99,66,.14), transparent 55%), rgba(2,6,23,.52);
        backdrop-filter: blur(5px);
    }

    /* Animación al abrir (soporta browsers modernos) */
    .vl-dialog[open] {
        opacity: 1;
        transform: translateY(0);
        transition: opacity .18s ease, transform .18s ease;
    }

.vl-dialog-form {
    padding: 16px 16px 14px;
}

/* Encabezado con “acento” institucional sutil */
.vl-dialog-title {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(230,203,111,.22), rgba(236,99,66,.10));
    border: 1px solid rgba(15,23,42,.10);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .2px;
}

/* Contenedor del resumen: tarjeta interna con scroll */
.vl-dialog-body {
    margin-top: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,.10);
    background: #f8fafc;
    max-height: min(52vh, 420px);
    overflow: auto;
}

    /* Si el resumen trae tablas/listas, que se vean bien */
    .vl-dialog-body table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
    }

    .vl-dialog-body th,
    .vl-dialog-body td {
        padding: 10px 10px;
        border-bottom: 1px solid rgba(15,23,42,.08);
        vertical-align: top;
    }

    .vl-dialog-body thead th {
        position: sticky;
        top: 0;
        background: #f1f5f9;
        z-index: 1;
        text-align: left;
        font-weight: 750;
    }

/* Nota/advertencia mejor presentada */
.vl-dialog-warn,
.vl-dialog-note {
    margin: 12px 2px 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(230,203,111,.18);
    border: 1px solid rgba(230,203,111,.55);
    color: #6b5a1a;
    font-size: 12.5px;
    line-height: 1.35;
}

/* Botonera fija (si el resumen hace scroll, los botones siempre visibles) */
.vl-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(15,23,42,.10);
}

    /* Botón principal ligeramente más elegante */
    .vl-dialog-actions .vl-btn-primary {
        min-width: 180px;
    }

    /* Botón ghost más discreto */
    .vl-dialog-actions .vl-btn-ghost {
        min-width: 140px;
    }

/* Opcional: mejora foco accesible */
.vl-btn-primary:focus,
.vl-btn-ghost:focus {
    outline: none;
    box-shadow: 0 0 0 .22rem rgba(236,99,66,.16);
}


/* =========================
   Responsive (móvil)
   ========================= */

/* iPhone / Android */
@media (max-width: 560px) {
    
    /* Menos aire lateral para aprovechar pantalla */
    .vl-header {
        margin: 12px auto 0;
        padding: 12px 12px 0;
        gap: 12px;
    }

    .vl-main {
        margin: 10px auto 26px;
        padding: 0 12px 86px; /* deja espacio para footerbar */
    }

    .vl-card {
        padding: 12px;
        border-radius: 16px;
    }

    .vl-block {
        padding: 10px;
        border-radius: 14px;
    }

    /* Tipografías un poco más compactas */
    .vl-title {
        font-size: 22px;
    }

    .vl-subtitle {
        font-size: 13px;
    }

    /* ---------- TABLA BOLETOS ---------- */
    .vl-table-wrap {
        overflow-x: auto; /* por si algún device lo requiere */
        -webkit-overflow-scrolling: touch;
    }

    /* Quita el ancho mínimo que te rompe el layout */
    .vl-table {
        min-width: 0;
        width: 100%;
        font-size: 12.5px;
    }

        .vl-table th,
        .vl-table td {
            padding: 8px 10px;
        }

        /* Deja que el nombre / descripción pueda partir línea */
        .vl-table td {
            white-space: normal;
            word-break: break-word;
        }

            /* La columna de controles (− / input / +) que no se rompa feo */
            .vl-table td:last-child {
                white-space: nowrap;
            }

        /* Si el server te manda inputs con width fijo, esto lo corrige */
        .vl-table input,
        .vl-table select,
        .vl-table button {
            max-width: 100%;
        }

            /* Si el input de cantidad viene con width inline, fuerza un tamaño razonable */
            .vl-table input[type="number"],
            .vl-table input[type="text"] {
                width: 64px !important;
                padding: 8px 8px;
                border-radius: 10px;
                box-sizing: border-box;
            }

    /* ---------- FOOTERBAR (Total + botón) ---------- */
    .vl-footerbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .vl-footerbar-left {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 12px;
    }

    .vl-btn-primary {
        min-width: 0;
        width: 100%;
    }

    /* Dialog un poco más cómodo en móvil */
    .vl-dialog {
        width: calc(100% - 16px);
    }
}






.apv-processing {
    position: fixed;
    inset: 0;
    display: none; /* oculto por defecto */
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    z-index: 2147483647; /* por encima de todo */
}

    .apv-processing.is-visible {
        display: flex;
    }

.apv-processing__card {
    background: #fff;
    border-radius: 16px;
    padding: 22px 20px;
    min-width: 280px;
    max-width: 92vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    text-align: center;
}

.apv-processing__spinner {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 6px solid rgba(19,34,61,.15); /* #13223d con alpha */
    border-top-color: #13223d;
    margin: 0 auto 14px auto;
    animation: apvSpin 0.9s linear infinite;
}

.apv-processing__title {
    font-weight: 700;
    color: #13223d;
    font-size: 18px;
    margin-bottom: 6px;
}

.apv-processing__subtitle {
    font-size: 13px;
    color: rgba(19,34,61,.75);
}

@keyframes apvSpin {
    to {
        transform: rotate(360deg);
    }
}

/* opcional: evita scroll cuando está visible */
body.apv-lock {
    overflow: hidden !important;
}
