/* --- Main Container --- */
.seating-plan-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
}

.seating-map-wrapper {
    flex: 1;
    min-width: 300px;
    /* overflow-x: auto; */
    overflow: hidden; /* Change from 'auto' to 'hidden' for cleaner panning */
    position: relative; /* Required for positioning child controls */
    border: 1px solid #eee;
    background-color: #fcfcfc;
}

#seating-map-svg {
    width: 100%;
   
    height: 100%;
    cursor: grab;
}

#seating-map-svg:active {
    cursor: grabbing;
}

.seating-summary-wrapper {
    flex-basis: 250px;
    border-left: 1px solid #eee;
    padding-left: 20px;
}

/* --- SVG Element Styles --- */
.table-shape {
    fill: #f0f0f0;
    stroke: #aaa;
    stroke-width: 1;
    cursor: pointer;
}
.table-shape:hover {
    stroke: #2271b1;
    stroke-width: 2px;
}

.table-label, .stage-label {
    /* font-size: 14px;fill: #555; */
    font-weight: bold;
    
    text-anchor: middle;
    dominant-baseline: central;
    pointer-events: none; /* Make text non-interactive */
}
.ga-area-label {
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}
.stage-shape {
    fill: #e0e0e0;
    stroke: #999;
}

/* --- Seat Styles --- */
.seat {
    stroke: #555;
    stroke-width: 1;
    /* transition: all 0.2s ease-in-out; */
    transition: transform 0.2s ease-in-out, fill 0.2s ease-in-out;
    transform-origin: center;
    transform-box: fill-box;
}

.seat.available {
    fill: #4CAF50; /* Green */
    cursor: pointer;
}
/* .seat.available:hover {
    fill: #66BB6A;
    transform: scale(1.2);
    
} */

.seat.selected {
    fill: #FFC107; /* Amber */
    stroke: #E65100;
    stroke-width: 2px;
}

.seat.in-progress {
    fill: #ff9800; /* Orange */
    cursor: not-allowed;
}

.seat.booked {
    fill: #BDBDBD; /* Grey */
    cursor: not-allowed;
}

.seat.unavailable {
    fill: #F44336; /* Red */
    cursor: not-allowed;
}

/* --- Summary & Controls --- */
.seating-summary-wrapper h3 {
    margin-top: 0;
}
#selected-seats-list {
    list-style-type: none;
    padding: 0;
    margin: 10px 0;
    max-height: 200px;
    overflow-y: auto;
}
#selected-seats-list li {
    background: #f9f9f9;
    padding: 5px 8px;
    border-radius: 3px;
    margin-bottom: 5px;
}
.summary-total {
    font-size: 1.2em;
    margin: 15px 0;
}
.error-message {
    color: #d32f2f;
    font-size: 0.9em;
    min-height: 20px;
    margin-bottom: 10px;
}

/* === NEW LEGEND STYLES === */
.seating-legend {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.seating-legend h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1em;
}
.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9em;
}
.legend-color {
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid #757575;
}

/* === END NEW LEGEND STYLES === */
/* Make the whole table clickable */
.whole-table-booking .table-shape {
    cursor: pointer;
}
.whole-table-booking .table-shape:hover {
    stroke: #2271b1;
    stroke-width: 2px;
}

/* Make individual seats on these tables NOT clickable */
.whole-table-seat {
    pointer-events: none;
}

/* ===  Frontend Zoom Controls Styles === */
.les-view-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 5px;
}
.les-zoom-btn {
    background: #fff !important;
    border: 1px solid #ccc !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    line-height: 34px !important;
}
.les-zoom-btn .dashicons {
    font-size: 18px;
    vertical-align: middle;
}
/* ======================================= */
/* --- Responsiveness --- */
@media (max-width: 768px) {
    .seating-plan-container {
        flex-direction: column;
    }
    .seating-summary-wrapper {
        border-left: none;
        border-top: 1px solid #eee;
        padding-left: 0;
        padding-top: 20px;
        flex-basis: auto;
    }
}