/* ============================================================
   EYHP - VENUE MAP v4 PRO
   Diseño profesional tipo Ticketmaster
   ============================================================ */

@keyframes fadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@keyframes glow { 0%,100%{box-shadow:0 0 4px rgba(255,215,0,0.3)} 50%{box-shadow:0 0 14px rgba(255,215,0,0.6)} }
@keyframes shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }
@keyframes popIn { from{transform:scale(0.9);opacity:0} to{transform:scale(1);opacity:1} }

.vp { max-width: 1000px; margin: 0 auto; animation: fadeIn 0.5s ease; }

/* ESCENARIO */
.vp-stage {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
    border-radius: 100px 100px 0 0;
    padding: 4px;
    margin: 0 40px;
}
.vp-stage-inner {
    background: linear-gradient(90deg, #c9941a, #FFD700, #f5c842, #FFD700, #c9941a);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    border-radius: 100px 100px 0 0;
    padding: 16px;
    text-align: center;
    color: #1a1a2e;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.vp-stage-icon { font-size: 1.4rem; }

/* ZONA / AREA */
.vp-zone {
    border: 1px solid #e5e7eb;
    border-top: none;
    background: #fff;
    animation: fadeIn 0.4s ease;
}
.vp-zone:last-of-type { border-radius: 0 0 12px 12px; overflow: hidden; }

.vp-zone-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: var(--zone-color);
    color: #fff;
}
.vp-zone-left { display: flex; align-items: center; gap: 10px; }
.vp-zone-name { font-weight: 800; font-size: 1rem; letter-spacing: 1px; }
.vp-zone-tag { background: rgba(255,255,255,0.2); padding: 2px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 600; }
.vp-zone-right { text-align: right; }
.vp-zone-price { font-weight: 800; font-size: 1.1rem; display: inline-block; }
.vp-zone-price-old { display: inline-block; text-decoration: line-through; opacity: 0.55; font-size: 0.85rem; font-weight: 500; margin-right: 6px; }
.vp-zone-rule { display: inline-block; background: #28a745; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 0.65rem; font-weight: 700; margin-left: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.vp-zone-avail { font-size: 0.72rem; opacity: 0.85; display: block; }

/* GRID DE MESAS - modo FILAS: cada fila es una linea, filas apiladas vertical */
.vp-grid-filas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 10px;
}

/* GRID DE MESAS - modo PLANO: todas las mesas fluyen en wrap */
.vp-grid-flat {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 14px 10px;
}

/* FILA individual de mesas - siempre en UNA sola linea horizontal */
.vp-fila {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 4px;
    width: 100%;
}
.vp-fila .vp-seat-wrap { flex-shrink: 1; min-width: 0; }
.vp-fila .vp-seat { width: 100%; min-width: 28px; }

.vp-seat-wrap { position: relative; }

/* MESA - con sillitas a los costados (izquierda/derecha) */
.vp-seat {
    width: 56px;
    border-radius: 5px;
    display: flex;
    flex-direction: row;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.vp-seat:hover { transform: scale(1.15); z-index: 5; }
.vp-seat-num { font-weight: 800; font-size: 0.7rem; padding: 6px 2px; flex: 1; text-align: center; }

/* Sillitas mini - costados */
.vp-mini-left, .vp-mini-right { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 3px 2px; }
.vp-mini-left i, .vp-mini-right i { display: block; width: 5px; height: 8px; border-radius: 1.5px; }

.vp-seat-ok .vp-mini-left i, .vp-seat-ok .vp-mini-right i { background: #6ee7b7; }
.vp-seat-full .vp-mini-left i, .vp-seat-full .vp-mini-right i { background: #fca5a5; }
.vp-seat-partial .vp-mini-left i, .vp-seat-partial .vp-mini-right i { background: #fcd34d; }
.vp-seat-mine .vp-mini-left i, .vp-seat-mine .vp-mini-right i { background: #fbbf24; }

/* Estados mesa */
.vp-seat-ok { background: #ecfdf5; border-color: #86efac; color: #065f46; }
.vp-seat-ok:hover { box-shadow: 0 3px 12px rgba(16,185,129,0.3); }
.vp-seat-ok .vp-seat-num { background: #d1fae5; text-align: center; }
.vp-seat-full { background: #fef2f2; border-color: #fca5a5; color: #991b1b; cursor: default; opacity: 0.55; }
.vp-seat-full .vp-seat-num { background: #fee2e2; text-align: center; }
.vp-seat-partial { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.vp-seat-partial .vp-seat-num { background: #fef3c7; text-align: center; }
.vp-seat-mine { background: #fefce8; border-color: #facc15; color: #854d0e; animation: glow 2s infinite; }
.vp-seat-mine .vp-seat-num { background: #fef08a; text-align: center; }
.vp-seat-open { transform: scale(1.15); border-color: var(--zone-color, #764ba2); box-shadow: 0 4px 16px rgba(0,0,0,0.2); z-index: 10; }

/* POPUP de sillas */
.vp-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 260px;
    overflow: hidden;
    animation: popIn 0.25s ease;
}
.vp-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px; height: 12px;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
}
.vp-popup-head {
    padding: 10px 14px;
    color: #fff;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    line-height: 1.35;
}
.vp-popup-head-text { flex: 1 1 auto; min-width: 0; word-break: normal; overflow-wrap: anywhere; }
.vp-popup-head-text s { white-space: nowrap; }
.vp-popup-head-text strong { white-space: nowrap; }
.vp-popup-close { cursor: pointer; font-size: 1.1rem; opacity: 0.8; flex-shrink: 0; }
.vp-popup-close:hover { opacity: 1; }
.vp-popup-body {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 14px;
}
.vp-popup-hint { text-align: center; font-size: 0.7rem; color: #94a3b8; padding: 0 14px 10px; }

/* SILLA individual */
.vp-chair {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
    user-select: none;
}
.vp-chair:hover { transform: scale(1.2); }

.vp-ch-disponible { background: #10b981; color: #fff; }
.vp-ch-disponible:hover { box-shadow: 0 2px 10px rgba(16,185,129,0.5); }
.vp-ch-selected { background: #FFD700; color: #1e293b; border-color: #b8860b; animation: glow 1.5s infinite; transform: scale(1.1); }
.vp-ch-vendida { background: #ef4444; color: #fff; cursor: not-allowed; }
.vp-ch-reservada { background: #f59e0b; color: #fff; cursor: not-allowed; }
.vp-ch-bloqueada { background: #9ca3af; color: #fff; cursor: not-allowed; }

/* LEYENDA */
.vp-legend {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 18px;
    margin-top: 16px; padding: 12px; font-size: 0.8rem; color: #64748b;
}
.vp-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: middle; }
.vp-c-ok { background: #10b981; }
.vp-c-mine { background: #FFD700; }
.vp-c-full { background: #ef4444; }
.vp-c-partial { background: #f59e0b; }

/* ============================================================
   SELECTION PANEL (sidebar derecho)
   ============================================================ */
.venue-container { display: flex; gap: 24px; max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.venue-map-wrap { flex: 1; min-width: 0; }
.selection-panel { width: 340px; flex-shrink: 0; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; }
.selection-card { background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); padding: 20px; border: 1px solid #e5e7eb; }
.selection-card h5 { font-size: 1rem; font-weight: 700; color: #0f172a; margin-bottom: 14px; }
.selection-items { max-height: 280px; overflow-y: auto; }
.selection-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 0.85rem; }
.selection-item .item-info { color: #334155; }
.selection-item .item-info small { color: #94a3b8; display: block; font-size: 0.75rem; }
.selection-item .item-price { font-weight: 700; color: #764ba2; white-space: nowrap; margin: 0 8px; }
.selection-item .item-remove { color: #ef4444; cursor: pointer; background: none; border: none; font-size: 1rem; padding: 0 4px; }
.selection-total { padding: 12px 0; border-top: 2px solid #764ba2; margin-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.selection-total .label { font-weight: 600; color: #334155; }
.selection-total .amount { font-size: 1.4rem; font-weight: 800; color: #764ba2; }
.timer-bar { text-align: center; padding: 10px; background: #fef3c7; border-radius: 8px; margin-bottom: 12px; font-weight: 700; color: #92400e; font-size: 0.9rem; }
.timer-bar.urgent { background: #fee2e2; color: #991b1b; animation: glow 1s infinite; }
.btn-proceder { width: 100%; background: linear-gradient(135deg, #764ba2, #667eea); color: #fff; border: none; border-radius: 12px; padding: 14px; font-size: 1rem; font-weight: 700; cursor: pointer; margin-top: 12px; transition: all 0.2s; }
.btn-proceder:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(118,75,162,0.3); }
.btn-proceder:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.selection-empty { text-align: center; padding: 20px; color: #94a3b8; font-size: 0.9rem; }
.selection-empty i { font-size: 1.5rem; display: block; margin-bottom: 8px; }
.social-proof { text-align: center; padding: 8px; font-size: 0.78rem; color: #94a3b8; }
.social-proof strong { color: #764ba2; }
.venue-breadcrumb { display: none; }
.venue-legend { display: none; } /* Ya tenemos la del venue */

/* CARRITO FLOTANTE */
.cart-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, #764ba2, #667eea);
    color: #fff; padding: 14px 24px; border-radius: 50px;
    box-shadow: 0 6px 25px rgba(118,75,162,0.4);
    cursor: pointer; font-weight: 700; font-size: 0.95rem;
    text-decoration: none; font-family: Inter, sans-serif;
    transition: all 0.2s;
}
.cart-float:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 8px 30px rgba(118,75,162,0.5); color: #fff; }
.cart-badge { background: #FFD700; color: #1e293b; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 800; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .venue-container { flex-direction: column; padding: 0 10px; }
    .selection-panel { width: 100%; position: relative; order: -1; margin-bottom: 10px; }
    .selection-card { border-radius: 12px; padding: 14px; }
    .selection-card h5 { font-size: 0.9rem; }
    .selection-items { max-height: 150px; }
    .selection-total .amount { font-size: 1.2rem; }
    .btn-proceder { padding: 12px; font-size: 0.9rem; }
    .venue-map-wrap { padding-bottom: 10px; }
    .vp { margin: 0 -5px; }
    .vp-seat { width: 38px; }
    .vp-fila .vp-seat { min-width: 24px; }
    .vp-seat-num { font-size: 0.55rem; padding: 2px 0; }
    .vp-mini-left i, .vp-mini-right i { width: 4px; height: 5px; }
    .vp-grid-filas { gap: 4px; padding: 8px 4px; }
    .vp-grid-flat { gap: 3px; padding: 8px 4px; }
    .vp-fila { gap: 2px; }
    .vp-chair { width: 28px; height: 28px; font-size: 0.6rem; }
    .vp-popup {
        min-width: 280px;
        position: fixed;
        top: auto; bottom: 42vh;
        left: 50%;
        transform: translateX(-50%);
        max-width: 92vw;
        width: max-content;
    }
    .vp-popup::before { display: none; }
    .vp-popup-head { font-size: 0.78rem; padding: 9px 12px; }
    .vp-stage-inner { padding: 8px; font-size: 0.75rem; letter-spacing: 1.5px; }
    .vp-stage { margin: 0 12px; }
    .vp-stage-icon { font-size: 1rem; }
    .vp-zone-bar { padding: 6px 10px; }
    .vp-zone-name { font-size: 0.8rem; letter-spacing: 0.5px; }
    .vp-zone-tag { font-size: 0.6rem; padding: 2px 6px; }
    .vp-zone-price { font-size: 0.85rem; }
    .vp-zone-avail { font-size: 0.65rem; }
    .vp-legend { gap: 10px; font-size: 0.72rem; padding: 8px; }
    .cart-float { bottom: 16px; right: 16px; padding: 10px 16px; font-size: 0.82rem; }
    .cart-badge { width: 22px; height: 22px; font-size: 0.7rem; }
    .timer-bar { font-size: 0.8rem; padding: 8px; }
}
@media (max-width: 400px) {
    .vp-seat { width: 32px; }
    .vp-fila .vp-seat { min-width: 20px; }
    .vp-mini-left, .vp-mini-right { padding: 1px 1px; }
    .vp-mini-top i, .vp-mini-bot i { width: 4px; height: 3px; }
    .vp-grid-filas { gap: 3px; padding: 6px 3px; }
    .vp-grid-flat { gap: 2px; padding: 6px 3px; }
    .vp-fila { gap: 1px; }
    .vp-chair { width: 26px; height: 26px; font-size: 0.55rem; }
    .vp-stage { margin: 0 6px; }
}
