/**
 * PNDA Venue Frontend Styles
 * Seat Selection UI for Customers
 * 
 * @package PNDA_Sahne
 * @since 5.7.0
 */

/* Main Container */
.pnda-venue-seat-selection {
    position: relative;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    margin: 20px 0;
}

/* Toolbar */
.pnda-venue-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.pnda-zoom-controls {
    display: flex;
    gap: 8px;
}

.pnda-zoom-controls button {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s;
}

.pnda-zoom-controls button:hover {
    background: rgba(255,255,255,0.2);
    border-color: #D3A651;
}

.pnda-zoom-controls .pnda-zoom-reset {
    width: auto;
    padding: 0 12px;
    font-size: 12px;
    font-weight: normal;
}

.pnda-selection-info {
    color: #D3A651;
    font-weight: 600;
    font-size: 14px;
}

.pnda-selected-count {
    font-size: 20px;
}

/* Canvas Wrapper */
.pnda-venue-canvas-wrapper {
    position: relative;
    min-height: 400px;
    overflow: hidden;
    touch-action: none;
}

/* Loading */
.pnda-venue-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #1a1a1a;
    z-index: 10;
}

.pnda-venue-loading.hidden {
    display: none;
}

.pnda-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #D3A651;
    border-radius: 50%;
    animation: pnda-spin 1s linear infinite;
}

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

.pnda-venue-loading p {
    color: #999;
    margin-top: 15px;
    font-size: 14px;
}

/* Canvas */
.pnda-venue-canvas {
    width: 100%;
    min-height: 400px;
    cursor: grab;
    user-select: none;
}

.pnda-venue-canvas.dragging {
    cursor: grabbing;
}

/* Stage */
.pnda-venue-stage {
    position: absolute;
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    border: 2px solid #34495e;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.6);
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Row Labels */
.pnda-row-label {
    position: absolute;
    color: rgba(255,255,255,0.5);
    font-weight: bold;
    font-size: 12px;
    width: 24px;
    text-align: center;
}

/* Seats */
.pnda-seat {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.15s ease;
    border: 2px solid;
    box-sizing: border-box;
}

.pnda-seat:hover:not(.sold):not(.locked) {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.pnda-seat.available {
    cursor: pointer;
}

.pnda-seat.selected {
    background: #D3A651 !important;
    border-color: #B8912E !important;
    color: #fff !important;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(211, 166, 81, 0.5);
    z-index: 5;
}

.pnda-seat.sold {
    background: #444 !important;
    border-color: #555 !important;
    color: #666 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.pnda-seat.sold::after {
    content: '×';
    position: absolute;
    font-size: 14px;
    color: #888;
}

.pnda-seat.locked {
    background: rgba(255, 193, 7, 0.2) !important;
    border-color: #ffc107 !important;
    color: #ffc107 !important;
    cursor: not-allowed;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Aisle */
.pnda-aisle {
    position: absolute;
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.1);
}

/* Exit */
.pnda-exit {
    position: absolute;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4caf50;
    font-size: 9px;
    font-weight: bold;
}

/* Booth */
.pnda-booth {
    position: absolute;
    background: rgba(33, 150, 243, 0.2);
    border: 1px solid rgba(33, 150, 243, 0.4);
    border-radius: 4px;
}

/* Legend */
.pnda-venue-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.pnda-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #aaa;
}

.pnda-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid;
}

.pnda-legend-item.sold .pnda-legend-color {
    background: #444;
    border-color: #555;
}

.pnda-legend-item.selected .pnda-legend-color {
    background: #D3A651;
    border-color: #B8912E;
}

/* Selected Seats Panel */
.pnda-venue-selected-seats {
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.pnda-venue-selected-seats h4 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
}

.pnda-seats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    min-height: 40px;
}

.pnda-seats-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(211, 166, 81, 0.2);
    border: 1px solid rgba(211, 166, 81, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: #D3A651;
}

.pnda-seats-list .seat-code {
    font-weight: bold;
}

.pnda-seats-list .seat-price {
    color: rgba(211, 166, 81, 0.7);
    font-size: 11px;
}

.pnda-seats-list .remove-seat {
    background: none;
    border: none;
    color: rgba(211, 166, 81, 0.6);
    cursor: pointer;
    padding: 0 2px;
    font-size: 16px;
    line-height: 1;
}

.pnda-seats-list .remove-seat:hover {
    color: #ff6b6b;
}

.pnda-seats-list:empty::before {
    content: 'Henüz koltuk seçilmedi';
    color: #666;
    font-style: italic;
}

.pnda-seats-total {
    text-align: right;
    color: #aaa;
    font-size: 14px;
}

.pnda-seats-total strong {
    color: #D3A651;
    font-size: 20px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .pnda-venue-seat-selection {
        border-radius: 0;
        margin: 0 -15px;
    }
    
    .pnda-venue-toolbar {
        padding: 10px 12px;
    }
    
    .pnda-zoom-controls button {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .pnda-venue-canvas-wrapper {
        min-height: 300px;
    }
    
    .pnda-seat {
        width: 24px;
        height: 24px;
        font-size: 8px;
        border-radius: 4px;
    }
    
    .pnda-venue-legend {
        justify-content: center;
        gap: 10px;
        padding: 12px;
    }
    
    .pnda-legend-item {
        font-size: 11px;
    }
    
    .pnda-legend-color {
        width: 16px;
        height: 16px;
    }
    
    .pnda-venue-selected-seats {
        padding: 15px;
    }
    
    .pnda-seats-list li {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) {
    .pnda-seat:hover:not(.sold):not(.locked) {
        transform: none;
    }
    
    .pnda-seat:active:not(.sold):not(.locked) {
        transform: scale(0.95);
    }
}

/* Dark mode scrollbar */
.pnda-venue-canvas-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.pnda-venue-canvas-wrapper::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.pnda-venue-canvas-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
}

.pnda-venue-canvas-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}
