/* ── Booking Calendar ──────────────────────────────────────────────────── */

.bk-loading {
  text-align: center;
  padding: 2rem 0;
  color: var(--color-brand-muted);
  font-family: 'Inter', sans-serif;
  font-style: italic;
}

/* Navigation wrapper */
.bk-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.bk-prev,
.bk-next {
  flex-shrink: 0;
  margin-top: 2.25rem;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-brand-outline);
  border-radius: 8px;
  background: none;
  color: var(--color-brand-primary);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.bk-prev:hover,
.bk-next:hover {
  background: var(--color-brand-surface);
  border-color: var(--color-brand-primary);
}

/* Month grid layout */
.bk-months {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .bk-months { grid-template-columns: 1fr 1fr; }
}

.bk-month-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-brand-muted);
  text-align: center;
  margin-bottom: 0.6rem;
}

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

/* Day-of-week headers */
.bk-dh {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-brand-muted);
  padding-bottom: 4px;
}

/* Day buttons */
.bk-day {
  aspect-ratio: 1;
  border: none;
  background: none;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--color-brand-on-dark);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.12s;
}

.bk-empty { background: none; }

.bk-avail {
  cursor: pointer;
}
.bk-avail:hover {
  background: var(--color-brand-primary-tint);
  color: var(--color-brand-primary-deep);
}

.bk-today {
  outline: 1.5px solid var(--color-brand-primary);
  outline-offset: -1.5px;
}

.bk-past {
  color: var(--color-brand-outline);
  cursor: not-allowed;
}

.bk-blocked {
  background: var(--color-brand-unavail-bg);
  color: var(--color-brand-unavail-text);
  cursor: not-allowed;
}

/* Departure-only: another booking starts here, so arrival is blocked but departure is fine.
   Diagonal split — left half clear (you can leave), right half taken (new guests arrive). */
.bk-departure-only {
  background: linear-gradient(to right, transparent 50%, var(--color-brand-unavail-bg) 50%);
  color: var(--color-brand-on-dark);
  cursor: pointer;
}
.bk-departure-only:hover {
  /* #fca5a5 is a fixed, more-saturated accent of the unavail-bg red, kept
     literal since it's a one-off hover blend rather than an independent token */
  background: linear-gradient(to right, var(--color-brand-primary-tint) 50%, #fca5a5 50%);
  color: var(--color-brand-primary-deep);
}

/* Selected check-in / check-out */
.bk-ci,
.bk-co {
  background: var(--color-brand-primary) !important;
  color: #fff !important;
  font-weight: 700;
  border-radius: 6px;
}

/* Hover range preview */
.bk-hover-range {
  background: var(--color-brand-primary-tint);
  color: var(--color-brand-primary-deep);
  border-radius: 0;
}

/* In-range days */
.bk-range {
  background: var(--color-brand-primary-tint);
  color: var(--color-brand-primary-deep);
  border-radius: 0;
}
.bk-ci + .bk-range,
.bk-range:first-child { border-radius: 6px 0 0 6px; }
.bk-range:last-child,
.bk-range + .bk-co   { border-radius: 0 6px 6px 0; }

/* Date summary line */
.bk-summary {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--color-brand-surface);
  border: 1px solid var(--color-brand-outline);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--color-brand-muted);
  font-style: italic;
  min-height: 2.5rem;
  transition: border-color 0.2s;
}

.bk-summary.bk-has-dates {
  border-color: var(--color-brand-primary);
  color: var(--color-brand-on-dark);
  font-style: normal;
  font-weight: 600;
}

/* ── Booking form ──────────────────────────────────────────────────────────── */
.bk-form {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-brand-outline);
}

.bk-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .bk-form-grid { grid-template-columns: 1fr 1fr; }
}

.bk-form-section-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-brand-muted);
  font-weight: 700;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-brand-outline);
}

.bk-label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-brand-muted);
  margin-bottom: 0.35rem;
}

.bk-label-note {
  font-size: 0.68rem;
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  font-weight: 400;
  /* Lighter one-off tint of brand-muted, kept literal to avoid shifting
     brand-muted's other usages across the calendar */
  color: #8aabb0;
}

.bk-input,
.bk-textarea {
  width: 100%;
  background: var(--color-brand-surface);
  border: 1px solid var(--color-brand-outline);
  border-radius: 8px;
  padding: 0.65rem 0.875rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--color-brand-on-dark);
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.bk-input:focus,
.bk-textarea:focus {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand-primary) 12%, transparent);
}

