#esr-reservation-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: Arial, sans-serif;
    overflow-x: auto; /* Dla szerokości miejsc na mobile */
    -webkit-overflow-scrolling: touch; /* Smooth scroll na iOS */
}

.esr-stage {
    background: #6366f1;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 40px;
}

#esr-seating-chart {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 4px;
    width: 100%; /* Ważne dla Chrome */
    min-width: fit-content; /* Zapobiega znikaniu */
    -webkit-min-width: -webkit-fit-content;
    -webkit-min-width: -moz-fit-content;
    -webkit-min-width: fit-content;
}

.esr-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px; /* Fallback dla gap */
    width: 100%; /* Dla centrowania */
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-flex-wrap: nowrap;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap; /* Zapobiega zawijaniu */
    visibility: visible !important; /* Wymuś widoczność w Chrome */
    opacity: 1 !important;
}

.esr-row-label {
    font-weight: bold;
    width: 40px;
    min-width: 40px; /* Dla Chrome mobile */
    text-align: center;
    color: #333;
    font-size: 18px;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.esr-seat {
    width: 40px;
    height: 40px;
    min-width: 40px; /* Zapobiega znikaniu w Chrome */
    min-height: 40px;
    cursor: pointer;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    border-radius: 4px;
    -webkit-border-radius: 4px;
    margin-right: 4px; /* Fallback dla gap */
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-flex-shrink: 0;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent; /* Usuń highlight na mobile */
}

.esr-seat.available {
    background-color: #22c55e;
}

.esr-seat:hover {
    opacity: 0.8;
}

.esr-seat.reserved {
    background-color: #ef4444;
    cursor: not-allowed;
}

.esr-seat.reserved:hover {
    opacity: 1;
}

.esr-seat.unconfirmed {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.esr-seat.unconfirmed:hover {
    opacity: 1;
}

.esr-seat.blocked {
    background-color: #eab308;
    cursor: not-allowed;
    font-weight: bold;
}

.esr-seat.blocked:hover {
    opacity: 1;
}

/* Modal */
.esr-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.esr-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.esr-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    transition: color 0.3s;
}

.esr-close:hover,
.esr-close:focus {
    color: #000;
}

.esr-modal-content h2 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

#esr-seat-info {
    background-color: #E3F2FD;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: #1565C0;
    font-weight: 500;
}

.esr-form-group {
    margin-bottom: 20px;
}

.esr-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.esr-form-group input,
.esr-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.esr-form-group input:focus,
.esr-form-group textarea:focus {
    outline: none;
    border-color: #6366f1;
}

.esr-optional-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #6366f1;
}

.esr-optional-section h3 {
    margin: 0 0 20px 0;
    color: #6366f1;
    font-size: 16px;
    font-weight: 600;
}

.esr-submit-btn {
    background: #6366f1;
    color: white;
    padding: 14px 30px;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
}

.esr-submit-btn:hover {
    background: #4f46e5;
}

.esr-submit-btn:active {
    background: #4338ca;
}

/* Legenda */
.esr-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

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

.esr-legend-box {
    width: 30px;
    height: 30px;
}

.esr-legend-box.available {
    background-color: #22c55e;
}

.esr-legend-box.reserved {
    background-color: #ef4444;
}

.esr-legend-box.unconfirmed {
    background-color: #9ca3af;
}

.esr-legend-box.blocked {
    background-color: #eab308;
}

/* Responsive */
@media (max-width: 768px) {
    #esr-reservation-container {
        padding: 10px;
    }
    
    .esr-stage {
        font-size: 18px;
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .esr-row-label {
        width: 30px;
        min-width: 30px;
        font-size: 14px;
    }
    
    .esr-seat {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 10px;
        margin-right: 3px;
    }
    
    .esr-row {
        margin-bottom: 3px;
    }
    
    .esr-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .esr-legend {
        flex-wrap: wrap;
        gap: 15px;
    }
}

/* Bardzo małe ekrany */
@media (max-width: 480px) {
    .esr-row-label {
        width: 25px;
        min-width: 25px;
        font-size: 12px;
    }
    
    .esr-seat {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 9px;
        margin-right: 2px;
    }
    
    .esr-row {
        margin-bottom: 2px;
    }
}


/* ETAP 1.3.0 - Nowe style */

/* KROK 1: Zgody */
.esr-consent-step {
    max-width: 700px;
}

.esr-consent-item {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.esr-consent-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.6;
}

.esr-consent-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 3px;
    flex-shrink: 0;
    cursor: pointer;
}

/* KROK 2: Dane */
.esr-data-step {
    max-width: 600px;
}

.esr-optional-section {
    background: #f0f6fc;
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    border-left: 4px solid #0366d6;
}

.esr-optional-section h3 {
    margin-top: 0;
    color: #0366d6;
    font-size: 18px;
}

.esr-back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.esr-back-btn:hover {
    background: #5a6268;
}

.esr-modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

