/* Estilos para el selector de asientos */
.csb-seat-selector {
    background: linear-gradient(180deg, #f7f2ff 0%, #ffffff 100%);
    border-radius: 0.75rem;
    padding: 2.25rem;
    box-shadow: 0 24px 50px rgba(35, 9, 68, 0.08);
    margin-bottom: 2rem;
    border: 1px solid #ede7ff;
}

.csb-seat-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.csb-zoom-button {
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    color: #3f1673;
}

.csb-zoom-button:hover {
    background: #f5f0ff;
    border-color: #d7c7f7;
    color: #3f1673;
}

.csb-zoom-level {
    font-size: 0.875rem;
    color: #6b7280;
    min-width: 60px;
    text-align: center;
}

.csb-seat-grid-container {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.25rem;
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    max-height: none;
}

.csb-screen-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    padding: 0.35rem 0.75rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #2f0c53, #4b1680);
    color: #fdfcff;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 22px rgba(35, 9, 68, 0.3);
    text-transform: uppercase;
    pointer-events: none;
    z-index: 2;
}

.csb-seat-grid {
    color: #111827;
    font-size: 0.875rem;
    display: grid;
    row-gap: 14px;
    position: relative;
    transform-origin: top left;
    margin: 0 auto;
    width: max-content;
    --csb-responsive-scale: 1;
    --csb-zoom-scale: 1;
    transform: scale(calc(var(--csb-responsive-scale) * var(--csb-zoom-scale)));
}

.csb-screen {
    grid-column: 1 / -1;
    justify-self: center;
    padding: 0.5rem 1.5rem;
    border: 1px solid #6ee7ff;
    color: #6ee7ff;
    border-radius: 6px;
    letter-spacing: 2px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.csb-seat-row {
    display: grid;
    grid-template-columns: 32px repeat(17, 40px);
    align-items: center;
    column-gap: 6px;
}

.csb-row-grid {
    grid-column: 2 / span 17;
    display: grid;
    grid-template-columns: repeat(17, 40px);
    gap: 6px;
}

.csb-seat {
    width: 38px;
    height: 38px;
    border-radius: 6px;
    border: 1px solid #1a0f33;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #230944 !important;
    color: #f9fafb !important;
    box-shadow:
        0 6px 12px rgba(35, 9, 68, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Asientos disponibles */
.csb-seat.available {
    background: #230944 !important;
    border-color: #1a0f33 !important;
    color: #fdfcff !important;
}

.csb-seat.available:hover {
    background: linear-gradient(145deg, #3f1673, #2d0d4b) !important;
    border-color: #2d0d4b !important;
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 10px 20px rgba(63, 22, 115, 0.35),
        0 0 0 4px rgba(45, 13, 75, 0.18);
}

/* Asientos ocupados */
.csb-seat.occupied {
    background: var(--csb-neutral-light);
    color: var(--csb-neutral);
    cursor: not-allowed;
    border-color: #e5e7eb;
}

/* Asientos seleccionados */
.csb-seat.selected {
    background: #fbbf24;
    color: #1f1302;
    border-color: #f59e0b;
    transform: translateY(-2px) scale(1.05);
    box-shadow:
        0 16px 28px rgba(245, 158, 11, 0.3),
        0 0 0 4px rgba(251, 191, 36, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* Asientos reservados temporalmente */
.csb-seat.reserved {
    background: #e5e7eb !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
    cursor: not-allowed;
    box-shadow: none;
}

/* Gap entre secciones (para filas D, C, B) */
.csb-seat-gap {
    width: 2.6rem;
    visibility: hidden;
}

/* Asiento accesible (fila A) */
.csb-seat.accessible {
    position: relative;
}

.csb-seat.accessible::after {
    content: '♿';
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 0.625rem;
    background: white;
    border-radius: 50%;
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.csb-row-label {
    color: #9ca3af;
    font-weight: 700;
    letter-spacing: 1px;
    min-width: 1.5rem;
}

.csb-seat.missing {
    background: #4b5563;
    border-color: #6b7280;
    color: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
}

/* Contador de asientos seleccionados */
.csb-selected-count {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f1ecff;
    border-radius: 0.375rem;
    border: 1px solid #e4dbff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.csb-selected-count-text {
    font-size: 1rem;
    font-weight: 600;
    color: #230944;
}

.csb-selected-count-limit {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Lista de asientos seleccionados */
.csb-selected-seats-list {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #e4dbff;
}

.csb-selected-seats-list h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.csb-selected-seats-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.csb-selected-seat-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: #230944;
    color: white;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.csb-remove-seat {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.csb-remove-seat:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Niveles de zoom */
.csb-seat-grid[data-zoom="75"] {
    --csb-zoom-scale: 0.75;
}

.csb-seat-grid[data-zoom="100"] {
    --csb-zoom-scale: 1;
}

.csb-seat-grid[data-zoom="125"] {
    --csb-zoom-scale: 1.25;
}

.csb-seat-grid[data-zoom="150"] {
    --csb-zoom-scale: 1.5;
}

/* Responsive */
@media (max-width: 1024px) {
    .csb-seat-selector {
        padding: 1.5rem;
    }
    .csb-seat-grid-container {
        padding: 1rem;
        justify-content: flex-start;
        max-height: none;
    }
    .csb-screen-badge {
        top: 8px;
        right: 10px;
    }
    .csb-seat-grid {
        --csb-responsive-scale: 0.9;
    }
}

@media (max-width: 768px) {
    .csb-seat {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }
    .csb-row-grid {
        grid-template-columns: repeat(17, 32px);
        gap: 4px;
    }
    .csb-seat-row {
        grid-template-columns: 28px repeat(17, 32px);
    }
    .csb-seat-selector {
        padding: 1rem;
    }
    .csb-zoom-button {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    .csb-seat-controls {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .csb-seat-grid-container {
        padding: 0.875rem;
        align-items: center;
        max-height: 70vh;
        overflow-y: auto;
    }
    .csb-screen-badge {
        font-size: 0.68rem;
        padding: 0.3rem 0.65rem;
    }
    .csb-seat-grid {
        --csb-responsive-scale: 0.8;
        transform-origin: top left;
        margin-top: 12px;
        row-gap: 16px;
    }
    .csb-row-grid {
        gap: 8px;
        justify-items: center;
    }
}

@media (max-width: 600px) {
    .csb-seat-grid-container {
        padding: 0.75rem;
        align-items: center;
        max-height: 70vh;
        overflow-y: auto;
    }
    .csb-seat-grid {
        --csb-responsive-scale: 0.7;
        margin-top: 14px;
        row-gap: 18px;
    }
    .csb-row-grid {
        gap: 9px;
        justify-items: center;
    }
}

@media (max-width: 480px) {
    .csb-seat-grid-container {
        padding: 0.65rem;
        align-items: center;
        max-height: 70vh;
        overflow-y: auto;
    }
    .csb-seat {
        width: 28px;
        height: 28px;
        font-size: 0.55rem;
    }
    .csb-row-grid {
        grid-template-columns: repeat(17, 28px);
        gap: 3px;
    }
    .csb-seat-row {
        grid-template-columns: 24px repeat(17, 28px);
    }
    .csb-seat-grid {
        --csb-responsive-scale: 0.62;
        margin-top: 16px;
        row-gap: 18px;
    }
    .csb-row-grid {
        gap: 10px;
        justify-items: center;
    }
}



