/* SVG Seat Visualization Styles */

.seating-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.seating-header {
    text-align: center;
    margin-bottom: 30px;
}

.seating-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.venue-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.back-button {
    background-color: var(--border-color);
    color: var(--dark-text);
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background-color: #95a5a6;
}

/* Legend Styles */
.legend {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.legend h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #333;
}

.legend-color.available {
    background-color: #90EE90;
}

.legend-color.occupied {
    background-color: #FFB6C1;
}

.legend-color.canceled {
    background-color: #D3D3D3;
}

/* SVG Container */
.svg-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: auto;
}

#seatingSVG {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

/* SVG Elements */
.table-label {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    fill: #2c3e50;
    text-anchor: middle;
    dominant-baseline: central;
}

.seat {
    cursor: pointer;
    transition: all 0.3s ease;
}

.seat:hover {
    stroke-width: 3;
    stroke: #2c3e50;
}

.seat.available {
    fill: #90EE90;
}

.seat.occupied {
    fill: #FFB6C1;
}

.seat.canceled {
    fill: #D3D3D3;
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
}

/* Grip/Handle for moving SVG */
.grip {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 30px;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: move;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    z-index: 100;
}

.grip:hover {
    background: #2980b9;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 50px;
    color: var(--border-color);
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--secondary-color);
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error State */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    margin: 20px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .venue-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .legend-items {
        justify-content: flex-start;
        gap: 15px;
    }
    
    .svg-container {
        padding: 15px;
        overflow-x: auto;
    }
    
    #seatingSVG {
        min-width: 600px;
    }
    
    .seating-container {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .legend {
        padding: 15px;
    }
    
    .legend-items {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-label {
        font-size: 12px;
    }
}
