/* Booking Form Styles */
.booking-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0e0e0;
  position: relative;
  z-index: 1;
}

.booking-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.booking-header h1 {
  color: #003B5C;
  font-size: 1.8em;
  margin-bottom: 10px;
}

.booking-header p {
  color: #555;
  font-size: 1em;
  line-height: 1.5;
  margin: 0;
}

/* Progress Bar */
.form-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.form-progress::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e0e0e0;
  z-index: 1;
}

.progress-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  background: #e0e0e0;
  color: #666;
  border-radius: 50%;
  margin: 0 auto 8px;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.progress-step.active .step-number {
  background: #00AEEF;
  color: white;
}

.progress-step.completed .step-number {
  background: #4CAF50;
  color: white;
}

.step-label {
  font-size: 0.9em;
  color: #666;
  font-weight: 500;
}

.progress-step.active .step-label {
  color: #003B5C;
  font-weight: 600;
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeIn 0.5s ease;
  opacity: 0;
  visibility: hidden;
}

.form-step.active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-step h3 {
  color: #003B5C;
  font-size: 1.8em;
  margin-bottom: 20px;
  text-align: center;
}

.form-step h3 i {
  margin-right: 8px;
  color: #00AEEF;
}

/* Form Layout */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: bold;
  font-size: 0.9em;
}

.booking-form .form-group input,
.booking-form .form-group select,
.booking-form .form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  transition: border-color 0.3s;
  background: white;
  font-family: inherit;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00AEEF;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-help {
  display: block;
  margin-top: 5px;
  font-size: 0.85em;
  color: #666;
  font-style: italic;
}

.error-message {
  display: block;
  margin-top: 5px;
  font-size: 0.85em;
  color: #dc3545;
  font-weight: 500;
}

/* Checkbox Styles */
.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 20px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
  font-size: 0.95em;
  line-height: 1.4;
  margin-bottom: 10px;
}

.checkbox-container:hover {
  background: #f8f9fa;
  border-color: #00AEEF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkbox-container input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #00AEEF;
}

.checkbox-container label {
  cursor: pointer;
  flex: 1;
  margin: 0;
}

.checkbox-container input[type="checkbox"]:checked + label {
  color: #003B5C;
  font-weight: 500;
}

/* Review Summary */
.review-summary {
  background: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e0e0e0;
}

.review-section {
  margin-bottom: 20px;
}

.review-section h4 {
  color: #003B5C;
  margin-bottom: 12px;
  font-size: 1.1em;
}

.review-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #e0e0e0;
}

.review-item:last-child {
  border-bottom: none;
}

.review-label {
  font-weight: 600;
  color: #333;
}

.review-value {
  color: #666;
  text-align: right;
}

/* Form Navigation */
.form-navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.form-navigation button {
  padding: 12px 25px;
  border: none;
  border-radius: 25px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 150px;
}

.form-navigation .btn-primary {
  background: #00AEEF !important;
  color: white !important;
  border-radius: 25px !important;
}

.form-navigation .btn-primary:hover {
  background: #008fbf !important;
}

.form-navigation .btn-secondary {
  background: #003B5C !important;
  color: white !important;
  border-radius: 25px !important;
}

.form-navigation .btn-secondary:hover {
  background: #1a4a6b !important;
}

/* Validation Error Styles */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    background-color: #fff5f5;
}

.form-group.error label {
    color: #dc3545;
    font-weight: 600;
}

.error-message {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.error-message i {
    color: #dc3545;
    font-size: 1em;
}

/* Animation for error appearance */
.form-group.error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Force date input to English locale */
input[type="date"][lang="en"] {
    direction: ltr;
    text-align: left;
}

/* Ensure date picker shows English months and days */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    direction: ltr;
}

input[type="date"]::-webkit-datetime-edit-text {
    direction: ltr;
}

input[type="date"]::-webkit-datetime-edit-month-field,
input[type="date"]::-webkit-datetime-edit-day-field,
input[type="date"]::-webkit-datetime-edit-year-field {
    direction: ltr;
}

