/* === Booking System === */

/* Hero section */
.booking-hero {
  position: relative;
  padding: 140px 0 80px;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-light) 100%);
  color: var(--color-white);
  overflow: hidden;
}

.booking-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/images/yurts-night.jpg') center/cover;
  opacity: 0.2;
}

.booking-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--color-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.booking-hero .container {
  position: relative;
  z-index: 1;
}

.booking-hero h1 {
  color: var(--color-white);
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.booking-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 500px;
  margin: 0 auto;
}

/* Main booking layout */
.booking-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

/* Calendar */
.calendar-wrapper {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
}

.calendar-header h3 {
  font-size: 1.3rem;
  color: var(--color-primary-dark);
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-nav button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--color-text);
  transition: all 0.2s var(--ease);
}

.calendar-nav button:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  position: relative;
}

.calendar-day:hover:not(.empty):not(.past) {
  background: var(--color-cream);
}

.calendar-day.empty {
  cursor: default;
}

.calendar-day.past {
  color: #ccc;
  cursor: not-allowed;
}

.calendar-day.today {
  font-weight: 700;
  color: var(--color-primary);
}

.calendar-day.today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 50%;
}

.calendar-day.available {
  background: #E8F5E9;
  color: #2E7D32;
  font-weight: 600;
}

.calendar-day.available:hover {
  background: #C8E6C9;
}

.calendar-day.booked {
  background: #FFEBEE;
  color: #C62828;
  cursor: not-allowed;
  text-decoration: line-through;
  opacity: 0.6;
}

.calendar-day.selected {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(91, 117, 83, 0.3);
}

.calendar-day.range {
  background: rgba(91, 117, 83, 0.12);
  border-radius: 0;
}

.calendar-day.range-start {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.calendar-day.range-end {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Legend */
.calendar-legend {
  display: flex;
  gap: 20px;
  padding: 16px 28px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--color-text-light);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot.available { background: #E8F5E9; border: 1.5px solid #4CAF50; }
.legend-dot.booked { background: #FFEBEE; border: 1.5px solid #EF5350; }
.legend-dot.selected { background: var(--color-primary); }

/* Sidebar */
.booking-sidebar {
  position: sticky;
  top: 80px;
}

.booking-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  padding: 28px;
  margin-bottom: 20px;
}

.booking-card h3 {
  font-size: 1.2rem;
  color: var(--color-primary-dark);
  margin-bottom: 20px;
}

.booking-summary {
  margin-bottom: 20px;
}

.booking-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.booking-summary-row:last-child {
  border-bottom: none;
}

.booking-summary-row .label {
  color: var(--color-text-light);
}

.booking-summary-row .value {
  font-weight: 600;
  color: var(--color-text);
}

.booking-summary-row.total {
  border-top: 2px solid var(--color-primary);
  margin-top: 8px;
  padding-top: 16px;
}

.booking-summary-row.total .value {
  font-size: 1.3rem;
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
}

.booking-form {
  margin-top: 20px;
}

.booking-form .form-group {
  margin-bottom: 14px;
}

.booking-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-text);
}

.booking-form input,
.booking-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.92rem;
  background: var(--color-bg);
  transition: all 0.2s var(--ease);
}

.booking-form input:focus,
.booking-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-white);
}

.booking-form textarea {
  min-height: 80px;
  resize: vertical;
}

.btn-book {
  width: 100%;
  padding: 16px;
  font-size: 1rem;
  margin-top: 8px;
}

/* Booked notification */
.booking-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--color-primary-dark);
  color: var(--color-white);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s var(--ease);
  z-index: 9999;
  max-width: 360px;
}

.booking-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.booking-toast h4 {
  color: var(--color-white);
  margin-bottom: 4px;
  font-size: 1rem;
}

.booking-toast p {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Recent bookings ticker */
.bookings-ticker {
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}

.bookings-ticker h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
  margin-bottom: 12px;
  font-family: var(--font-body);
  font-weight: 700;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
  animation: tickerFade 0.5s var(--ease);
}

.ticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  flex-shrink: 0;
}

@keyframes tickerFade {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Price badge */
.price-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: var(--color-cream);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.price-badge strong {
  font-size: 1.8rem;
  color: var(--color-primary-dark);
  font-family: var(--font-heading);
}

.price-badge small {
  color: var(--color-text-light);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .booking-layout {
    grid-template-columns: 1fr;
  }

  .booking-sidebar {
    position: static;
    order: -1;
  }

  .calendar-header {
    padding: 20px;
  }

  .calendar-days {
    padding: 8px 12px 16px;
  }
}

@media (max-width: 480px) {
  .booking-hero {
    padding: 120px 0 60px;
  }

  .calendar-day {
    font-size: 0.82rem;
  }

  .booking-card {
    padding: 20px;
  }

  .calendar-legend {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 20px;
  }
}
