/* assets/css/seating-map.css - Plano Arquitectónico Interactivo Vertical 1:1 Horno 3 Monterrey */

.blueprint-scroll-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    padding: 5px 0;
    -webkit-overflow-scrolling: touch;
}

.blueprint-container {
    background: #060b17;
    background-image: 
        linear-gradient(rgba(212, 175, 55, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.08) 1px, transparent 1px);
    background-size: 25px 25px;
    border: 2px solid var(--gold-primary);
    border-radius: 20px;
    padding: 20px;
    position: relative;
    margin: 0 auto 30px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), inset 0 0 30px rgba(0, 0, 0, 0.6);
    user-select: none;
}

/* Zonas gráficas eliminadas a petición del usuario */

/* Área del Escenario */
.stage-area {
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.25) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 2px stroke var(--gold-primary);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    position: absolute;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stage-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.stage-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Puertas e Indicadores */
.door-indicator {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--gold-primary);
    color: var(--gold-light);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    letter-spacing: 1px;
}

/* Área de Bar */
.bar-area {
    background: rgba(30, 41, 59, 0.85);
    border: 1.5px dashed rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    color: var(--gold-light);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
}

/* Mesa de 135px con 10 sillas visibles alrededor */
.table-map-node {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    transition: transform 0.2s ease, border-color 0.2s;
}

.table-node-center {
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 2px solid var(--border-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.table-map-node:hover .table-node-center {
    transform: scale(1.1);
    border-color: #fff;
    box-shadow: 0 0 20px var(--gold-primary);
}

.table-node-number {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.table-node-zone {
    font-size: 0.6com;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gold-light);
}

/* 10 Micro-Sillas Dispuestas Alrededor de la Mesa en el Plano */
.mini-seats-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 5;
}

.mini-seat {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.9);
    border: 1.5px solid var(--border-gold);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Estatus Visual de Sillas */
.mini-seat.disponible {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #a7f3d0;
}

.mini-seat.disponible:hover {
    transform: scale(1.3);
    background: #10b981;
    color: #fff;
    box-shadow: 0 0 10px #10b981;
    z-index: 10;
}

.mini-seat.seleccionado {
    background: #10b981 !important;
    border-color: #fff !important;
    color: #fff !important;
    transform: scale(1.3);
    box-shadow: 0 0 12px #10b981;
    z-index: 10;
}

.mini-seat.ocupado {
    background: #ef4444 !important;
    border-color: #7f1d1d !important;
    color: #fff !important;
    cursor: not-allowed;
    opacity: 0.8;
}

.mini-seat.apartado {
    background: #f59e0b !important;
    border-color: #78350f !important;
    color: #000 !important;
    cursor: not-allowed;
}

.mini-seat.bloqueado {
    background: #475569 !important;
    border-color: #1e293b !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
}

/* MODAL POPOVER PARA SELECCIÓN */
.seat-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 8, 15, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.seat-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.seat-modal-card {
    background: rgba(10, 16, 30, 0.98);
    border: 2px solid var(--gold-primary);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.9), 0 0 30px rgba(212, 175, 55, 0.3);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.seat-modal-backdrop.active .seat-modal-card {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: #fff;
}

/* Diagrama Radial Modal */
.table-visual-container {
    width: 240px;
    height: 240px;
    margin: 20px auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-center-circle {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 41, 59, 1) 0%, rgba(15, 23, 42, 1) 100%);
    border: 2px solid var(--border-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.6);
    z-index: 2;
}

.seats-circle-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.seat-item {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.9);
    border: 2px solid var(--border-gold);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    user-select: none;
}

.seat-item:nth-child(1)  { top: 5px;   left: 102px; }
.seat-item:nth-child(2)  { top: 26px;  left: 160px; }
.seat-item:nth-child(3)  { top: 78px;  left: 194px; }
.seat-item:nth-child(4)  { top: 140px; left: 190px; }
.seat-item:nth-child(5)  { top: 190px; left: 148px; }
.seat-item:nth-child(6)  { top: 196px; left: 90px; }
.seat-item:nth-child(7)  { top: 170px; left: 32px; }
.seat-item:nth-child(8)  { top: 118px; left: 6px; }
.seat-item:nth-child(9)  { top: 58px;  left: 12px; }
.seat-item:nth-child(10) { top: 18px;  left: 50px; }

.seat-item:hover:not(.ocupado):not(.bloqueado) {
    transform: scale(1.25);
    border-color: #fff;
    box-shadow: 0 0 12px var(--gold-primary);
    z-index: 10;
}

.seat-item.seleccionado {
    background: #10b981 !important;
    border-color: #fff !important;
    color: #fff !important;
    transform: scale(1.25);
    box-shadow: 0 0 15px #10b981;
    z-index: 10;
}

.seat-item.ocupado {
    background: #ef4444 !important;
    border-color: #7f1d1d !important;
    color: #fff !important;
    cursor: not-allowed;
    opacity: 0.8;
}

.seat-item.apartado {
    background: #f59e0b !important;
    border-color: #78350f !important;
    color: #000 !important;
    cursor: not-allowed;
}

.seat-item.bloqueado {
    background: #475569 !important;
    border-color: #1e293b !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
}

/* Leyenda de Zonas y Estatus */
.seating-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    background: rgba(10, 16, 30, 0.6);
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 30px;
}

