/* Stadium Map Container */
.stadium-map-container {
    position: relative;
    width: 100%;
    height: 700px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.stadium-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: white;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .stadium-map-container {
        height: 600px;
    }
}

@media (max-width: 992px) {
    .stadium-map-container {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .stadium-map-container {
        height: 400px;
    }
    
    .seat-legend {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .legend-item {
        margin-bottom: 8px;
    }
}

@media (max-width: 576px) {
    .stadium-map-container {
        height: 300px;
    }
}

/* Stadium Legend */
.seat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
}

.legend-color.seat-available { background-color: #28a745; }
.legend-color.seat-selected { background-color: #007bff; }
.legend-color.seat-reserved { background-color: #6c757d; }
.legend-color.seat-booked { background-color: #dc3545; }
.legend-color.seat-vip { 
    background-color: #ffc107;
    background-image: linear-gradient(45deg, transparent 50%, rgba(0,0,0,0.2) 50%);
}

/* Section Cards */
.section-card {
    border-radius: 8px;
    border-left: 4px solid transparent;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    margin-bottom: 15px;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.section-vip { 
    border-left-color: #ffc107;
    background: linear-gradient(to right, rgba(255,215,0,0.05), white);
}

.section-premium { 
    border-left-color: #17a2b8;
    background: linear-gradient(to right, rgba(23,162,184,0.05), white);
}

.section-standard { 
    border-left-color: #28a745;
    background: linear-gradient(to right, rgba(40,167,69,0.05), white);
}

.section-eastwest { 
    border-left-color: #6c757d;
    background: linear-gradient(to right, rgba(108,117,125,0.05), white);
}

/* Progress bars for availability */
.availability-progress {
    margin-top: 10px;
}

.availability-progress .progress {
    height: 8px;
    border-radius: 4px;
}

.availability-progress .progress-bar {
    border-radius: 4px;
}

/* Selected seats area */
#selectedSeats {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
    margin-bottom: 15px;
}

.selected-seat-item {
    padding: 10px 15px;
    border-bottom: 1px solid #dee2e6;
    background: white;
    border-radius: 5px;
    margin-bottom: 8px;
    transition: background-color 0.2s;
}

.selected-seat-item:hover {
    background-color: #f8f9fa;
}

.selected-seat-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Timer display */
.timer {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 5px;
}

.timer.bg-warning {
    background: #ffc107 !important;
    color: #856404;
}

.timer.bg-danger {
    background: #dc3545 !important;
    color: white;
}

/* Scrollbar styling */
#selectedSeats::-webkit-scrollbar {
    width: 6px;
}

#selectedSeats::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#selectedSeats::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#selectedSeats::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Action buttons */
.btn-checkout {
    padding: 12px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
}

.btn-checkout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Pan mode indicator */
.pan-mode-active {
    background-color: #007bff !important;
    color: white !important;
}

/* Loading states */
.loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Touch-friendly elements */
@media (hover: none) and (pointer: coarse) {
    .seat-legend {
        padding: 10px;
    }
    
    .legend-item {
        min-width: 130px;
    }
    
    .btn-checkout {
        padding: 15px 24px;
        font-size: 1.2rem;
    }
    
    .selected-seat-item {
        padding: 12px 15px;
    }
}

/* Animation for seat selection */
@keyframes seatPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.seat-pulse {
    animation: seatPulse 0.5s ease;
}

/* Available seats container */
.available-seats-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.available-seats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.seat-item {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.seat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.seat-item.selected {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

.seat-item.vip {
    border-color: #ffc107;
    background: #fff8e1;
}

.seat-item.vip.selected {
    background: #ffc107;
    color: #212529;
    border-color: #e0a800;
}

.seat-item.booked {
    background: #dc3545;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.seat-item.reserved {
    background: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.6;
}

.seat-label {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 3px;
}

.seat-price {
    font-size: 12px;
    color: #666;
}

.seat-item.selected .seat-price {
    color: rgba(255,255,255,0.9);
}

.seat-item.vip .seat-price {
    color: #ff9800;
    font-weight: bold;
}

/* Section info */
.section-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.section-info h5 {
    margin-bottom: 5px;
    font-weight: bold;
}

.section-info .badge {
    font-size: 0.8rem;
    padding: 5px 10px;
}

/* Seat selection counter */
.seat-selection-counter {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: bounceIn 0.5s;
}

@keyframes bounceIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

/* Loading animation for seats */
.seat-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.seat-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .available-seats-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .seat-item {
        padding: 8px;
    }
    
    .seat-label {
        font-size: 12px;
    }
    
    .seat-price {
        font-size: 10px;
    }
}

/* Scrollbar for available seats */
.available-seats-container::-webkit-scrollbar {
    width: 6px;
}

.available-seats-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.available-seats-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.available-seats-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}