/* ---- Seat map — theater chair style ---- */
.seat-map-stage {
    background: linear-gradient(180deg, #051c33, #0a2d4d);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    letter-spacing: 2px;
    box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.2);
}
.seat-map-scroll {
    overflow-x: auto;
    padding: 14px 6px;
    max-height: 440px;
    overflow-y: auto;
}
.seat-map-loading .spinner-border {
    color: #21c0c0 !important;
}
.seat-row {
    gap: 0.35rem !important;
    margin-bottom: 0.45rem !important;
}
.seat-row-label {
    width: 28px;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: #666;
    text-align: center;
}
.seat-aisle {
    width: 14px;
    flex-shrink: 0;
}
.seat-blocked {
    width: 34px;
    height: 38px;
    flex-shrink: 0;
    visibility: hidden;
}
.seat-map-stage-bottom {
    margin-top: 8px;
}

/* Chair button */
.seat-btn,
.seat-legend {
    --seat-fill: #d4edda;
    --seat-edge: #28a745;
    --seat-text: #0f5132;
    position: relative;
    width: 34px;
    height: 38px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--seat-text);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.12s ease, filter 0.12s ease;
}

.seat-btn__num {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding-bottom: 5px;
    pointer-events: none;
}

/* Backrest */
.seat-btn::before,
.seat-legend::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 0;
    left: 5px;
    right: 5px;
    height: 13px;
    border-radius: 8px 8px 3px 3px;
    background: var(--seat-fill);
    border: 1.5px solid var(--seat-edge);
    border-bottom: none;
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

/* Seat cushion + side arms */
.seat-btn::after,
.seat-legend::after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 1px;
    right: 1px;
    bottom: 1px;
    height: 22px;
    border-radius: 5px 5px 7px 7px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 45%),
        var(--seat-fill);
    border: 1.5px solid var(--seat-edge);
    box-shadow:
        -3px 4px 0 -1px var(--seat-fill),
        3px 4px 0 -1px var(--seat-fill),
        -3px 4px 0 0 var(--seat-edge),
        3px 4px 0 0 var(--seat-edge),
        0 2px 4px rgba(5, 28, 51, 0.18);
}

.seat-btn:not(:disabled):hover {
    transform: translateY(-2px) scale(1.06);
    filter: brightness(1.05);
    z-index: 2;
}

.seat-btn:not(:disabled):active {
    transform: translateY(0) scale(0.98);
}

.seat-legend {
    display: inline-block;
    vertical-align: middle;
    margin: 0 4px 0 10px;
    cursor: default;
    width: 28px;
    height: 32px;
    pointer-events: none;
}

.seat-available {
    --seat-fill: #d8f3e0;
    --seat-edge: #2f9e5b;
    --seat-text: #146c43;
}
.seat-selected {
    --seat-fill: #21c0c0 !important;
    --seat-edge: #178f8f !important;
    --seat-text: #fff !important;
}
.seat-locked {
    --seat-fill: #ffe8a3;
    --seat-edge: #e0a800;
    --seat-text: #664d03;
    cursor: not-allowed;
}
.seat-sold {
    --seat-fill: #f5c2c7;
    --seat-edge: #b02a37;
    --seat-text: #842029;
    cursor: not-allowed;
    opacity: 0.72;
    filter: grayscale(0.25);
}
.seat-vip:not(.seat-sold):not(.seat-locked) {
    --seat-fill: #f3e7de;
    --seat-edge: #5c2d1b;
    --seat-text: #5c2d1b;
}
.seat-vip:not(.seat-sold):not(.seat-locked)::after {
    box-shadow:
        -3px 4px 0 -1px var(--seat-fill),
        3px 4px 0 -1px var(--seat-fill),
        -3px 4px 0 0 var(--seat-edge),
        3px 4px 0 0 var(--seat-edge),
        inset 0 0 0 2px rgba(92, 45, 27, 0.35),
        0 2px 4px rgba(5, 28, 51, 0.18);
}
.seat-luxury:not(.seat-sold):not(.seat-locked) {
    --seat-fill: #ead6f5;
    --seat-edge: #8e44ad;
    --seat-text: #6c3483;
}
.seat-disabled:not(.seat-sold) {
    --seat-fill: #cfe2ff;
    --seat-edge: #0d6efd;
    --seat-text: #084298;
}
.seat-btn:disabled {
    cursor: not-allowed;
}

.seat-map-legend {
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.35rem;
}
.seat-map-footer {
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

@media (max-width: 576px) {
    .seat-btn {
        width: 28px;
        height: 32px;
        font-size: 0.55rem;
    }
    .seat-legend {
        width: 24px;
        height: 28px;
    }
    .seat-blocked {
        width: 28px;
        height: 32px;
    }
}