.legend-item { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.legend-badge { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; }
.legend-badge.oro { background: var(--gold-gradient); }
.legend-badge.plata { background: var(--silver-gradient); }
.legend-badge.bronce { background: var(--bronze-gradient); }
.legend-badge.seleccionado { background: #10b981; border-color: #fff; }
.legend-badge.ocupado { background: #ef4444; }
.legend-badge.apartado { background: #f59e0b; }

/* ==========================================================================
   LAYOUT PASO 2: PANEL LATERAL FLOTANTE STICKY DE RESUMEN
   ========================================================================== */
.paso2-layout-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 25px;
    align-items: start;
}

.paso2-main-column {
    min-width: 0;
}

.paso2-sidebar-column {
    position: relative;
}

.sticky-sidebar-card {
    position: sticky;
    top: 90px;
    background: rgba(10, 16, 30, 0.95);
    border: 1px solid var(--gold-primary);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(12px);
    z-index: 50;
    margin-bottom: 0;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--gold-light);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.sidebar-label {
    font-size: 0.76rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.sidebar-package-info {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 15px;
}

.sidebar-package-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 2px;
}

.sidebar-carnets-info {
    font-size: 0.82rem;
    color: var(--gold-light);
    margin-top: 3px;
}

.sidebar-counter-box {
    margin-bottom: 15px;
}

.sidebar-counter-val {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--gold-light);
}

.sidebar-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 4px;
}

.sidebar-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold-primary), #10b981);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.sidebar-seats-container {
    margin-bottom: 18px;
}

.sidebar-seats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--gold-primary) rgba(255,255,255,0.05);
}

.sidebar-seats-list::-webkit-scrollbar {
    width: 5px;
}

.sidebar-seats-list::-webkit-scrollbar-thumb {
    background: var(--gold-primary);
    border-radius: 4px;
}

.empty-seats-msg {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 16px 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    line-height: 1.5;
}

.selected-seat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.selected-seat-item:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.btn-vaciar-link {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-vaciar-link:hover {
    text-decoration: underline;
}

.sidebar-total-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 18px;
    text-align: center;
}

.sidebar-total-price {
    font-size: 1.55rem;
    font-weight: 800;
    color: #10b981;
    margin-top: 2px;
}

@media (max-width: 1024px) {
    .paso2-layout-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .paso2-main-column {
        order: 1;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }
    .paso2-sidebar-column {
        order: 2;
    }
    .sticky-sidebar-card {
        position: relative;
        top: 0;
        margin-top: 0;
    }

    /* Scroll horizontal + vertical para el plano en tablet */
    .blueprint-scroll-wrapper {
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        max-height: 70vh;
        border-radius: 14px;
        border: 1px solid var(--gold-primary, #d4af37);
        box-shadow: 0 8px 25px rgba(0,0,0,0.5);
        background: #060b17;
        cursor: grab;
    }
    .blueprint-scroll-wrapper:active {
        cursor: grabbing;
    }
    .blueprint-scroll-wrapper::before {
        content: '👆 Desliza para navegar el plano';
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: var(--gold-light, #f5e49b);
        background: rgba(10, 16, 30, 0.9);
        padding: 6px 10px;
        border-bottom: 1px solid rgba(212, 175, 55, 0.25);
        font-style: italic;
        letter-spacing: 0.3px;
    }

    /* Blueprint mantiene tamaño original para que sea navegable */
    .blueprint-container {
        min-width: 920px;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
}

/* ---- Móvil (≤ 768px): sidebar ARRIBA del plano ---- */
@media (max-width: 768px) {
    .paso2-main-column  { order: 2; }
    .paso2-sidebar-column { order: 1; }

    .blueprint-scroll-wrapper {
        max-height: 68vh;
    }

    /* Leyenda compacta */
    .seating-legend { gap: 10px; padding: 10px 12px; margin-bottom: 12px; }
    .legend-item { font-size: 0.8rem; gap: 6px; }

    /* Sidebar compacta */
    .sticky-sidebar-card { padding: 16px 14px; }
    .sidebar-title { font-size: 1.05rem; margin-bottom: 12px; }
    .sidebar-seats-list { max-height: 160px; }
    .sidebar-total-price { font-size: 1.35rem; }

    /* Botones full-width */
    .sticky-sidebar-card .btn-gold,
    .sticky-sidebar-card .btn-secondary {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Modal de asientos */
    .seat-modal-card {
        width: 96%;
        max-width: 96vw;
        padding: 18px 14px;
        border-radius: 14px;
    }
    .table-visual-container { width: 200px; height: 200px; }
    .table-center-circle   { width: 88px;  height: 88px; }
    .seat-item { width: 30px; height: 30px; font-size: 0.75rem; }
    .seat-item:nth-child(1)  { top: 2px;   left: 85px;  }
    .seat-item:nth-child(2)  { top: 21px;  left: 133px; }
    .seat-item:nth-child(3)  { top: 65px;  left: 162px; }
    .seat-item:nth-child(4)  { top: 117px; left: 158px; }
    .seat-item:nth-child(5)  { top: 158px; left: 122px; }
    .seat-item:nth-child(6)  { top: 164px; left: 72px;  }
    .seat-item:nth-child(7)  { top: 139px; left: 24px;  }
    .seat-item:nth-child(8)  { top: 94px;  left: 4px;   }
    .seat-item:nth-child(9)  { top: 44px;  left: 10px;  }
    .seat-item:nth-child(10) { top: 10px;  left: 38px;  }

    #limit-confirm-modal-backdrop .seat-modal-card {
        max-width: 96vw;
        padding: 20px 14px;
    }

    /* Toast notification */
    .toast-notification-gold {
        top: auto;
        bottom: 20px;
        right: 12px;
        left: 12px;
        max-width: none;
        font-size: 0.82rem;
    }
}

/* ---- Teléfono pequeño (≤ 480px) ---- */
@media (max-width: 480px) {
    .blueprint-scroll-wrapper { max-height: 60vh; }
    .sidebar-title { font-size: 0.98rem; }
    .sidebar-total-price { font-size: 1.2rem; }
}
