/**
 * Stage Viewer CSS - Frontend Styles
 */

.ticketsumur-stage-viewer {
    margin: 20px 0;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticketsumur-stage-viewer h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    text-align: center;
}

/* Theater layout styles */
.stage-viewer-container {
    max-width: 100%;
    overflow-x: auto;
    padding: 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stage-screen {
    width: 100%;
    max-width: 600px;
    height: 40px;
    background: #333;
    color: #fff;
    text-align: center;
    line-height: 40px;
    margin: 0 auto 30px;
    border-radius: 4px;
    font-weight: bold;
}

.seat-selection-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    max-width: 800px;
}

.column-labels {
    display: flex;
    margin-left: 50px; /* More space for row labels */
    margin-bottom: 5px; /* Space before seats */
}

.column-label {
    width: 30px;
    height: 25px;
    margin-right: 4px; /* Match seat gap */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #666;
    font-weight: bold;
    box-sizing: border-box; /* Include border in height calculation */
}

.stage-seats-wrapper {
    display: flex;
    align-items: flex-start;
}

.row-labels {
    display: flex;
    flex-direction: column;
    margin-right: 10px; /* Space between labels and seats */
}

.row-label {
    width: 40px;
    height: 30px;
    margin-bottom: 4px; /* Match seat gap */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #666;
    font-weight: bold;
    box-sizing: border-box; /* Include border in height calculation */
}

.stage-seats {
    display: grid;
    gap: 4px;
}

.seat {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    box-sizing: border-box; /* Include border in height calculation */
    line-height: 1;
}

.seat.normal {
    background: #fff;
}

.seat.vip {
    background: #ffd700;
    color: #000;
}

.seat.disabled {
    background: #ff6b6b;
    color: #fff;
}

.seat.empty {
    background: #e0e0e0;
    border: 1px dashed #999;
    cursor: default;
}

.seat.sold {
    background: #aaa;
    cursor: not-allowed;
    opacity: 0.6;
}

.seat.available:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    z-index: 1;
}

.seat.selected {
    background: #4CAF50 !important;
    color: #fff !important;
    border: 2px solid #2e7d32;
    box-shadow: 0 0 0 3px #4CAF50, 0 0 15px rgba(76, 175, 80, 0.6);
    transform: scale(1.1);
    z-index: 2;
    font-weight: bold;
}

.seat.current-seat {
    background: #ffc107 !important;
    color: #000 !important;
    border: 2px solid #ff8f00;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(255, 193, 7, 0.6);
}

/* Estilos para asientos no disponibles para el tipo de ticket */
.seat.not-available-for-ticket {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    position: relative;
    pointer-events: none !important;
    filter: grayscale(70%);
}

.seat.not-available-for-ticket::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        rgba(0, 0, 0, 0.15) 5px,
        rgba(0, 0, 0, 0.15) 10px
    );
    pointer-events: none;
}

.seat.not-available-for-ticket::before {
    content: '✖';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 0, 0, 0.5);
    font-size: 16px;
    font-weight: bold;
    z-index: 2;
}

/* Estilos para resaltar asientos disponibles según el tipo de ticket */
.seat.highlight-available {
    box-shadow: 0 0 3px rgba(76, 175, 80, 0.8);
}

.seat-label {
    font-size: 8px;
    font-weight: bold;
    line-height: 1;
}

.seat-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-seat {
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.legend-seat.normal {
    background: #fff;
}

.legend-seat.vip {
    background: #ffd700;
}

.legend-seat.disabled {
    background: #ff6b6b;
}

.legend-seat.sold {
    background: #aaa;
    opacity: 0.6;
}

.selected-seat-info {
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
}

/* Zones layout styles */
.zones-container {
    padding: 20px;
}

/* Circular layout styles */
.circular-container {
    padding: 20px;
    position: relative;
}

/* Circular stage container - matches backend design */
.stage-grid.circular {
    position: relative;
    width: 600px;
    height: 600px;
    background: transparent;
    border-radius: 50%;
    margin: 50px auto;
    overflow: visible;
    border: 1px solid #ddd;
}

.stage-grid.circular .outer-circle-border {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #333;
    pointer-events: none;
    z-index: 5;
}

.stage-grid.circular .zone {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    opacity: 0.8;
}

.stage-grid.circular .zone:hover {
    opacity: 1;
    filter: brightness(1.1);
}

.stage-grid.circular .zone.selected {
    opacity: 1;
    filter: brightness(1.2);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5),
                0 0 20px rgba(255, 255, 255, 0.5);
    animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5),
                    0 0 20px rgba(255, 255, 255, 0.5);
    }
    to {
        box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.8),
                    0 0 30px rgba(255, 255, 255, 0.8);
    }
}

.stage-grid.circular .central-stage {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20%;
    height: 20%;
    background: #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
}

.stage-grid.circular .zone-label {
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.zones-selection {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.zone-option {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #333;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.zone-option:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.zone-option.selected {
    transform: scale(1.05);
    box-shadow: 0 0 0 3px #2271b1, 0 5px 15px rgba(0,0,0,0.2);
}

.zone-option h4 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: bold;
}

.zone-option p {
    margin: 0;
    font-size: 14px;
}

/* Estilos para zonas no disponibles para el tipo de ticket */
.zone-option.not-available-for-ticket,
.hybrid-zone-option.not-available-for-ticket,
.circular-zone-option.not-available-for-ticket {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    position: relative;
    pointer-events: none !important;
}

.zone-option.not-available-for-ticket::after,
.hybrid-zone-option.not-available-for-ticket::after,
.circular-zone-option.not-available-for-ticket::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.1) 10px,
        rgba(0, 0, 0, 0.1) 20px
    );
    pointer-events: none;
}

