/**
 * NST Booking — front-end calendar widget + admin calendar styles
 * Matches NST theme navy / champagne gold language.
 */

:root {
  --nst-ink: #1a2b34;
  --nst-paper: #faf8f4;
  --nst-cream: #f3efe6;
  --nst-gold: #c9b376;
  --nst-gold-aa: #a8904f;
  --nst-moss: #2f5d45;
  --nst-danger: #8b2e2e;
  --nst-radius: 12px;
  --nst-font: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --nst-sans: "DM Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.nst-book {
  background: var(--nst-paper);
  color: var(--nst-ink);
  font-family: var(--nst-sans);
  border: 1px solid rgba(26, 43, 52, 0.1);
  border-radius: calc(var(--nst-radius) + 4px);
  box-shadow: 0 18px 40px rgba(26, 43, 52, 0.08);
  overflow: hidden;
  max-width: none;
  width: 100%;
}

.nst-book__layout {
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(300px, 0.95fr);
  gap: 0;
  min-height: 520px;
}

.nst-book__calendar-panel {
  background: linear-gradient(165deg, #1a2b34 0%, #243d4a 55%, #1a2b34 100%);
  color: #fafafa;
  padding: 1.5rem 1.35rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.nst-book__details-panel {
  padding: 1.6rem 1.5rem 1.75rem;
  background: var(--nst-paper);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.nst-book__header { margin: 0 0 0.25rem; }

.nst-book__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--nst-gold-aa);
  font-weight: 600;
}

.nst-book__title {
  font-family: var(--nst-font);
  font-size: clamp(1.45rem, 2.2vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.55rem;
  color: var(--nst-ink);
  line-height: 1.2;
}

.nst-book__price-line,
.nst-book__deposit-line {
  margin: 0.1rem 0;
  font-size: 0.95rem;
}

.nst-book__price-label { color: rgba(26, 43, 52, 0.65); margin-right: 0.35rem; }

.nst-book__price {
  color: var(--nst-ink);
  font-size: 1.25rem;
  font-family: var(--nst-font);
}

.nst-book__deposit-line { color: rgba(26, 43, 52, 0.7); font-size: 0.9rem; }

.nst-book__cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.nst-book__cal-title {
  margin: 0;
  font-family: var(--nst-font);
  font-size: 1.35rem;
  font-weight: 600;
  color: #fff;
}

.nst-book__cal-nav {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nst-book__cal-nav:hover {
  background: rgba(201, 179, 118, 0.25);
  border-color: var(--nst-gold);
}

.nst-book__cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.55);
}

.nst-book__cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3rem;
}

.nst-book__day {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.35);
  aspect-ratio: 1;
  border-radius: 10px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: default;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.nst-book__day.is-empty {
  background: transparent;
  visibility: hidden;
}

.nst-book__day.is-open {
  background: rgba(201, 179, 118, 0.16);
  color: #fff;
  cursor: pointer;
}

.nst-book__day.is-open:hover {
  background: rgba(201, 179, 118, 0.32);
  transform: translateY(-1px);
}

.nst-book__day.is-closed {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.28);
  text-decoration: line-through;
  cursor: not-allowed;
}

.nst-book__day.is-past {
  opacity: 0.35;
  cursor: not-allowed;
}

.nst-book__day.is-selected {
  background: var(--nst-gold) !important;
  color: var(--nst-ink) !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.nst-book__day.is-loading {
  opacity: 0.5;
}

.nst-book__cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: rgba(250, 250, 250, 0.7);
}

.nst-book__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nst-book__legend-item::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 3px;
  display: inline-block;
}