/* Safari mobile specific fixes */
@supports (-webkit-touch-callout: none) {
    input[type="date"] {
        min-height: 44px; /* Minimum touch target size for iOS */
        font-size: 16px; /* Prevent zoom on focus */
        -webkit-appearance: none;
        appearance: none;
        background-color: #ffffff;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px 15px;
    }
    
    input[type="date"]::-webkit-datetime-edit {
        padding: 0;
        margin: 0;
    }
    
    input[type="date"]::-webkit-datetime-edit-fields-wrapper {
        padding: 0;
        margin: 0;
    }
    
    input[type="date"]::-webkit-datetime-edit-text {
        padding: 0 2px;
        margin: 0;
    }
    
    input[type="date"]::-webkit-datetime-edit-month-field,
    input[type="date"]::-webkit-datetime-edit-day-field,
    input[type="date"]::-webkit-datetime-edit-year-field {
        padding: 0;
        margin: 0;
        border: none;
        background: transparent;
    }
    
    input[type="date"]::-webkit-calendar-picker-indicator {
        background: transparent;
        color: transparent;
        cursor: pointer;
        height: 100%;
        left: 0;
        position: absolute;
        right: 0;
        top: 0;
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
  .booking-container {
    max-width: 95%;
    padding: 20px 15px;
    margin: 0 auto;
  }
  
  .booking-header h1 {
    font-size: 1.6em;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  .form-progress {
    flex-direction: column;
    gap: 20px;
  }
  
  .form-progress::before {
    display: none;
  }
  
  .progress-step {
    display: flex;
    align-items: center;
    gap: 15px;
  }
  
  .step-number {
    margin: 0;
  }
  
  .form-navigation {
    flex-direction: column;
    gap: 15px;
  }
  
  .form-navigation button {
    width: 100%;
    justify-content: center;
    min-width: auto;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 15px;
    min-height: 44px; /* Touch target minimum */
  }
  
  .form-group label {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  .course-info-grid {
    grid-template-columns: 1fr;
  }
  
  .course-info-card {
    padding: 20px;
  }
  
  .info-item {
    padding: 12px;
  }
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 40px;
  background: #d4edda;
  border-radius: 8px;
  border: 1px solid #c3e6cb;
  margin: 20px 0;
}

.success-message h2 {
  color: #155724;
  margin-bottom: 15px;
}

.success-message p {
  color: #155724;
  font-size: 1.1em;
}

/* Loading State */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #00AEEF;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Course Details Card */
.course-details {
  margin: 15px 0;
}

.course-info-card {
  background: #f9f9f9;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
}

.course-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.course-info-card h4 {
  color: #003B5C;
  margin-bottom: 12px;
  font-size: 1.1em;
  text-align: center;
}

.course-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.info-item {
  text-align: center;
  padding: 8px;
  background: white;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
}

.info-item strong {
  display: block;
  color: #003B5C;
  font-size: 0.85em;
  margin-bottom: 4px;
}

.info-item span {
  color: #666;
  font-size: 0.9em;
}

/* Program Details Card */
.program-details {
  margin: 15px 0;
}

.program-info-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #e9ecef;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.program-info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  border-color: #00AEEF;
}

.program-info-card h4 {
  color: #003B5C;
  margin-bottom: 15px;
  font-size: 1.2em;
  text-align: center;
  font-weight: 600;
  position: relative;
  padding-bottom: 10px;
}

.program-info-card h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #00AEEF, #003B5C);
  border-radius: 2px;
}

.program-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.program-item {
  text-align: center;
  padding: 15px 12px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 12px;
  border: 2px solid #e9ecef;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 80px;
  justify-content: center;
}

.program-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  border-color: #00AEEF;
}

.program-item i {
  color: #00AEEF;
  font-size: 1.4em;
  margin-bottom: 5px;
}

.program-item span {
  color: #333;
  font-size: 0.85em;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
}

/* Dietary Other Field Animation */
#dietaryOtherGroup {
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(-10px);
}

#dietaryOtherGroup.show {
  opacity: 1;
  transform: translateY(0);
}

/* Booking Type Selector */
.booking-type-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #e9ecef;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9em;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.radio-label:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
  border-color: #00AEEF;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 3px solid #ccc;
  border-radius: 50%;
  background: white;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.radio-label:hover .radio-custom {
  border-color: #00AEEF;
  box-shadow: 0 2px 6px rgba(0, 174, 239, 0.3);
}

.radio-label input[type="radio"]:checked + .radio-custom {
  background: linear-gradient(135deg, #00AEEF, #0099cc);
  border-color: #00AEEF;
  box-shadow: 0 2px 8px rgba(0, 174, 239, 0.4);
  transform: scale(1.05);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.radio-label input[type="radio"]:checked ~ .radio-text {
  color: #003B5C;
  font-weight: 500;
}

/* Section Headers */
.student-info-section h4,
.contact-info-section h4,
.emergency-contact-section h4 {
  color: #003B5C;
  margin-bottom: 20px;
  font-size: 1.3em;
  font-weight: 700;
  padding: 15px 20px;
  background: linear-gradient(135deg, #003B5C, #00AEEF);
  color: white;
  border-radius: 10px;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 59, 92, 0.3);
}

.student-info-section h4 i,
.contact-info-section h4 i,
.emergency-contact-section h4 i {
  margin-right: 10px;
  font-size: 1.2em;
}

/* Section Spacing */
.student-info-section,
.contact-info-section,
.emergency-contact-section {
  margin-bottom: 30px;
  padding: 25px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 16px;
  border: 2px solid #e9ecef;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.student-info-section::before,
.contact-info-section::before,
.emergency-contact-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00AEEF, #003B5C);
}

.student-info-section {
  border-left: 4px solid #00AEEF;
}

.contact-info-section {
  border-left: 4px solid #28a745;
}

.emergency-contact-section {
  background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
  border-left: 4px solid #ffc107;
  border-color: #ffeaa7;
}

.emergency-contact-section h4 {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: #333;
}