/* Estilos para resaltar zonas disponibles según el tipo de ticket */
.zone-option.highlight-available,
.hybrid-zone-option.highlight-available,
.circular-zone-option.highlight-available {
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.8);
    border-color: #4CAF50 !important;
}

/* Circular zone specific styles - now applies to zones within circular grid */
.stage-grid.circular .circular-zone-option h4 {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
    color: #fff;
}

.stage-grid.circular .circular-zone-option p {
    margin: 0;
    font-size: 12px;
    text-align: center;
    line-height: 1.1;
    color: #fff;
}

.selected-zone-info {
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
}

/* Hybrid stage styles */
.hybrid-container {
    padding: 20px;
}

.hybrid-zones-grid {
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 20px;
}

.hybrid-zone-option {
    background: #e8f4fd;
    border: 2px solid #007cba;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    text-align: center;
}

.hybrid-zone-option:hover {
    background: #d4edda;
    border-color: #28a745;
    transform: scale(1.02);
}

.hybrid-zone-option.selected {
    background: #fff3cd;
    border-color: #856404;
    box-shadow: 0 0 10px rgba(133, 100, 4, 0.3);
}

.hybrid-zone-option h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.hybrid-zone-option p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.hybrid-zone-empty {
    background: #f5f5f5;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #999;
    font-style: italic;
}

/* Hybrid zone modal */
.hybrid-zone-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hybrid-zone-modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    position: relative;
}

.hybrid-zone-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.hybrid-zone-modal-close:hover {
    color: #333;
}

.hybrid-zone-seats-grid {
    display: grid;
    gap: 2px;
    background: #f0f0f0;
    padding: 10px;
    border-radius: 4px;
    margin: 20px 0;
    justify-items: center;
}

.hybrid-zone-seats-grid .seat {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hybrid-zone-seats-grid .seat.normal {
    background: #fff;
}

.hybrid-zone-seats-grid .seat.vip {
    background: #ffd700;
    color: #000;
}

.hybrid-zone-seats-grid .seat.disabled {
    background: #ff6b6b;
    color: #fff;
}

.hybrid-zone-seats-grid .seat.empty {
    background: #e0e0e0;
    border: 1px dashed #999;
    cursor: default;
    /* Keep pointer-events enabled so users can potentially select these seats if needed */
}

.hybrid-zone-seats-grid .seat.sold {
    background: #aaa;
    cursor: not-allowed;
    opacity: 0.6;
    pointer-events: none;
}

.hybrid-zone-seats-grid .seat.available:hover {
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    z-index: 1;
}

.hybrid-zone-seats-grid .seat.selected {
    background: #4CAF50 !important;
    color: #fff !important;
    border: 2px solid #2e7d32;
    box-shadow: 0 0 0 3px #4CAF50, 0 0 15px rgba(76, 175, 80, 0.6);
    transform: scale(1.1);
    z-index: 2;
    font-weight: bold;
}

.hybrid-zone-seats-grid .seat.highlight-available {
    box-shadow: 0 0 3px rgba(76, 175, 80, 0.8);
}

.hybrid-zone-seats-grid .seat.not-available-for-ticket {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    position: relative;
    pointer-events: none !important;
    filter: grayscale(80%);
}

.hybrid-zone-seats-grid .seat.not-available-for-ticket::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 5px,
        rgba(0, 0, 0, 0.1) 5px,
        rgba(0, 0, 0, 0.1) 10px
    );
    pointer-events: none;
}

.hybrid-zone-seats-grid .seat.not-available-for-ticket::before {
    content: '✖';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 0, 0, 0.6);
    font-size: 14px;
    font-weight: bold;
    z-index: 2;
}

.hybrid-confirm-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    margin-top: 15px;
}

.hybrid-confirm-button:hover {
    background: #005a87;
}

.hybrid-selected-seat-info {
    text-align: center;
    font-weight: bold;
    margin: 15px 0;
}

/* Price summary styles */
.ticketsumur-price-summary {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.ticketsumur-price-summary h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.price-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
}

.price-summary-row:last-child {
    border-bottom: none;
}

.price-summary-label {
    color: #666;
    flex: 1;
}

.price-summary-value {
    color: #333;
    font-weight: 500;
    text-align: right;
}

.price-summary-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
}

.price-summary-total .price-summary-label {
    color: #333;
}

.price-summary-total .price-summary-value {
    color: #4CAF50;
}

.price-summary-subtotal {
    font-size: 13px;
    color: #999;
}

.price-summary-management-fee {
    color: #ff9800;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .seat-selection-container {
        max-width: 100%;
        overflow-x: auto;
    }

    .zones-selection {
        gap: 10px;
    }

    .zone-option {
        width: 120px;
        height: 120px;
    }

    .hybrid-zones-grid {
        gap: 5px;
        padding: 10px;
    }

    .hybrid-zone-option {
        padding: 10px;
        min-height: 80px;
    }

    .hybrid-zone-option h4 {
        font-size: 12px;
    }

    .hybrid-zone-option p {
        font-size: 11px;
    }

    .ticketsumur-price-summary {
        padding: 12px;
    }

    .price-summary-row {
        font-size: 13px;
    }
} 