/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Source Sans 3', 'Source Sans Pro', sans-serif;
  color: #1a1a1a;
  background: #f9f9f9;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  line-height: 1.2;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header ===== */
.site-header {
  background: #000;
  color: #fff;
  padding: 24px 0;
  text-align: center;
}

.site-title {
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #D85400;
}

.site-subtitle {
  font-size: 1rem;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ===== Tour Intro ===== */
.tour-intro {
  text-align: center;
  padding: 40px 0 24px;
}

.tour-intro h2 {
  font-size: 1.8rem;
  margin-bottom: 12px;
  color: #1a1a1a;
}

.tour-intro p {
  max-width: 640px;
  margin: 0 auto 8px;
  color: #444;
  font-size: 1.05rem;
}

.tour-intro-note {
  font-weight: 600;
  color: #333;
  margin-top: 12px;
}

.tour-intro-social a,
.tour-intro-contact a {
  color: #D85400;
  text-decoration: none;
  font-weight: 600;
}

.tour-intro-social a:hover,
.tour-intro-contact a:hover {
  text-decoration: underline;
}

/* ===== Calendar ===== */
.calendar-section {
  padding-bottom: 40px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.calendar-nav h3 {
  font-size: 1.4rem;
  min-width: 200px;
  text-align: center;
}

.nav-btn {
  background: none;
  border: 2px solid #D85400;
  color: #D85400;
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.nav-btn:hover {
  background: #D85400;
  color: #fff;
}

.nav-btn.disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day-header {
  text-align: center;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #666;
  padding: 8px 0;
}

/* ===== Skeleton Loading ===== */
.skeleton-cell {
  pointer-events: none;
}

.skeleton-line {
  border-radius: 3px;
  background: linear-gradient(90deg, #e8e8e8 25%, #f2f2f2 50%, #e8e8e8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-tour {
  height: 0.7rem;
  width: 75%;
  margin-top: 6px;
}

.skeleton-spots {
  height: 0.6rem;
  width: 50%;
  margin-top: auto;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.calendar-cell {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-cell.empty {
  background: transparent;
  border: none;
}

.calendar-cell.today {
  border-color: #D85400;
  border-width: 2px;
}

.calendar-cell.today .cell-date {
  background: #D85400;
  color: #fff;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.calendar-cell.past {
  opacity: 0.4;
  cursor: default;
}

.cell-date {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a1a1a;
}

/* Individual tour entry within a day cell */
.tour-entry {
  padding: 3px 4px;
  border-radius: 4px;
  transition: background 0.15s, box-shadow 0.15s;
}

.tour-entry.available {
  cursor: pointer;
}

.tour-entry.available:hover {
  background: rgba(216, 84, 0, 0.08);
  box-shadow: 0 1px 4px rgba(216, 84, 0, 0.15);
}

.tour-entry.low-availability {
  cursor: pointer;
}

.tour-entry.low-availability:hover {
  background: rgba(216, 84, 0, 0.08);
  box-shadow: 0 1px 4px rgba(216, 84, 0, 0.15);
}

.tour-entry.sold-out {
  background: #f0f0f0;
  cursor: default;
}

.cell-snippet {
  font-size: 0.8rem;
  font-weight: 700;
  color: #D85400;
  line-height: 1.2;
}

.cell-tour {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.3;
}

.cell-time {
  color: #999;
  font-weight: 400;
  font-size: 0.65rem;
}

.cell-tagline {
  font-size: 0.6rem;
  color: #999;
  font-style: italic;
  line-height: 1.2;
}

.cell-spots {
  font-size: 0.7rem;
  font-weight: 600;
}

.tour-entry.available .cell-spots {
  color: #2e7d32;
}

.tour-entry.low-availability .cell-spots {
  color: #e65100;
}

.tour-entry.sold-out .cell-spots {
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Tour Tooltip ===== */
.tour-entry.has-tooltip {
  position: relative;
}

.tour-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  background: #fff;
  border: 2px solid #D85400;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  z-index: 100;
  pointer-events: none;
}

.tour-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #D85400;
}

/* Desktop: show on hover */
.tour-entry.has-tooltip:hover .tour-tooltip {
  display: block;
}

/* Touch: show when tapped open */
.tour-entry.tooltip-open .tour-tooltip {
  display: block;
}

/* Mobile: reposition tooltip below the entry so it doesn't clip off-screen */
@media (max-width: 700px) {
  .tour-tooltip {
    bottom: auto;
    top: calc(100% + 8px);
    left: 0;
    transform: none;
    width: 200px;
  }

  .tour-tooltip::after {
    top: auto;
    bottom: 100%;
    left: 16px;
    transform: none;
    border-top-color: transparent;
    border-bottom-color: #D85400;
  }
}

.tooltip-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: #D85400;
  margin-bottom: 4px;
  line-height: 1.3;
}

.tooltip-hotel {
  font-size: 0.78rem;
  font-weight: 600;
  color: #333;
}

.tooltip-time {
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 6px;
}

.tooltip-desc {
  font-size: 0.75rem;
  color: #444;
  line-height: 1.4;
  border-top: 1px solid #eee;
  padding-top: 6px;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal.active {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #999;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.modal-title {
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: #1a1a1a;
}

/* ===== Booking Form ===== */
.booking-tour-info {
  background: #fdf5ef;
  border-left: 4px solid #D85400;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.tour-info-name {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #D85400;
  margin-bottom: 4px;
}

.tour-info-detail {
  font-size: 0.9rem;
  color: #555;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: #333;
}

.required {
  color: #D85400;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Source Sans 3', sans-serif;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #D85400;
  box-shadow: 0 0 0 2px rgba(216, 84, 0, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.email-suggestion {
  font-size: 0.85rem;
  color: #555;
  margin-top: 4px;
}

.email-suggestion-link {
  color: #D85400;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.email-suggestion-link:hover {
  color: #b94700;
}

.form-error {
  color: #c62828;
  font-size: 0.9rem;
  min-height: 1.4em;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 12px;
  background: #D85400;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #b94700;
}

/* ===== Confirmation ===== */
.confirmation-content {
  text-align: center;
}

.confirmation-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.checkmark-svg {
  width: 64px;
  height: 64px;
}

.checkmark-circle {
  stroke: #2e7d32;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: circle-draw 0.5s ease-out 0.1s forwards;
}

.checkmark-check {
  stroke: #2e7d32;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: check-draw 0.3s ease-out 0.5s forwards;
}

@keyframes circle-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes check-draw {
  to { stroke-dashoffset: 0; }
}

.confirmation-details {
  text-align: left;
  background: #f5f5f5;
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
}

.confirmation-details p {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.confirmation-details p:last-child {
  margin-bottom: 0;
}

.booking-code {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  color: #D85400;
  letter-spacing: 1px;
}

.confirmation-note {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.btn-calendar {
  display: block;
  width: 100%;
  padding: 10px;
  background: #fff;
  color: #D85400;
  border: 2px solid #D85400;
  border-radius: 8px;
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background 0.2s, color 0.2s;
}

.btn-calendar:hover {
  background: #D85400;
  color: #fff;
}

/* ===== Calendar Footer ===== */
.calendar-footer {
  text-align: center;
  padding-bottom: 32px;
  font-size: 0.95rem;
  color: #444;
}

.calendar-footer p {
  margin-bottom: 4px;
}

.calendar-footer a {
  color: #D85400;
  font-weight: 600;
  text-decoration: none;
}

.calendar-footer a:hover {
  text-decoration: underline;
}

/* ===== Mobile List View ===== */
.calendar-list {
  display: none;
}

.list-loading {
  text-align: center;
  padding: 40px 20px;
  color: #888;
  font-size: 0.95rem;
}

.list-loading .spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #ddd;
  border-top-color: #D85400;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 10px;
}

.list-row {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: background 0.15s;
  gap: 4px;
}

.list-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-row:active:not(.past):not(.sold-out) {
  background: rgba(216, 84, 0, 0.06);
}

.list-row.past {
  opacity: 0.4;
}

.list-row.sold-out {
  background: #f8f8f8;
}

.list-tour-name {
  width: 100%;
  font-weight: 700;
  font-size: 1rem;
  color: #D85400;
  line-height: 1.3;
}

.list-meta {
  font-size: 0.8rem;
  color: #888;
}

.list-status {
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 10px;
  text-align: right;
}

.list-status.available {
  color: #D85400;
}

.list-status.low {
  color: #e65100;
}

.list-status.sold-out {
  color: #999;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== Footer ===== */
.site-footer {
  background: #000;
  color: #aaa;
  text-align: center;
  padding: 20px 0;
  font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
  .calendar-grid {
    gap: 2px;
  }

  .calendar-cell {
    padding: 4px;
    min-height: 70px;
  }

  .cell-date {
    font-size: 0.95rem;
  }

  .cell-snippet {
    font-size: 0.7rem;
  }

  .cell-tour {
    font-size: 0.65rem;
  }

  .cell-tagline {
    display: none;
  }

  .cell-spots {
    font-size: 0.6rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 20px;
  }

  .site-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .calendar-grid {
    display: none;
  }

  .calendar-list {
    display: block;
  }
}
