.booking-location-note {
  width: min(100%, 880px);
  margin: 24px auto 32px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
  text-align: center;
}

.booking-location-note a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.booking-location-note a:hover,
.booking-location-note a:focus-visible {
  color: var(--accent-hover);
  text-decoration: underline;
}

.calendar-wrapper {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index:2;
}

.calendar-header {
  display: grid;
  grid-template-columns: 34px auto 34px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 6px;
}

.calendar-header h3 {
  font-family:'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  margin: 0;
}

.calendar-header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: transparent;
  color: #1f252b;
  border: 0 !important;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
  box-shadow: none !important;
  outline: none !important;
}

.calendar-header button:hover,
.calendar-header button:focus,
.calendar-header button:focus-visible {
  background: transparent;
  color: #1f252b;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}

.calendar-header button span {
  display: block;
  transform: translateY(-1px);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  text-align: center;
}

.calendar-weekdays div {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: #6b6b6b;
  letter-spacing: 0;
}

.calendar-grid > div {
  padding: 10px 0 8px 0;
  background: var(--surface-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: 0.2s;
  min-height: 58px;
}

.calendar-legend {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.9rem;
  color: #444;
}

.calendar-day-number {
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 4px;
}

.calendar-day-price {
  font-size: 0.62rem;
  margin-top: 2px;
  color: #a67c52;
  font-weight: 600;
  line-height: 1;
}

.calendar-grid .past { opacity:0.3; pointer-events:none; }
.calendar-grid .selected { background: var(--accent); color: #ffffff; }
.calendar-grid .in-range { background:#d8c3a5; }
.calendar-grid .booked { background: #d9534f; color: #ffffff; cursor: not-allowed; }

.calendar-grid .blocked {
  background: #777;
  color: #ffffff;
  cursor: not-allowed;
}

.calendar-grid .turnover-checkout {
  background: linear-gradient(154deg, #f8f6f2 0 47%, #ffffff 47% 53%, #d9534f 53% 100%);
  color: #1f2933;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.calendar-grid .turnover-checkout .calendar-day-price {
  color: #a67c52;
}

.calendar-grid .booked.selected,
.calendar-grid .blocked.selected {
  background: linear-gradient(154deg, #f8f6f2 0 47%, #ffffff 47% 53%, #d9534f 53% 100%);
  color: #1f2933;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18), inset 0 0 0 3px var(--accent);
}

.calendar-grid .blocked.selected {
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.calendar-grid > div:hover:not(.past):not(.booked):not(.blocked) {
  background: #e8e2d8;
  border-color: var(--line);
}

.calendar-grid .selected .calendar-day-price {
  color: #ffffff;
}

.calendar-grid .in-range .calendar-day-price {
  color: #6b4a2d;
}

.legend-box {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  margin-right: 6px;
}

.legend-box.available {
  background:#f7f4ee;
  border: 1px solid #ccc;
}

.legend-box.booked {
  background: #d9534f;
}

.legend-box.blocked {
  background: #8c8c8c;
}

/* Booking form */
.booking-panel {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 34px 32px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.booking-panel-header .section-title {
  margin-bottom: 12px;
}

#bookingForm {
  display:flex;
  flex-direction: column;
  gap: 16px;
  max-width: none;
  margin: auto;
  font-family: 'Montserrat', sans-serif;
}

.booking-field-group {
  display: grid;
  gap: 12px;
}

.booking-date-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.booking-date-field {
  display: grid;
  gap: 8px;
}

#bookingForm input,
#bookingForm select,
#bookingForm button,
#bookingForm textarea {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  font-size: 1rem;
  line-height: 1.25;
  border-radius: var(--radius-md);
  border: 1px solid #d8d1c7;
}

#bookingForm input:focus,
#bookingForm select:focus,
#bookingForm textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.15);
}

#applyDiscountBtn {
  padding: 10px 12px;
  font-size: 0.9rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.booking-intro-text {
  text-align: center;
  margin: 0 0 24px;
  font-size: 1rem;
  color: var(--muted);
}

.discount-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 8px;
  align-items: center;
}

.discount-code-row #discount_code {
  min-width: 0;
}

.pricing-summary {
  display: none;
  background: var(--surface-soft);
  border: 1px solid #d8d1c7;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 10px 0 18px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.booking-privacy-note {
  font-size: 0.8rem;
  text-align: center;
  color: #666;
  margin-top: 18px;
}

.booking-id-upload {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.booking-id-file-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid rgba(166, 124, 82, 0.32);
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  line-height: 1.2;
}

.booking-id-file-control input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.booking-id-file-button {
  flex: 0 0 auto;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent, #b18354);
  color: #fff !important;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.booking-id-file-button:hover,
.booking-id-file-button:focus {
  background: var(--accent-hover);
  color: #fff !important;
  text-decoration: none;
}

.booking-id-file-name {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.booking-id-upload p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

#bookingForm input[type="file"] {
  background: #ffffff;
}

#bookingForm input[type="date"],
#bookingForm select {
  color: #777;
}

#bookingForm input[type="date"] {
  min-width: 0;
  height: 46px;
  -webkit-appearance: none;
  appearance: none;
}

#bookingForm select {
  background-color: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

#bookingForm button {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  min-height: 46px;
  border-color: var(--accent);
  transition: background-color 0.18s ease, transform 0.18s ease;
}

#bookingForm button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Booking layout */
.booking-intro {
  position: relative;
  z-index: 1;
  background-image: url('https://www.maroonavecb.com/wp-content/uploads/2026/03/crested-butte-historic-cabin-rental.jpg');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  padding: 40px 20px;
  margin-bottom: 24px;
  margin-left: calc(-1 * var(--wp--style--root--padding-left));
  margin-right: calc(-1 * var(--wp--style--root--padding-right));
  border-radius: 0;
}

.booking-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(248, 246, 242, 0.55);
}

.frontend-page-booking .booking-intro {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.frontend-page-booking .booking-intro .calendar-section {
  background: transparent !important;
}

.frontend-page-booking > .calendar-section,
.frontend-page-booking > .booking-section {
  width: min(100%, 1500px);
  margin-left: auto;
  margin-right: auto;
}

.frontend-page-booking .booking-intro .calendar-section::before {
  display: none !important;
}

.calendar-weekdays div {
  font-size: 0.75rem;
}

.booking-section {
  margin-top: 30px;
}

#booking-anchor {
  scroll-margin-top: -10vh;
}

@media (max-width: 700px) {
  .calendar-wrapper {
    padding: 18px 14px;
  }

  .calendar-header {
    margin-bottom: 6px;
  }

  .calendar-header h3 {
    font-size: 1.45rem;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 5px;
  }

  .calendar-grid > div {
    min-height: 50px;
    padding: 8px 0 6px;
  }

  .calendar-legend {
    justify-content: flex-start;
    gap: 10px 16px;
  }

  .booking-panel {
    padding: 26px 18px;
  }

  .booking-date-grid,
  .discount-code-row {
    grid-template-columns: 1fr;
  }
}
