/* ── Design tokens ───────────────────────────────────────────── */
.s7 {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #fafbfd;
  --border: #e5e8ee;
  --border-strong: #d0d6df;
  --text: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;
  --accent: #0d9b6c;
  --accent-soft: #e6f6f0;
  --accent-strong: #0a7a55;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 6px 24px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --btn-bg: var(--accent);
}

/* ── Root ────────────────────────────────────────────────────── */
.s7 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  box-sizing: border-box;
  padding: 15px;
  /* Explicit width so container-type: inline-size (below) has something to
     measure — without it, host themes that wrap the shortcode in a flex/grid
     column can collapse this to near-zero width, breaking the layout. */
  width: 100%;
  min-width: 0;
}

.s7 *, .s7 *::before, .s7 *::after { box-sizing: border-box; }

/* ── Notice ──────────────────────────────────────────────────── */
.s7-notice {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.s7-notice.s7-notice-error {
  background: #fff1f1;
  color: #8c1d1d;
  border: 1px solid #f2c4c4;
}

/* ── Step indicator ──────────────────────────────────────────── */
.s7-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
}

.s7-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-weight: 500;
}

.s7-step + .s7-step::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--border-strong);
  margin: 0 4px;
}

.s7-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  flex-shrink: 0;
}

.s7-step.s7-step-active { color: var(--text); }
.s7-step.s7-step-active .s7-step-num {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.s7-step.s7-step-done { color: var(--text); }
.s7-step.s7-step-done .s7-step-num {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ── Two-column grid ─────────────────────────────────────────── */
.s7-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.s7-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* ── Room tabs ───────────────────────────────────────────────── */
.s7-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  gap: 2px;
}

.s7-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  font-family: inherit;
}

.s7-tab:hover { color: var(--text); }
.s7-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Date chips (above calendar) ─────────────────────────────── */
.s7-date-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.s7-date-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex: 1 1 180px;
  min-width: 0;
}

.s7-date-chip svg { color: var(--accent); flex-shrink: 0; }
.s7-date-chip small {
  display: block;
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.s7-date-chip strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.s7-date-arrow { color: var(--text-3); font-size: 18px; padding: 0 4px; flex-shrink: 0; }

.s7-nights-chip {
  padding: 8px 14px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Calendar wrapper ────────────────────────────────────────── */
.s7-cal-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* ── Two-month grid ──────────────────────────────────────────── */
.s7-cal-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.s7-cal-month-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.s7-cal-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.s7-cal-month-title {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 1;
}

.s7-cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.12s;
  flex-shrink: 0;
}

.s7-cal-nav-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-2);
}

/* ── Calendar grid ───────────────────────────────────────────── */
.s7-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.s7-cal-wd {
  text-align: center;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 0;
  letter-spacing: 0.04em;
}

.s7-cal-cell {
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  transition: background 0.1s;
}

.s7-cal-cell:not(:disabled):hover { background: var(--surface-2); }
.s7-cal-cell.cal-empty { background: transparent; cursor: default; }
.s7-cal-cell.cal-past { color: var(--text-3); cursor: not-allowed; opacity: 0.4; }
.s7-cal-cell.cal-blocked {
  color: var(--text-3);
  cursor: not-allowed;
  opacity: 0.38;
  background: repeating-linear-gradient(
    135deg,
    transparent 0 4px,
    rgba(15,23,42,0.05) 4px 5px
  );
}

