/* Hi-fi seatmap modal — overlays the page on Choose/Change seat. */

.sw-seatmap-overlay {
    position: fixed;
    inset: 0;
    background: rgba(13, 27, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 9000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 32px 16px;
    animation: sw-fade-in 160ms ease-out;
}
@keyframes sw-fade-in { from { opacity: 0; } to { opacity: 1; } }

.sw-seatmap-card {
    background: #fff;
    color: #0D1B2A;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    /* No flex column — block layout is enough and avoids the
       flex:1 1 auto + intrinsic-auto-size collapse. The scroll
       wrapper gets its own max-height so tall cabins scroll
       internally without dragging the modal off-screen. */
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.sw-seatmap-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 1;
}
.sw-seatmap-close:hover { color: #0D1B2A; }

.sw-seatmap-head {
    padding: 22px 24px 12px;
    border-bottom: 1px solid #eef2f6;
}
.sw-seatmap-head h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
}
.sw-seatmap-head p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sw-seatmap-current-tag {
    background: rgba(20, 184, 166, 0.15);
    color: #0d9488;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-left: auto;
}

.sw-seatmap-scroll {
    max-height: calc(100vh - 280px);  /* leaves room for header + legend + confirm bar + outer padding */
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 24px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    text-align: center;
}
.sw-seatmap-svg {
    display: inline-block;
    overflow: visible;
    /* width/height attributes are set on the element by the renderer
       so the SVG occupies its natural aspect ratio inside the scroll
       container. Don't add flex/auto here — they collapse the SVG to
       zero height in nested flex columns on some browsers. */
}

.sw-seatmap-loading {
    padding: 60px 0;
    text-align: center;
    color: #64748b;
}

.sw-seatmap-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    padding: 12px 24px;
    border-top: 1px solid #eef2f6;
    font-size: 12px;
    color: #475569;
}
.sw-seatmap-legend-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.sw-seatmap-legend-dot {
    width: 14px;
    height: 12px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #cbd5e1;
}
.sw-seatmap-legend-dot[data-kind="available"] { background: #fff; border-color: #14b8a6; }
.sw-seatmap-legend-dot[data-kind="selected"]  { background: #0f172a; border-color: #0f172a; }
.sw-seatmap-legend-dot[data-kind="current"]   { background: #14b8a6; border-color: #14b8a6; }
.sw-seatmap-legend-dot[data-kind="occupied"]  { background: #e2e8f0; border-color: #cbd5e1; }
.sw-seatmap-legend-dot[data-kind="other"]     { background: #e2e8f0; opacity: 0.6; }

.sw-seatmap-confirm {
    padding: 16px 24px 20px;
    border-top: 1px solid #eef2f6;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.sw-seatmap-confirm-hint {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}
.sw-seatmap-confirm-label {
    margin: 0;
    font-weight: 600;
    color: #0D1B2A;
}
.sw-seatmap-confirm-btn {
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
}

@media (max-width: 540px) {
    .sw-seatmap-overlay { padding: 0; }
    .sw-seatmap-card { max-height: 100vh; border-radius: 0; }
}
