/* Custom styles for Cayman Adventure Tours */

html {
  scroll-behavior: smooth;
}

.site-header.scrolled,
header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.08);
}

/* FAQ accordion */
.faq-item.active .faq-toggle svg {
  transform: rotate(180deg);
}

.faq-item.active .faq-content {
  display: block;
}

/* Lightbox & Legal modals */
#lightbox,
#legal-modal {
  display: none;
}
#lightbox.active,
#legal-modal.active {
  display: flex;
}

/* Flatpickr - clean modern borderless circular days */
.flatpickr-calendar {
  border-radius: 1rem !important;
  box-shadow: 0 20px 45px -12px rgba(2, 132, 199, 0.22) !important;
  border: none !important;
  font-family: Inter, system-ui, sans-serif !important;
  overflow: hidden;
  font-size: 13px !important;
  width: 300px !important;
  padding: 8px 6px 12px !important;
  background: #fff !important;
}
.flatpickr-months {
  height: 40px !important;
  padding: 0 4px !important;
}
.flatpickr-month {
  height: 40px !important;
  background: transparent !important;
}
.flatpickr-current-month {
  font-size: 14px !important;
  font-weight: 600 !important;
  padding-top: 8px !important;
  color: #0c4a6e !important;
}
.flatpickr-prev-month, .flatpickr-next-month {
  padding: 6px 10px !important;
  fill: #0284c7 !important;
}
.flatpickr-prev-month:hover svg, .flatpickr-next-month:hover svg {
  fill: #0369a1 !important;
}
.flatpickr-weekdays {
  height: 30px !important;
  background: transparent !important;
}
span.flatpickr-weekday {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #64748b !important;
}
.flatpickr-days {
  width: 100% !important;
}
.dayContainer {
  width: 288px !important;
  min-width: 288px !important;
  max-width: 288px !important;
  padding: 0 !important;
}
/* Remove all day borders + make circular */
.flatpickr-day {
  max-width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  font-size: 13px !important;
  border: none !important;
  border-radius: 9999px !important;
  margin: 1px !important;
  color: #0c4a6e !important;
  background: transparent !important;
}
.flatpickr-day:hover {
  background: #e0f2fe !important;
  border: none !important;
  color: #0284c7 !important;
}
.flatpickr-day.today {
  border: none !important;
  background: #f0f9ff !important;
  color: #0284c7 !important;
  font-weight: 600 !important;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover {
  background: #0284c7 !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px -2px rgba(2, 132, 199, 0.45) !important;
}
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #cbd5e1 !important;
  background: transparent !important;
}
.flatpickr-day.inRange {
  background: #e0f2fe !important;
  border: none !important;
  box-shadow: none !important;
}

/* Gallery */
.gallery-item {
  cursor: zoom-in;
}
.gallery-item:hover img {
  filter: brightness(1.05);
}

/* Legal links look like normal text */
.legal-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

::selection {
  background-color: #0ea5e9;
  color: white;
}

button:active, a:active {
  transform: scale(0.98);
}

@media (max-width: 640px) {
  .font-display {
    letter-spacing: -0.02em;
  }
}

/* ========== Booking form validation ========== */
.form-error {
  display: none;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.15rem;
  color: #dc2626;
}
.form-error.is-visible {
  display: block;
}
/* input/select/textarea selectors keep these above Tailwind's focus: variants */
.booking-form input[aria-invalid="true"],
.booking-form select[aria-invalid="true"],
.booking-form textarea[aria-invalid="true"] {
  border-color: #ef4444;
  background-color: #fef2f2;
}
.booking-form input[aria-invalid="true"]:focus,
.booking-form select[aria-invalid="true"]:focus,
.booking-form textarea[aria-invalid="true"]:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px #fecaca;
}

/* ========== Booking type — pill toggle ========== */
.type-pill {
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  border: 1px solid #bae6fd;                /* ocean-200 */
  background: #fff;
  color: #0369a1;                           /* ocean-700 */
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.type-pill:hover {
  border-color: #38bdf8;                    /* ocean-400 */
  background: #f0f9ff;                       /* ocean-50 */
}
.type-pill[aria-pressed="true"] {
  border-color: transparent;
  background-image: linear-gradient(to right, #0284c7, #0d9488);  /* ocean-600 -> turquoise-600 */
  color: #fff;
  box-shadow: 0 6px 16px rgba(2, 132, 199, .25);
}
.type-pill:focus-visible,
#booking-type-group:focus {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}
#booking-type-group[aria-invalid="true"] .type-pill {
  border-color: #ef4444;                    /* red-500 when unselected after submit */
}

/* ========== Accessibility & SEO helpers ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Strong focus styles for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.gallery-item:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Full Gallery Modal */
.full-gallery-modal {
  display: none;
}
.full-gallery-modal.flex {
  display: flex;
}
.full-gallery-panel {
  border: none;
  cursor: pointer;
}

/* Contact Modal */
.contact-modal {
  display: none;
}
.contact-modal.active {
  display: flex;
}

/* Scroll to Top */
.scroll-to-top.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}