.nst-book__legend-item--open::before { background: rgba(201, 179, 118, 0.55); }
.nst-book__legend-item--closed::before { background: rgba(255, 255, 255, 0.18); }
.nst-book__legend-item--event::before { background: #C9B376; }
.nst-book__day.is-event {
  border-color: rgba(201, 179, 118, 0.7);
  color: #C9B376;
  cursor: pointer;
  pointer-events: auto;
  text-decoration: line-through;
  text-decoration-color: #C9B376;
}
.nst-book__day.is-event:hover,
.nst-book__day.is-event.is-focused {
  background: rgba(201, 179, 118, 0.22);
  border-color: #C9B376;
}
.nst-book__event-upsell {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(201, 179, 118, 0.14);
  border: 1px solid rgba(201, 179, 118, 0.45);
  display: grid;
  gap: 0.35rem;
}
.nst-book__event-upsell[hidden] {
  display: none;
}
.nst-book__event-upsell-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.7);
}
.nst-book__event-upsell-title {
  font-family: var(--nst-font-serif, Georgia, "Times New Roman", serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #FAFAFA;
  line-height: 1.25;
}
.nst-book__event-upsell-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
  color: #C9B376;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.nst-book__event-upsell-cta:hover {
  text-decoration: underline;
}
.nst-book__month-events {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.nst-book__month-events[hidden] {
  display: none;
}
.nst-book__month-events-label {
  margin: 0 0 0.45rem;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(250, 250, 250, 0.65);
}
.nst-book__month-events-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.nst-book__month-events-list a {
  color: #C9B376;
  font-size: 0.88rem;
  text-decoration: none;
}
.nst-book__month-events-list a:hover {
  text-decoration: underline;
}
.nst-book__month-events-list span {
  color: rgba(250, 250, 250, 0.55);
  font-size: 0.8rem;
}
.nst-book__legend-item--selected::before { background: var(--nst-gold); }

.nst-book__selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  background: var(--nst-cream);
  border-radius: 10px;
  border-left: 3px solid var(--nst-gold);
}

.nst-book__selected[hidden] { display: none; }

.nst-book__selected-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26, 43, 52, 0.65);
}

.nst-book__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 0.75rem;
}

.nst-book__field {
  display: grid;
  gap: 0.3rem;
  grid-column: 1 / -1;
}

.nst-book__field--half { grid-column: span 1; }

.nst-book__field label,
.nst-book__cruise legend {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(26, 43, 52, 0.68);
  font-weight: 600;
}

.nst-book__field-hint {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(26, 43, 52, 0.55);
}

.nst-book__field input,
.nst-book__field textarea,
.nst-book__cruise input {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(26, 43, 52, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--nst-ink);
}

.nst-book__field input:focus,
.nst-book__field textarea:focus {
  outline: 2px solid rgba(201, 179, 118, 0.55);
  outline-offset: 1px;
  border-color: var(--nst-gold-aa);
}

.nst-book__cruise {
  grid-column: 1 / -1;
  border: 1px dashed rgba(201, 179, 118, 0.7);
  padding: 0.85rem;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  border-radius: 10px;
  background: rgba(201, 179, 118, 0.06);
}

.nst-book__cruise .nst-book__field { grid-column: 1 / -1; }
.nst-book__cruise .nst-book__field--half { grid-column: span 1; }

.nst-book__hint {
  font-size: 0.85rem;
  margin: 0;
  min-height: 1.2em;
  color: rgba(250, 250, 250, 0.75);
}

.nst-book__hint.is-open { color: #d7e7c8; }
.nst-book__hint.is-closed { color: #f0c2c2; }

.nst-book__summary {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  color: rgba(26, 43, 52, 0.8);
}

.nst-book__error {
  color: var(--nst-danger);
  margin: 0;
  font-size: 0.9rem;
}

.nst-book__btn {
  appearance: none;
  border: 0;
  background: var(--nst-gold);
  color: var(--nst-ink);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 0.95rem 1.2rem;
  cursor: pointer;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
  width: 100%;
}

.nst-book__btn:hover:not(:disabled) {
  background: #d4c08a;
  transform: translateY(-1px);
}

.nst-book__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.nst-book__secure-note {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(26, 43, 52, 0.55);
}

.nst-book__payment-choice {
  margin: 0.35rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(26, 43, 52, 0.12);
  border-radius: 12px;
  background: rgba(248, 245, 238, 0.65);
  display: grid;
  gap: 0.65rem;
}

.nst-book__payment-choice legend {
  padding: 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(26, 43, 52, 0.7);
}

.nst-book__pay-option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #fff;
  cursor: pointer;
}

.nst-book__pay-option:has(input:checked) {
  border-color: rgba(184, 149, 74, 0.55);
  box-shadow: 0 0 0 1px rgba(184, 149, 74, 0.2);
}

.nst-book__pay-option input {
  margin-top: 0.2rem;
}

.nst-book__pay-option strong {
  display: block;
  font-size: 0.95rem;
  color: #1a2b34;
}

.nst-book__pay-option em {
  display: block;
  margin-top: 0.15rem;
  font-style: normal;
  font-size: 0.82rem;
  color: rgba(26, 43, 52, 0.65);
  line-height: 1.35;
}

.nst-book__payment-locked {
  margin: 0.25rem 0 0;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(248, 245, 238, 0.85);
  border: 1px solid rgba(26, 43, 52, 0.08);
  font-size: 0.9rem;
  color: rgba(26, 43, 52, 0.78);
}

.nst-book__terms {
  margin: 0.15rem 0 0;
}

.nst-book__terms-label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(26, 43, 52, 0.85);
  cursor: pointer;
}