.s7-cal-cell.cal-today span {
  outline: 1.5px solid var(--text);
  outline-offset: -1.5px;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.s7-cal-cell.cal-range {
  background: var(--accent-soft);
  border-radius: 0;
}

.s7-cal-cell.cal-start,
.s7-cal-cell.cal-end {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

.s7-cal-cell.cal-start { border-radius: 8px 0 0 8px; }
.s7-cal-cell.cal-end { border-radius: 0 8px 8px 0; }
.s7-cal-cell.cal-start.cal-end { border-radius: 8px; }
.s7-cal-cell.cal-start:hover,
.s7-cal-cell.cal-end:hover { background: var(--accent-strong) !important; }

/* ── Calendar legend ─────────────────────────────────────────── */
.s7-cal-legend {
  display: flex;
  gap: 16px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-2);
  flex-wrap: wrap;
}

.s7-leg { display: inline-flex; align-items: center; gap: 6px; }
.s7-leg i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.s7-leg-avail i { background: var(--surface); border: 1px solid var(--border-strong); }
.s7-leg-blocked i {
  background: repeating-linear-gradient(
    135deg,
    var(--surface-2) 0 3px,
    rgba(15,23,42,0.08) 3px 4px
  );
  border: 1px solid var(--border-strong);
}
.s7-leg-selected i { background: var(--accent); }

/* ── Booking card sidebar (step 1) ───────────────────────────── */
.s7-book-card {
  position: sticky;
  top: 24px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0;
}

.s7-book-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--border);
}

.s7-book-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.s7-book-price strong { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.s7-book-price span { color: var(--text-3); font-size: 13px; }

/* ── Dates grid in booking card ──────────────────────────────── */
.s7-book-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.s7-book-date-cell {
  padding: 10px 14px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.s7-book-date-cell:last-child { border-right: 0; }
.s7-book-date-cell small {
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.s7-book-date-cell strong { font-size: 13.5px; font-weight: 600; }

/* ── Guests in booking card ──────────────────────────────────── */
.s7-book-guests {
  padding: 6px 14px 10px;
  border-bottom: 1px solid var(--border);
}

.s7-guests-list { display: flex; flex-direction: column; }

.s7-guest-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  gap: 16px;
}
.s7-guests-list .s7-guest-row:first-child { border-top: 0; }

.s7-guest-label { font-weight: 600; font-size: 13.5px; }
.s7-guest-sub { color: var(--text-3); font-size: 12px; }

/* ── Stepper ─────────────────────────────────────────────────── */
.s7-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}

.s7-stepper-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  font-family: inherit;
}
.s7-stepper-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.s7-stepper-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.s7-stepper-val {
  width: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ── Price breakdown (step 1 sidebar) ───────────────────────── */
.s7-book-empty {
  margin: 14px;
  text-align: center;
  padding: 14px;
  color: var(--text-3);
  font-size: 12.5px;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.s7-sum-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
  padding: 14px;
}
.s7-sum-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  gap: 12px;
}
.s7-sum-list dt { color: var(--text-2); margin: 0; }
.s7-sum-list dd { margin: 0; color: var(--text); font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

.s7-sum-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 14px;
  margin: 0 14px 14px;
  background: linear-gradient(135deg, var(--text) 0%, #1e293b 100%);
  color: white;
  border-radius: var(--radius);
}
.s7-sum-total span { font-size: 13px; opacity: 0.7; }
.s7-sum-total strong {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.s7-sum-note {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.45;
  text-align: center;
  padding: 4px 14px 14px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.s7-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
  text-decoration: none;
}

.s7-btn-primary {
  background: var(--btn-bg);
  color: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.18);
}
.s7-btn-primary:hover:not(:disabled) { background: var(--btn-bg); filter: brightness(0.9); }
.s7-btn-primary:disabled { background: var(--border-strong); cursor: not-allowed; box-shadow: none; filter: none; }

.s7-btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.s7-btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.s7-btn-lg { padding: 12px 22px; font-size: 14px; }
.s7-btn-block { width: 100%; justify-content: center; }

/* Proceed button inside booking card */
.s7-book-card .s7-btn-primary {
  margin: 0 14px 6px;
  width: calc(100% - 28px);
}

/* ── Step 2: Breadcrumbs ─────────────────────────────────────── */
.s7-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 20px;
}

.s7-crumb-link {
  background: none;
  border: 0;
  color: var(--text-2);
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: -8px;
  border-radius: 6px;
  transition: all 0.12s;
  font-size: 13px;
}
.s7-crumb-link:hover { background: var(--surface-2); color: var(--text); }
.s7-crumb-sep { color: var(--text-3); }
.s7-crumb-current { color: var(--text); font-weight: 500; }

