/* Math Festival Booking Styles */
.math-festival-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', sans-serif;
    direction: rtl;
    text-align: right;
}

.booking-header { display: none; }

.booking-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: bold;
}

.event-location {
    font-size: 18px;
    margin: 5px 0;
    opacity: 0.9;
}

.booking-period {
    font-size: 14px;
    margin: 5px 0 0 0;
    opacity: 0.8;
}

.booking-form {
    background: transparent;
    padding: 30px;
    border-radius: 10px;
    box-shadow: none;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #D8D8D83B;
    border-radius: 10px;
    background: transparent;
}

.form-section h3 {
    margin: 0 0 20px 0;
    color: #ffffff;
    font-size: 20px;
    border-bottom: 2px solid rgba(216, 216, 216, 0.23);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ffffff;
}

/* علامة الحقول المطلوبة */
.form-group label.required::after {
    content: ' *';
    color: #e74c3c;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #ffffff;
    border: 1px solid #D8D8D83B;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* محاذاة نص التاريخ يمين وإظهار placeholder */
#event_date {
    text-align: right;
}
#event_date::placeholder {
    color: rgba(255,255,255,0.75);
}

.radio-group label {
    color: #ffffff;
    font-weight: 500;
}

.radio-group input[type="radio"] {
    accent-color: #2800E9;
}

/* تخصيص مظهر قائمة الوقت */
#event_time {
    background-color: #140253;
    border-color: #140253;
}
#event_time:focus {
    border-color: #2800E9;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2800E9;
    box-shadow: 0 0 5px rgba(40, 0, 233, 0.25);
}

.form-group input[type="date"] {
    background: transparent;
    color: #ffffff;
    cursor: pointer;
}

.form-group input[type="date"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.form-group input.error {
    border-color: #e74c3c;
}

.ticket-counter {
    text-align: center;
}

.ticket-counter label {
    display: block;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.visitors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    justify-items: center;
}

.visitor-type {
    width: 100%;
}

.visitor-label {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.counter-controls {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: transparent;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #D8D8D83B;
}

.counter-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #667eea;
    color: white;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.counter-btn:hover {
    background: #5a6fd8;
}

.counter-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#total_tickets {
    width: 80px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    border: none;
    background: transparent;
}

.attendee-item {
    margin-bottom: 15px;
    padding: 15px;
    background: transparent;
    border-radius: 10px;
    border: 1px solid #D8D8D83B;
}

.attendee-item label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #ffffff;
}

.attendee-item input {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: #ffffff;
    border: 1px solid #D8D8D83B;
    border-radius: 10px;
    font-size: 14px;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background: linear-gradient(135deg, #140253 0%, #2800E9 100%);
    color: #ffffff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(20, 2, 83, 0.35);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

.modal h3 {
    color: #27ae60;
    margin-bottom: 20px;
    font-size: 24px;
}

.booking-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: right;
}

.booking-info p {
    margin: 10px 0;
    font-size: 16px;
}

.modal-close-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 20px;
}

.modal-close-btn:hover {
    background: #5a6fd8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .math-festival-container {
        padding: 10px;
    }
    
    .booking-form {
        padding: 20px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .counter-controls {
        gap: 10px;
    }
    
    .counter-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    #total_tickets {
        width: 60px;
        font-size: 16px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
