/* ---- Seat map — polished theater chairs ---- */
.seat-map-container {
    --seat-avail-fill: #1f9d6a;
    --seat-avail-deep: #157a52;
    --seat-sel-fill: #1aabb8;
    --seat-sel-deep: #12808a;
    --seat-lock-fill: #e0a800;
    --seat-lock-deep: #b8860b;
    --seat-sold-fill: #9aa3af;
    --seat-sold-deep: #6b7280;
    --seat-vip-fill: #b45309;
    --seat-vip-deep: #7c2d12;
    --seat-lux-fill: #7c3aed;
    --seat-lux-deep: #5b21b6;
}

.seat-map-stage {
    position: relative;
    background:
        radial-gradient(ellipse 80% 120% at 50% 0%, rgba(255, 220, 160, 0.28), transparent 55%),
        linear-gradient(180deg, #0b2740 0%, #051c33 100%);
    color: #f8fafc;
    padding: 14px 16px 18px;
    border-radius: 14px 14px 40% 40% / 14px 14px 28px 28px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.35em;
    text-indent: 0.35em;
    box-shadow:
        inset 0 -10px 18px rgba(0, 0, 0, 0.35),
        0 8px 20px rgba(5, 28, 51, 0.18);
    overflow: hidden;
}
.seat-map-stage::after {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    bottom: 4px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255, 214, 140, 0.75), transparent);
}
.seat-map-scroll {
    overflow-x: auto;
    padding: 18px 8px 10px;
    max-height: 480px;
    overflow-y: auto;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(33, 192, 192, 0.06), transparent 50%),
        linear-gradient(180deg, #f8fafc, #eef2f7);
    border-radius: 12px;
    border: 1px solid #e5ebf2;
}
.seat-map-loading .spinner-border {
    color: #21c0c0 !important;
}
.seat-row {
    gap: 0.4rem !important;
    margin-bottom: 0.55rem !important;
}
.seat-row-label {
    width: 30px;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-align: center;
}
.seat-aisle {
    width: 16px;
    flex-shrink: 0;
}
.seat-blocked {
    width: 38px;
    height: 42px;
    flex-shrink: 0;
    visibility: hidden;
}
.seat-map-stage-bottom {
    margin-top: 10px;
}

/* Chair button with SVG */
.seat-btn,
.seat-legend {
    --seat-fill: var(--seat-avail-fill);
    --seat-deep: var(--seat-avail-deep);
    --seat-text: #fff;
    position: relative;
    width: 38px;
    height: 42px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--seat-text);
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
    transition: transform 0.15s cubic-bezier(.2, .8, .2, 1), filter 0.15s ease;
}

.seat-btn__icon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 3px 4px rgba(5, 28, 51, 0.22));
    transition: filter 0.15s ease;
}
.seat-btn__icon .seat-body {
    fill: var(--seat-fill);
}
.seat-btn__icon .seat-shade {
    fill: var(--seat-deep);
}
.seat-btn__icon .seat-stroke {
    stroke: rgba(0, 0, 0, 0.18);
    stroke-width: 0.8;
    fill: none;
}
.seat-btn__icon .seat-shine {
    fill: rgba(255, 255, 255, 0.28);
}

.seat-btn__num {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding-bottom: 7px;
    pointer-events: none;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    letter-spacing: -0.02em;
}

.seat-btn:not(:disabled):hover {
    transform: translateY(-3px) scale(1.08);
    z-index: 3;
}
.seat-btn:not(:disabled):hover .seat-btn__icon {
    filter: drop-shadow(0 6px 8px rgba(5, 28, 51, 0.28)) brightness(1.06);
}
.seat-btn:not(:disabled):active {
    transform: translateY(-1px) scale(0.98);
}

.seat-legend {
    display: inline-flex;
    vertical-align: middle;
    margin: 0 2px 0 8px;
    cursor: default;
    width: 26px;
    height: 30px;
    pointer-events: none;
}
.seat-legend .seat-btn__num {
    display: none;
}
.seat-map-legend {
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    color: #475569;
}
.seat-map-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
}

.seat-available {
    --seat-fill: var(--seat-avail-fill);
    --seat-deep: var(--seat-avail-deep);
    --seat-text: #fff;
}
.seat-selected {
    --seat-fill: var(--seat-sel-fill) !important;
    --seat-deep: var(--seat-sel-deep) !important;
    --seat-text: #fff !important;
}
.seat-selected .seat-btn__icon {
    filter: drop-shadow(0 0 6px rgba(26, 171, 184, 0.55)) drop-shadow(0 4px 8px rgba(18, 128, 138, 0.45));
}
.seat-selected::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 10px;
    border: 2px solid rgba(26, 171, 184, 0.55);
    pointer-events: none;
    animation: seat-pulse 1.4s ease-in-out infinite;
}
@keyframes seat-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}
.seat-locked {
    --seat-fill: var(--seat-lock-fill);
    --seat-deep: var(--seat-lock-deep);
    --seat-text: #3f2e00;
    cursor: not-allowed;
}
.seat-sold {
    --seat-fill: var(--seat-sold-fill);
    --seat-deep: var(--seat-sold-deep);
    --seat-text: #f8fafc;
    cursor: not-allowed;
    opacity: 0.78;
}
.seat-sold .seat-btn__icon {
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15)) grayscale(0.35);
}
.seat-vip:not(.seat-sold):not(.seat-locked) {
    --seat-fill: var(--seat-vip-fill);
    --seat-deep: var(--seat-vip-deep);
    --seat-text: #fff7ed;
}
.seat-vip:not(.seat-sold):not(.seat-locked) .seat-btn__icon .seat-shine {
    fill: rgba(253, 230, 138, 0.45);
}
.seat-luxury:not(.seat-sold):not(.seat-locked) {
    --seat-fill: var(--seat-lux-fill);
    --seat-deep: var(--seat-lux-deep);
    --seat-text: #f5f3ff;
}
.seat-disabled:not(.seat-sold) {
    --seat-fill: #2563eb;
    --seat-deep: #1d4ed8;
    --seat-text: #eff6ff;
}
.seat-btn:disabled {
    cursor: not-allowed;
}

.seat-map-footer {
    border: 1px solid #e9ecef;
    border-radius: 12px;
}

/* Floor-plan absolute layout */
.seat-map-floorplan-wrap {
    overflow: auto;
    max-height: 70vh;
    border: 1px solid #e3e8ee;
    border-radius: 12px;
    background: #0f172a;
}
.seat-map-floorplan {
    position: relative;
    display: inline-block;
    min-width: 100%;
}
.seat-map-floorplan__img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    user-select: none;
    pointer-events: none;
}
.seat-map-floorplan__seats {
    position: absolute;
    inset: 0;
}
.seat-map-floorplan__seat {
    position: absolute;
    margin: -21px 0 0 -19px;
    z-index: 2;
}

@media (max-width: 576px) {
    .seat-btn {
        width: 32px;
        height: 36px;
        font-size: 0.52rem;
    }
    .seat-legend {
        width: 22px;
        height: 26px;
    }
    .seat-blocked {
        width: 32px;
        height: 36px;
    }
    .seat-map-floorplan__seat {
        margin: -18px 0 0 -16px;
    }
    .seat-btn__num {
        padding-bottom: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .seat-selected::after {
        animation: none;
    }
    .seat-btn,
    .seat-btn__icon {
        transition: none;
    }
}