.bk-textarea { resize: vertical; min-height: 90px; }

.bk-error {
  margin-top: 0.75rem;
  padding: 0.6rem 0.875rem;
  background: var(--color-brand-warn-bg);
  border: 1px solid var(--color-brand-warn-border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: var(--color-brand-warn-text);
  display: none;
}
.bk-error.visible { display: block; }

.bk-submit {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 2.5rem;
  background: var(--color-brand-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s cubic-bezier(0.22, 1, 0.36, 1), filter 0.2s;
}

.bk-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-brand-primary) 30%, transparent);
  filter: brightness(1.1);
}

.bk-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-brand-primary) 18%, transparent);
}

.bk-checkbox-row {
  margin-top: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.bk-checkbox-row input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: var(--color-brand-primary);
  cursor: pointer;
}

.bk-checkbox-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--color-brand-muted);
  cursor: pointer;
  line-height: 1.5;
}

.bk-checkbox-label a {
  color: var(--color-brand-primary);
  text-decoration: underline;
}

.bk-disclaimer {
  margin-top: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: var(--color-brand-muted);
  font-style: italic;
}

/* ── Pricing Breakdown Card ────────────────────────────────────────────────── */
.bk-pricing {
  margin-top: 1.25rem;
  background: var(--color-brand-surface);
  border: 1px solid var(--color-brand-outline);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.bk-pricing[hidden] { display: none; }

.bk-pricing-header {
  background: var(--color-brand-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bk-pricing-header-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.bk-pricing-header-meta {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-brand-primary-tint);
  font-style: italic;
}

.bk-pricing-lines { padding: 0.25rem 0; }

.bk-pricing-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
  color: var(--color-brand-on-dark);
  border-bottom: 1px solid var(--color-brand-surface-mid);
}

.bk-pricing-line:last-child { border-bottom: none; }

.bk-pricing-label { color: var(--color-brand-muted); }

.bk-pricing-label strong {
  color: var(--color-brand-on-dark);
  font-weight: 600;
}

.bk-pricing-amount {
  font-weight: 600;
  white-space: nowrap;
  padding-left: 1rem;
}

.bk-pricing-line.negative .bk-pricing-amount { color: var(--color-brand-positive-text); }

/* BTW informational line — shown inside the fee block, not additive */
.bk-pricing-line--btw {
  font-size: 0.78rem;
  font-style: italic;
  background: var(--color-brand-surface-low);
}
.bk-pricing-line--btw .bk-pricing-label,
.bk-pricing-line--btw .bk-pricing-amount {
  color: var(--color-brand-muted);
  font-weight: 400;
}

/* Divider between accommodation lines and fees */
.bk-pricing-divider {
  height: 1px;
  background: var(--color-brand-outline);
  margin: 0.25rem 1.25rem;
}

.bk-pricing-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 1.25rem;
  background: var(--color-brand-surface-low);
  border-top: 2px solid var(--color-brand-outline);
  color: var(--color-brand-on-dark);
}

.bk-pricing-total-label {
  font-size: 1rem;
  font-weight: 700;
}

.bk-pricing-total-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}

.bk-pricing-total-amount {
  font-size: 1.25rem;
  font-weight: 700;
}

.bk-pricing-total-avg {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--color-brand-muted);
}

.bk-pricing-min-warn {
  padding: 0.45rem 1.25rem 0.55rem;
  font-size: 0.78rem;
  color: var(--color-brand-warn-text);
  background: var(--color-brand-warn-bg);
  border-top: 1px solid var(--color-brand-warn-border);
}

.bk-pricing-breakfast {
  padding: 0.5rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-brand-muted);
  border-top: 1px solid var(--color-brand-surface-mid);
  line-height: 1.5;
}

.bk-crib-notice {
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 0.65rem 0.875rem;
  background: var(--color-brand-surface-low);
  border: 1px solid var(--color-brand-outline);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  color: var(--color-brand-muted);
  line-height: 1.5;
}

.bk-crib-notice strong {
  color: var(--color-brand-on-dark);
  font-weight: 600;
}

.bk-pricing-estimate {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  font-size: 0.72rem;
  color: var(--color-brand-muted);
  font-style: italic;
  border-top: 1px solid var(--color-brand-surface-mid);
  line-height: 1.5;
}

.bk-pricing-estimate::before {
  content: "ℹ";
  font-style: normal;
  flex-shrink: 0;
  margin-top: 0.05em;
}
