/* =========================
   Shine & Shield — booking.css
   ========================= */

/* --- General Page Style --- */
.booking-page h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}

.booking-page .note {
  max-width: 600px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--muted);
}

/* --- Form Panel Style --- */
.card-panel {
  background: var(--panel);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- Form Input Fields --- */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--muted);
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  background-color: var(--bg);
  border: 2px solid #555;
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(255, 106, 0, 0.2);
}

/* Style for the dropdown arrow */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='3' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
}

/* --- Form Layout & Rows --- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* Make it 2 columns on larger screens */
@media (min-width: 768px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid .full {
    grid-column: 1 / -1;
  }
}

.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.mini-note {
  font-size: 0.85rem;
  color: var(--muted);
  opacity: 0.8;
}

/* --- Alerts and Helper Classes --- */
.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1.5rem;
  text-align: center;
  font-weight: 600;
  display: none; /* Hidden by default */
}

.alert.error {
  background-color: #450a0a;
  color: #fca5a5;
  border: 1px solid #7f1d1d;
}

.alert.success {
  background-color: #064e3b;
  color: #a7f3d0;
  border: 1px solid #047857;
}

.input.invalid {
  border-color: #991b1b;
}

.hidden {
  display: none !important;
}

.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* in booking.css */
.date-time-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

/* Style the new dark theme calendar */
#bookingCalendar .flatpickr-calendar {
  /* This uses your existing variables for a perfect match! */
  background: var(--panel);
  width: 100%;
}

.time-slots-container .time-slot {
  display: block;
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background-color: var(--bg);
  border: 2px solid #555;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  transition: all 0.2s ease;
}
.time-slots-container .time-slot:hover {
  border-color: var(--accent);
}
.time-slots-container .time-slot.selected {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Validation Highlight Styles --- */

/* Highlight invalid text inputs and dropdowns with a red border */
input.invalid,
select.invalid {
  border-color: #ef4444; /* A bright red */
}

/* Add a red glow when a user clicks into an invalid field to fix it */
input.invalid:focus,
select.invalid:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
}

/* Style for the parent container of the calendar/time slots when invalid */
.date-time-picker.invalid {
  border: 2px solid #ef4444;
  border-radius: 12px;
  padding: 1rem;
}

/* --- OTP Modal Styles --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-window {
  background: var(--panel);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(450px, 90%);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 2rem;
  cursor: pointer;
}

.otp-input-group {
  margin: 1.5rem 0;
}

.resend-row {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.resend-btn {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 5px;
}

.resend-btn:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: not-allowed;
}



/* --- Better focus accessibility for keyboard users --- */
.time-slots-container .time-slot:focus-visible,
.resend-btn:focus-visible,
.modal-close-btn:focus-visible,
.btn:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Optional disabled button state (used when sending OTP) --- */
.btn:disabled,
.resend-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* --- Calendar polish (Flatpickr inline) --- */
#bookingCalendar .flatpickr-calendar {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 320px;    /* prevents over-stretch on wide screens */
  width: 100%;
}

#bookingCalendar .flatpickr-months,
#bookingCalendar .flatpickr-weekdays {
  background: var(--panel);
  color: var(--text);
}
#bookingCalendar .flatpickr-day:hover,
#bookingCalendar .flatpickr-day:focus {
  border-color: var(--accent);
}
#bookingCalendar .flatpickr-day.selected,
#bookingCalendar .flatpickr-day.startRange,
#bookingCalendar .flatpickr-day.endRange,
#bookingCalendar .flatpickr-day.selected:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- Date+time invalid ring should not shift layout --- */
.date-time-picker.invalid {
  box-sizing: border-box;
}

/* --- Modal small motion preferences --- */
@media (prefers-reduced-motion: no-preference) {
  .modal-overlay { transition: opacity .2s ease; }
  .modal-window { transition: transform .2s ease, opacity .2s ease; }
  .modal-overlay.hidden .modal-window { transform: translateY(6px); opacity: 0.95; }
}

/* --- Time-slot touch target comfort --- */
.time-slots-container .time-slot {
  min-height: 44px; /* touch-friendly */
}

/* --- (If styles.css doesn’t already define these) Outline orange button --- */
/* Comment out if you already have .btn / .btn-outline-orange in styles.css */
.btn { padding: 0.75rem 1.1rem; border-radius: 10px; font-weight: 700; line-height: 1; }
.btn-outline-orange {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}
.btn-outline-orange:hover { background: var(--accent); color: #fff; }

/* Add this to the end of your booking.css file */
input:disabled {
  background-color: #2b2d2f; /* Darker background */
  opacity: 0.7;
  cursor: not-allowed;
}

/* Styles for the new terms link and pop-up */

/* Aligns the checkbox/link next to the button */
#terms-container {
  margin-top: 0;
}

/* Makes the "Terms of Service" text look like a clickable link */
.terms-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

/* Styles for the text inside the pop-up */
.terms-content {
  background: var(--bg);
  border: 1px solid #555;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
  max-height: 50vh; /* Makes the content scrollable on small screens */
  overflow-y: auto;
}

.terms-content p {
  margin-bottom: 1rem;
}

/* Style for the note next to the terms checkbox */
.terms-note {
  font-style: italic;
  font-size: 0.8rem;
  color: var(--muted);
  opacity: 0.9;
  /* Helps with smooth appearance/disappearance */
  transition: opacity 0.3s ease;
}

.checkbox-container label {
  display: block;
  font-size: .9rem;
  line-height: 1.45;
}
.checkbox-container a,
.checkbox-container .terms-link {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}
.field-help {
  font-size: .85rem;
  color: #e0e3e7;
  margin-top: 4px;
}