.nst-book__terms-label input {
  margin-top: 0.2rem;
}

.nst-book__terms-label a {
  color: #8a6d2f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Event seat booking (single-column, fixed date) */
.nst-book__layout--event {
  grid-template-columns: 1fr;
  min-height: 0;
}
.nst-book__details-panel--event {
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
  padding: 1.75rem 1.5rem 1.85rem;
}
.nst-book__meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.85rem 0 0.5rem;
}
.nst-book__chip {
  background: var(--nst-cream);
  border: 1px solid rgba(26, 43, 52, 0.08);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.nst-book__chip-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26, 43, 52, 0.55);
  font-weight: 600;
}
.nst-book__chip-value {
  font-family: var(--nst-font);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--nst-ink);
  line-height: 1.25;
  word-break: break-word;
}
.nst-book__checkout {
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(26, 43, 52, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.nst-book__details-panel--event .nst-book__summary {
  font-weight: 600;
  color: var(--nst-ink);
}
.nst-book__details-panel--event .nst-book__hint.is-closed {
  color: var(--nst-danger);
  background: rgba(139, 46, 46, 0.08);
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
}
@media (max-width: 640px) {
  .nst-book__meta-row {
    grid-template-columns: 1fr;
  }
}

.nst-book__quote {
  padding: 2rem 1.75rem;
  max-width: 28rem;
}

.nst-book__quote p { margin: 0 0 1rem; }

.nst-book-error { color: var(--nst-danger); }

@media (max-width: 900px) {
  .nst-book__layout {
    grid-template-columns: 1fr;
  }

  .nst-book__calendar-panel {
    padding-bottom: 1.25rem;
  }

  .nst-book__day {
    min-height: 2.5rem;
    aspect-ratio: auto;
  }
}

@media (max-width: 560px) {
  .nst-book__fields,
  .nst-book__cruise {
    grid-template-columns: 1fr;
  }

  .nst-book__field--half,
  .nst-book__cruise .nst-book__field--half {
    grid-column: 1 / -1;
  }

  .nst-book__details-panel,
  .nst-book__calendar-panel {
    padding: 1.25rem 1rem 1.4rem;
  }
}

/* Admin calendar (unchanged structure) */
.nst-admin-cal__nav {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.nst-admin-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  margin: 1rem 0 1.5rem;
  background: #d8d8d8;
  border: 1px solid #cfcfcf;
}

.nst-admin-cal__head {
  background: #1d2b24;
  color: #f4efe4;
  padding: 0.45rem;
  text-align: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nst-admin-cal__cell {
  background: #fff;
  min-height: 5.5rem;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nst-admin-cal__cell.is-empty { background: #f3f3f3; }
.nst-admin-cal__day { font-weight: 700; font-size: 0.8rem; }

.nst-admin-cal__event {
  display: block;
  font-size: 0.72rem;
  line-height: 1.25;
  padding: 0.15rem 0.3rem;
  text-decoration: none;
  border-radius: 2px;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nst-admin-cal__event.is-booking { background: #d7ebe0; }
.nst-admin-cal__event.is-pending { background: #f4e6c8; }
.nst-admin-cal__event.is-confirmed { background: #cfe8d8; }
.nst-admin-cal__event.is-cancelled { background: #f0d4d4; text-decoration: line-through; }
.nst-admin-cal__event.is-completed { background: #d9e2f0; }
.nst-admin-cal__event.is-block { background: #e8e0f0; }
.nst-admin-cal__event.is-event { background: #f3e6c4; border: 1px solid #c9b376; }
.nst-admin-block-form label { margin-right: 0.75rem; }
