/* --- 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;
    }
}

/* ============================= */
/* === Professional Tooltip ==== */
/* ============================= */

/* #les-seat-tooltip {
    position: absolute;
    background-color: rgba(33, 33, 33, 0.95); 
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    z-index: 1001; 
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
    transform: translateY(5px); 
    opacity: 0;
}


#les-seat-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%; 
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent rgba(33, 33, 33, 0.95) transparent;
}


.les-tooltip-content .tooltip-title {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #555;
    color: #FFC107; 
}

.les-tooltip-content .tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.les-tooltip-content .tooltip-label {
    color: #ccc;
}

.les-tooltip-content .tooltip-value {
    font-weight: bold;
} */

/* =================================== */
/* === Professional Tooltip (Light) ==== */
/* =================================== */

#les-seat-tooltip {
    position: absolute;
    /* NEW: A professional dark slate background for the content area */
    background-color: #334155; 
    color: #333; /* Default color, will be overridden */
    padding: 0; 
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    z-index: 1001;
    pointer-events: none;
    white-space: nowrap;
    /* MODIFIED: Border color updated for the dark theme */
    border: 1px solid #475569; 
    /* MODIFIED: Shadow adjusted for a dark background */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); 
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    transform: translateY(4px);
    opacity: 0;
    overflow: hidden; 
}

/* The arrow still points to the white header, so this remains unchanged */
#les-seat-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #ffffff transparent; 
    filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.05));
}

/* The header styles remain the same (white background, dark text) */
.les-tooltip-content .tooltip-title {
    background-color: #ffffff; 
    font-weight: 600;
    font-size: 1.05em;
    margin: 0; 
    padding: 12px 16px; 
    border-bottom: 1px solid #e2e8f0;
    color: #1a202c;
}

/* The row layout stays the same */
.les-tooltip-content .tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    padding: 4px 16px;
}

.les-tooltip-content .tooltip-row:first-of-type {
    padding-top: 12px;
}
.les-tooltip-content .tooltip-row:last-of-type {
    padding-bottom: 12px;
}

/* NEW: White/light-gray text colors for readability on the dark background */
.les-tooltip-content .tooltip-label {
    color: #cbd5e1; /* A softer, light gray for the label */
}

.les-tooltip-content .tooltip-value {
    font-weight: 500;
    color: #f1f5f9; /* A brighter, off-white for the value */
}

/* ===================================== */
/* === Professional Tooltip (Refined Dark) ==== */
/* ===================================== */

/* #les-seat-tooltip {
    position: absolute;
    background-color: #2d3748; 
    color: #e2e8f0; 
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    z-index: 1001;
    pointer-events: none;
    white-space: nowrap;
    border: 1px solid #4a5568; 
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); 
    transition: opacity 0.2s ease-out, transform 0.2s ease-out;
    transform: translateY(4px);
    opacity: 0;
}


#les-seat-tooltip::after {
    content: '';
    position: absolute;
    bottom: 100%; 
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #2d3748 transparent; 
}


.les-tooltip-content .tooltip-title {
    font-weight: 600;
    font-size: 1.05em;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #4a5568; 
    color: #ffffff; 
}

.les-tooltip-content .tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 25px;
}

.les-tooltip-content .tooltip-label {
    color: #a0aec0; 
}

.les-tooltip-content .tooltip-value {
    font-weight: 500;
    color: #e2e8f0; 
} */