/* ── Section ─────────────────────────────────────────────────── */
.s7-section { display: flex; flex-direction: column; gap: 16px; }
.s7-section-head h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.s7-section-head p { margin: 0; color: var(--text-2); font-size: 13.5px; }

/* ── Form grid ───────────────────────────────────────────────── */
.s7-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.s7-field { display: flex; flex-direction: column; gap: 6px; }
.s7-field-full { grid-column: 1 / -1; }

.s7-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.s7-field-label svg { color: var(--text-3); }
.s7-field-optional { color: var(--text-3); font-weight: 400; font-size: 11.5px; margin-left: auto; }

.s7-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  transition: all 0.12s;
}
.s7-input:hover { border-color: var(--border-strong); }
.s7-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13,155,108,0.18);
}

.s7-textarea { resize: vertical; min-height: 70px; }

/* ── TOS checkbox ────────────────────────────────────────────── */
.s7-tos {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
}
.s7-tos input { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.s7-tos a { color: var(--accent-strong); font-weight: 500; }

/* ── Form actions ────────────────────────────────────────────── */
.s7-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 4px;
}

/* ── Summary sidebar (step 2) ────────────────────────────────── */
.s7-summary {
  position: sticky;
  top: 24px;
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.s7-sum-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.s7-sum-body h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.s7-sum-loc {
  color: var(--text-3);
  font-size: 12.5px;
  display: inline-flex;
  align-items: flex-start;
  gap: 4px;
}
.s7-sum-loc svg { flex-shrink: 0; margin-top: 2px; }

.s7-sum-divider { height: 1px; background: var(--border); }

/* Summary uses same s7-sum-list but no padding override */
.s7-sum-body .s7-sum-list { padding: 0; }

/* Summary total inside sum-body */
.s7-sum-body .s7-sum-total { margin: 0; }

/* ── Success screen ──────────────────────────────────────────── */
.s7-success {
  padding: 56px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.s7-success-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  box-shadow: 0 12px 28px rgba(13,155,108,0.35);
}

.s7-success h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.s7-success > p {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.55;
  max-width: 480px;
}

.s7-success-card {
  margin: 16px 0 8px;
  width: 100%;
  max-width: 480px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.s7-success-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.s7-success-label {
  color: var(--text-3);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.s7-success-card .s7-sum-list { padding: 0; }

.s7-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── Review step (3-step mode) ───────────────────────────────── */
.s7-review-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 560px;
}

.s7-review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}

.s7-review-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.s7-review-card .s7-sum-list { padding: 0; }
.s7-review-card .s7-sum-total { margin: 0; }

.s7-review-actions {
  padding-top: 0;
}

/* ── Container query setup ───────────────────────────────────── */
.s7 { container-type: inline-size; }

/* ── Responsive (container-based, not viewport-based) ─────────── */

/* Collapse sidebar below calendar at < 860px container width */
@container (max-width: 860px) {
  .s7-grid { grid-template-columns: 1fr; gap: 20px; }
  .s7-book-card { position: static; }
  .s7-summary { position: static; }
}

/* Single-month calendar at < 640px */
@container (max-width: 640px) {
  .s7-cal-months { grid-template-columns: 1fr; }
  .s7-form-grid { grid-template-columns: 1fr; }
}

/* Tighten spacing at < 420px */
@container (max-width: 420px) {
  .s7-success { padding: 36px 16px; }
  .s7-cal-wrap { padding: 12px; }
  .s7-date-summary { flex-direction: column; }
  .s7-date-arrow { display: none; }
  .s7-date-chip { flex: 1 1 100%; }
}

/* Fallback @media for browsers without container query support */
@supports not (container-type: inline-size) {
  @media (max-width: 900px) {
    .s7-grid { grid-template-columns: 1fr; gap: 20px; }
    .s7-book-card { position: static; }
    .s7-summary { position: static; }
    .s7-cal-months { grid-template-columns: 1fr; }
  }
  @media (max-width: 640px) {
    .s7-form-grid { grid-template-columns: 1fr; }
    .s7-success { padding: 36px 16px; }
  }
}
