/* Modal System Variables */
:root {
    --modal-z-index: 9999;
    --modal-backdrop: rgba(0, 0, 0, 0.7);
    --modal-border-radius: 12px;
    --modal-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    --modal-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--modal-z-index);
    opacity: 0;
    visibility: hidden;
    transition: var(--modal-transition);
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.modal-container {
    background: white;
    border-radius: var(--modal-border-radius);
    box-shadow: var(--modal-shadow);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform var(--modal-transition);
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

/* Modal Sizes */
.modal-sm { max-width: 400px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1140px; }

/* Modal Header */
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    margin: -0.5rem;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #333;
}

/* Modal Body */
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 60vh;
}

/* Modal Footer */
.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #f8f9fa;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    border: 3px solid white;
    transition: all 0.3s;
}

.step.active .step-number {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
    max-width: 100px;
}

.step.active .step-label {
    color: #007bff;
    font-weight: 500;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e9ecef;
    margin: 0 10px;
    position: relative;
    top: -20px;
}

/* Step Content */
.step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Booking Summary */
.booking-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-details {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #dee2e6;
}

.summary-item:last-child {
    border-bottom: none;
}

.price-breakdown {
    border-top: 2px solid #dee2e6;
    padding-top: 1.5rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.price-total {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #333;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Payment Methods */
.payment-methods {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-method {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.payment-method:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.payment-method.active {
    border-color: #007bff;
    background: #f8f9ff;
}

.method-logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    border: 1px solid #e9ecef;
}

.method-logo img {
    max-width: 40px;
    max-height: 40px;
}

.method-details {
    flex: 1;
}

.method-details h5 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.method-details p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.method-check {
    color: #28a745;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.payment-method.active .method-check {
    opacity: 1;
}

/* Seat Map */
.seat-map {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
}

.seat {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.seat:hover:not(.booked) {
    background: #007bff;
    color: white;
}

.seat.selected {
    background: #28a745;
    color: white;
}

.seat.booked {
    background: #dc3545;
    color: white;
    cursor: not-allowed;
}

/* Extras List */
.extras-list {
    display: grid;
    gap: 1rem;
}

.extra-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #007bff;
    border-radius: 4px;
    margin-right: 1rem;
    position: relative;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.checkbox-label input:checked + .checkbox-custom {
    background: #007bff;
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.75rem;
}

.extra-details {
    flex: 1;
}

.extra-details strong {
    display: block;
    margin-bottom: 0.25rem;
}

.extra-description {
    display: block;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.extra-price {
    color: #28a745;
    font-weight: 600;
}

/* Form Validation */
.has-error {
    border-color: #dc3545 !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.notification {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header, .modal-body, .modal-footer {
        padding: 1rem;
    }
    
    .step-indicator {
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .step-label {
        font-size: 0.75rem;
        max-width: 80px;
    }
    
    .payment-method {
        padding: 0.75rem;
    }
    
    .method-logo {
        width: 50px;
        height: 50px;
        margin-right: 0.75rem;
    }
    
    .seat-map {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .seat {
        width: 35px;
        height: 35px;
    }
}

/* Loading Overlay */
#loading-modal .modal-container {
    background: transparent;
    box-shadow: none;
}

#loading-modal .modal-body {
    background: white;
    border-radius: var(--modal-border-radius);
    padding: 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loading-spinner.large {
    width: 70px;
    height: 70px;
    border-width: 4px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}