/* ─── Seat Picker: Front-End Styles ──────────────────────── */

.ia-seat-selector-field {
    margin: 10px 0;
}

/* ─── Legend ───────────────────────────────────────────── */

.ia-seat-legend {
    display: flex;
    gap: 16px;
    margin-top: 25px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ia-seat-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 19.5px;
    color: #444;
}

.ia-seat-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ia-seat-legend-pan-note {
    display: none;
    font-size: 15px;
    color: #888;
    font-style: italic;
    margin-left: auto;
    align-self: center;
}

/* ─── SVG Container ────────────────────────────────────── */

.ia-seat-svg-container {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: #fafafa;
    overflow: visible;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

/* Mobile: constrain height and enable pan/zoom */
@media (max-width: 900px) {
    .ia-seat-svg-container {
        max-height: 50vh;
        touch-action: none;
    }
    .ia-seat-svg-container:active {
        cursor: grabbing;
    }
    .ia-seat-legend-pan-note {
        display: inline;
    }
}

.ia-seat-svg-inner {
    transform-origin: 0 0;
    will-change: transform;
    display: block;
    width: 100%;
}

.ia-seat-svg-container svg {
    width: 100%;
    height: auto;
    display: block;
}

.ia-seat-loading {
    text-align: center;
    color: #888;
    padding: 40px;
}

.ia-seat-map-overlay {
    position: absolute;
    inset: 0;
    background: rgba(250, 250, 250, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 6px;
}

.ia-seat-map-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #ccc;
    border-top-color: #555;
    border-radius: 50%;
    animation: ia-seat-spin 0.75s linear infinite;
}

@keyframes ia-seat-spin {
    to { transform: rotate(360deg); }
}

.ia-seat-prompt {
    text-align: center;
    color: #666;
    padding: 40px;
    font-style: italic;
}

/* ─── Seat Element States ──────────────────────────────── */

/* Available: clickable, green-ish */
.ia-seat--available {
    fill: #4caf50 !important;
    cursor: pointer;
    transform-origin: center;
    transform-box: fill-box;
    transition: fill 0.2s ease, transform 0.15s ease;
}

.ia-seat--available:hover {
    fill: #66bb6a !important;
    transform: scale(1.15);
    filter: drop-shadow(0 0 4px rgba(76, 175, 80, 0.5));
}

/* Selected by current user: blue */
.ia-seat--selected {
    fill: #2196f3 !important;
    cursor: pointer;
    transform-origin: center;
    transform-box: fill-box;
    transition: fill 0.2s ease, transform 0.15s ease;
    filter: drop-shadow(0 0 4px rgba(33, 150, 243, 0.5));
}

.ia-seat--selected:hover {
    fill: #42a5f5 !important;
}

/* Unavailable (reserved by someone else, or booked) */
.ia-seat--unavailable {
    fill: #9e9e9e !important;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

/* Admin-set Unavailable: original SVG appearance, no interaction */
.ia-seat--unavailable-admin {
    cursor: default !important;
    pointer-events: none;
    filter: none !important;
    transform: none !important;
    transition: none !important;
}

/* ─── Selection Summary ────────────────────────────────── */

.ia-seat-selection-summary {
    margin-top: 10px;
    padding: 20px 15px 8px;
    background: #f0f7ff;
    border: 1px solid #cce0ff;
    border-radius: 6px;
    font-size: 14px;
    color: #1a3e5c;
}

.ia-seat-selection-summary .ia-seat-count {
    font-weight: 700;
    font-size: 16px;
}

.ia-seat-selection-summary .ia-seat-max {
    color: #6b7c8d;
    font-size: 13px;
}

.ia-seat-remove-all-btn {
    margin-left: 10px;
    padding: 2px 10px;
    font-size: 12px;
    color: #c0392b;
    background: transparent;
    border: 1px solid #c0392b;
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
}
.ia-seat-remove-all-btn:hover {
    background: #c0392b;
    color: #fff;
}

/* ─── Selected Seat List ───────────────────────────────── */

.ia-seat-selected-list {
    list-style: decimal;
    margin: 8px 0 0;
    padding-left: 20px;
}

.ia-seat-selected-list .ia-seat-selected-item {
    list-style: decimal;
}

.ia-seat-selected-item {
    position: relative;
    padding: 8px 0 8px 54px;
    font-size: 1.25em;
    line-height: 1.6;
}

.ia-seat-selected-item + .ia-seat-selected-item {
    border-top: 1px solid #dceeff;
    margin-top: 4px;
}

.ia-seat-selected-item:last-child {
    padding-bottom: 0;
}

.ia-seat-selected-label {
    display: inline;
    margin-left: 8px;
    margin-right: 4px;
}

/* ─── Option Dropdowns (per selected seat) ─────────────── */

.ia-seat-option-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.ia-seat-option-label {
    color: #4a6278;
    white-space: nowrap;
}

.ia-seat-option-select {
    padding: 2px 4px;
    border: 1px solid #b0c8e0;
    border-radius: 3px;
    background: #fff;
    color: #1a3e5c;
}

.ia-seat-remove-btn {
    position: absolute;
    left: 0;
    top: 10px;
    background: #c0392b !important;
    border: none;
    color: #fff !important;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.15s;
}

.ia-seat-remove-btn:hover {
    background: #96281b !important;
}

/* ─── Quantity inputs locked by seat option mappings ───── */

.ia-seat-qty-locked {
    background: #f0f0f1 !important;
    color: #8c8f94 !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

/* ─── Tooltip ──────────────────────────────────────────── */

.ia-seat-tooltip {
    position: absolute;
    background: #00a69c;
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 20px;
    font-weight: 500;
    pointer-events: none;
    z-index: 100000;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ia-seat-tooltip--selected {
    background: #2196f3;
}

.ia-tooltip-label {
    display: block;
}

.ia-tooltip-selected {
    display: block;
    font-size: 13px;
    font-weight: 400;
    opacity: 0.9;
}

.ia-seat-tooltip-visible {
    opacity: 1;
}
