/**
 * Booking Modal Styles
 * Version: 20251107-001
 */

/* Modal Overlay */
.booking-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.booking-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

/* Modal Content */
.booking-modal-content {
  position: relative;
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

/* Close Button */
.booking-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 1;
}

.booking-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

/* Modal Body */
.booking-modal-body {
  padding: 40px 30px 30px;
}

/* Class Info */
.booking-class-info {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}

.booking-class-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.booking-class-rating {
  color: #f59e0b;
  font-size: 16px;
  margin-bottom: 8px;
}

.booking-class-credits {
  display: inline-block;
  background: transparent;
  color: #1f2937;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* Schedule Info */
.booking-schedule-info {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #eee;
}

.booking-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 15px;
  color: #4a5568;
}

.booking-info-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

/* Description */
.booking-description {
  margin-bottom: 32px;
}

.booking-description h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 12px 0;
}

.booking-description p {
  font-size: 14px;
  line-height: 1.6;
  color: #6b7280;
  margin: 0;
}

/* Payment Section */
.booking-payment-section {
  margin-bottom: 32px;
}

.booking-payment-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 16px 0;
}

/* Payment Option */
.payment-option {
  margin-bottom: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.2s;
  position: relative;
}

.payment-option:hover {
  border-color: #3b82f6;
  background: #f8faff;
}

.payment-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.payment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.payment-option input[type="radio"]:checked + label {
  border-color: #3b82f6;
  background: #f8faff;
}

.payment-option label {
  display: block;
  padding: 16px;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s;
}

.payment-option input[type="radio"]:checked + label {
  background: linear-gradient(135deg, #eff6ff 0%, #f3f0ff 100%);
}

.payment-option-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-option-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

.payment-option-title span:first-child {
  font-size: 20px;
}

.payment-option-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: #6b7280;
  margin-left: 30px;
}

.payment-option-required {
  font-weight: 500;
  color: #3b82f6;
}

.payment-option-sessions {
  color: #10b981;
  font-weight: 500;
}

/* Modal Actions */
.booking-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
}

.booking-modal-actions button {
  flex: 1;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary {
  background: #f3f4f6;
  color: #4b5563;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-primary {
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Loading State */
.booking-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border-radius: 16px;
}

.booking-loading .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.booking-loading p {
  font-size: 15px;
  color: #6b7280;
  margin: 0;
}

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

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

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Voucher Section Animations */
.booking-voucher-section {
  transition: opacity 0.3s ease, max-height 0.3s ease, margin-bottom 0.3s ease, padding 0.3s ease;
}

.booking-voucher-section.show {
  opacity: 1 !important;
  max-height: 500px !important;
  margin-bottom: 24px !important;
  padding: 16px !important;
}

.booking-voucher-section.hide {
  opacity: 0 !important;
  max-height: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 16px !important;
}

/* Responsive */
@media (max-width: 640px) {
  .booking-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .booking-modal-body {
    padding: 30px 20px 20px;
  }

  .booking-class-title {
    font-size: 20px;
  }

  .booking-modal-actions {
    flex-direction: column;
  }

  .booking-modal-actions button {
    width: 100%;
  }
}
