/* Food Tour Booking widget
   Accent color comes from --fct-brand (Settings → Accent color). Fonts inherit from your theme. */

.fct-root {
  --fct-brand: #2F6B4F;
  --fct-brand-ink: #FFFFFF;
  --fct-brand-soft: #EAF1EC;
  --fct-ink: #1F2421;
  --fct-muted: #6B716D;
  --fct-faint: #B9BFBA;
  --fct-line: #E3E6E3;
  --fct-soft: #F4F6F4;
  --fct-surface: #FFFFFF;
  --fct-danger: #B42318;
  --fct-radius-card: 16px;
  --fct-radius-cell: 10px;
  --fct-radius-input: 10px;
  color: var(--fct-ink);
  font-family: inherit;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
@supports (background: color-mix(in srgb, red 10%, white)) {
  .fct-root { --fct-brand-soft: color-mix(in srgb, var(--fct-brand) 11%, #FFFFFF); }
}

/* --- Neutralize theme styles on our controls --- */
.fct-root *, .fct-root *::before, .fct-root *::after { box-sizing: border-box; }
.fct-root button,
.fct-root input,
.fct-root textarea {
  font: inherit;
  color: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-shadow: none;
  box-shadow: none;
  margin: 0;
  min-height: 0;
  width: auto;
  line-height: 1.2;
}
.fct-root button { -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; cursor: pointer; border-radius: 0; }
.fct-root button:disabled { cursor: default; }
.fct-root h3, .fct-root h4, .fct-root p, .fct-root dl, .fct-root dd { margin: 0; padding: 0; }
.fct-root h3, .fct-root h4 { font-family: inherit; color: var(--fct-ink); letter-spacing: -0.01em; text-transform: none; }
.fct-root :focus-visible { outline: 2px solid var(--fct-brand); outline-offset: 2px; }

/* ================================================================
   Inline card + calendar
   ================================================================ */
.fct-root .fct-card {
  background: var(--fct-surface);
  border: 1px solid var(--fct-line);
  border-radius: var(--fct-radius-card);
  padding: 20px;
  max-width: 460px;
  margin: 0 auto;
}
.fct-root .fct-card--loading { min-height: 420px; }
.fct-root .fct-skeleton {
  height: 380px; border-radius: var(--fct-radius-cell);
  background: linear-gradient(90deg, var(--fct-soft) 0%, #ECEFEC 50%, var(--fct-soft) 100%);
  background-size: 200% 100%;
  animation: fct-shimmer 1.4s linear infinite;
}
@keyframes fct-shimmer { to { background-position: -200% 0; } }

.fct-root .fct-head { margin-bottom: 14px; }
.fct-root .fct-title { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.fct-root .fct-capacity { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.875rem; color: var(--fct-muted); }
.fct-root .fct-capacity-icon {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  background: var(--fct-brand-soft);
  box-shadow: inset 0 0 0 4px var(--fct-brand-soft), inset 0 0 0 16px var(--fct-brand);
}

.fct-root .fct-cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.fct-root .fct-cal-month { font-weight: 700; font-size: 1rem; }

.fct-root .fct-icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fct-ink); transition: background-color .15s ease;
}
.fct-root .fct-icon-btn:hover:not(:disabled) { background: var(--fct-soft); }
.fct-root .fct-icon-btn:disabled { opacity: .3; }
.fct-root .fct-chev { width: 9px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; display: block; }
.fct-root .fct-chev--left { transform: translateX(2px) rotate(135deg); }
.fct-root .fct-chev--right { transform: translateX(-2px) rotate(-45deg); }
.fct-root .fct-x { position: relative; width: 14px; height: 14px; display: block; }
.fct-root .fct-x::before, .fct-root .fct-x::after { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 14px; background: currentColor; border-radius: 1px; }
.fct-root .fct-x::before { transform: translateX(-50%) rotate(45deg); }
.fct-root .fct-x::after { transform: translateX(-50%) rotate(-45deg); }

.fct-root .fct-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fct-root .fct-wd { text-align: center; font-size: 0.75rem; color: var(--fct-muted); padding: 4px 0 6px; }

.fct-root .fct-day {
  position: relative;
  min-height: 54px;
  border-radius: var(--fct-radius-cell);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
  transition: background-color .12s ease, color .12s ease;
}
.fct-root .fct-day-num { font-size: 0.95rem; line-height: 1; }
.fct-root .fct-day-price { font-size: 0.65rem; line-height: 1; color: var(--fct-muted); white-space: nowrap; }

.fct-root .fct-day.is-closed { color: var(--fct-faint); }
.fct-root .fct-day.is-closed .fct-day-num { font-weight: 400; }
.fct-root .fct-day.is-open { color: var(--fct-ink); }
.fct-root .fct-day.is-open .fct-day-num { font-weight: 800; }
.fct-root .fct-day.is-open:hover { background: var(--fct-brand-soft); }
.fct-root .fct-day.is-today::after {
  content: ""; position: absolute; top: 6px; right: 7px; width: 4px; height: 4px; border-radius: 50%; background: var(--fct-faint);
}
.fct-root .fct-day.is-selected { background: var(--fct-brand); color: var(--fct-brand-ink); }
.fct-root .fct-day.is-selected .fct-day-price { color: var(--fct-brand-ink); opacity: .85; }
.fct-root .fct-day.is-selected:hover { background: var(--fct-brand); }

.fct-root .fct-selection { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--fct-line); }
.fct-root .fct-hint, .fct-root .fct-empty { font-size: 0.9rem; color: var(--fct-muted); }
.fct-root .fct-empty { padding: 24px 0; text-align: center; }

.fct-root .fct-time { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fct-root .fct-time-label { color: var(--fct-muted); font-size: 0.9rem; }
.fct-root .fct-time-value { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.fct-root .fct-summary { font-size: 0.9rem; color: var(--fct-ink); margin-bottom: 12px; text-wrap: pretty; }

/* ================================================================
   Buttons
   ================================================================ */
.fct-root .fct-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: filter .15s ease, background-color .15s ease;
}
.fct-root .fct-btn--block { width: 100%; }
.fct-root .fct-btn--primary { background: var(--fct-brand); color: var(--fct-brand-ink); }
.fct-root .fct-btn--primary:hover:not(:disabled) { filter: brightness(1.08); }
.fct-root .fct-btn--primary:disabled { opacity: .55; }
.fct-root .fct-btn--ghost {
  min-height: 46px; padding: 10px 16px; border-radius: var(--fct-radius-input);
  border: 1px solid var(--fct-line); background: var(--fct-surface); color: var(--fct-ink); font-size: 0.95rem;
}
.fct-root .fct-btn--ghost:hover:not(:disabled) { background: var(--fct-soft); }
.fct-root .fct-btn.is-loading::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: fct-spin .7s linear infinite;
}
@keyframes fct-spin { to { transform: rotate(360deg); } }

/* ================================================================
   Overlay
   ================================================================ */
.fct-root.fct-overlay {
  position: fixed; inset: 0; z-index: 2147483000;
  background: rgba(20, 24, 21, .5);
  display: none;
  align-items: flex-end; justify-content: center;
}
.fct-root.fct-overlay.is-open { display: flex; animation: fct-fade .18s ease-out; }
html.fct-scroll-lock, html.fct-scroll-lock body { overflow: hidden !important; }

.fct-root .fct-modal {
  position: relative;
  background: var(--fct-surface);
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex; flex-direction: column;
  outline: none;
  animation: fct-rise .24s cubic-bezier(.2, .8, .2, 1);
}
@keyframes fct-fade { from { opacity: 0; } }
@keyframes fct-rise { from { transform: translateY(24px); opacity: .6; } }

.fct-root .fct-modal-top {
  display: grid; grid-template-columns: 38px 1fr 38px; align-items: center;
  padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top));
}
.fct-root .fct-step { text-align: center; font-size: 0.8rem; color: var(--fct-muted); font-variant-numeric: tabular-nums; }

.fct-root .fct-context { padding: 0 20px 12px; border-bottom: 1px solid var(--fct-line); }
.fct-root .fct-context:empty { display: none; }
.fct-root .fct-context-name { font-weight: 800; font-size: 1.15rem; line-height: 1.25; }
.fct-root .fct-context-when { color: var(--fct-muted); font-size: 0.9rem; margin-top: 2px; }

.fct-root .fct-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 4px 20px 20px; }

.fct-root .fct-foot {
  border-top: 1px solid var(--fct-line);
  padding: 14px 20px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: var(--fct-surface);
}
.fct-root .fct-foot .fct-summary { margin-bottom: 12px; }

@media (min-width: 640px) {
  .fct-root.fct-overlay { align-items: center; padding: 24px; }
  .fct-root .fct-modal {
    max-width: 520px;
    height: auto;
    max-height: min(780px, calc(100vh - 48px));
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px -20px rgba(20, 24, 21, .45);
  }
  .fct-root .fct-modal-top { padding-top: 10px; }
  .fct-root .fct-foot { padding-bottom: 16px; }
  .fct-root .fct-day { min-height: 58px; }
}

/* ================================================================
   Frame content
   ================================================================ */
.fct-root .fct-section { padding: 18px 0; }
.fct-root .fct-section + .fct-section { border-top: 1px solid var(--fct-line); }
.fct-root .fct-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.fct-root .fct-section-head h4 { font-size: 1rem; font-weight: 700; }
.fct-root .fct-muted { color: var(--fct-muted); font-size: 0.85rem; font-weight: 400; }

.fct-root .fct-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.fct-root .fct-row-text, .fct-root .fct-addon-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fct-root .fct-row-title { font-weight: 600; }
.fct-root .fct-row-sub { font-size: 0.85rem; color: var(--fct-muted); }

.fct-root .fct-stepper { display: flex; align-items: center; gap: 4px; flex: none; }
.fct-root .fct-step-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--fct-line); color: var(--fct-ink);
  font-size: 1.25rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.fct-root .fct-step-btn:hover:not(:disabled) { border-color: var(--fct-ink); }
.fct-root .fct-step-btn:disabled { opacity: .3; }
.fct-root .fct-count { min-width: 32px; text-align: center; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }

.fct-root .fct-addon {
  position: relative;
  display: grid; grid-template-columns: 22px 1fr auto; align-items: start; gap: 12px;
  padding: 14px; margin-top: 8px;
  border: 1px solid var(--fct-line); border-radius: 12px;
  cursor: pointer;
  transition: border-color .12s ease, background-color .12s ease;
}
.fct-root .fct-addon:hover { border-color: var(--fct-faint); }
.fct-root .fct-check { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.fct-root .fct-checkmark {
  grid-column: 1; width: 22px; height: 22px; margin-top: 1px;
  border: 2px solid var(--fct-faint); border-radius: 6px; background: var(--fct-surface);
  display: flex; align-items: center; justify-content: center;
}
.fct-root .fct-checkmark::after { content: ""; width: 6px; height: 11px; border: solid var(--fct-brand-ink); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); opacity: 0; }
.fct-root .fct-check:checked ~ .fct-checkmark { background: var(--fct-brand); border-color: var(--fct-brand); }
.fct-root .fct-check:checked ~ .fct-checkmark::after { opacity: 1; }
.fct-root .fct-check:focus-visible ~ .fct-checkmark { outline: 2px solid var(--fct-brand); outline-offset: 2px; }
.fct-root .fct-addon:has(.fct-check:checked) { border-color: var(--fct-brand); background: var(--fct-brand-soft); }
.fct-root .fct-addon-price { font-size: 0.875rem; font-weight: 600; white-space: nowrap; text-align: right; }

.fct-root .fct-field + .fct-field { margin-top: 14px; }
.fct-root .fct-label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.fct-root .fct-input {
  display: block; width: 100%;
  min-height: 46px; padding: 11px 12px;
  border: 1px solid #D5DAD6; border-radius: var(--fct-radius-input);
  background: var(--fct-surface);
  font-size: 16px; /* prevents iOS zoom */
  line-height: 1.35;
}
.fct-root textarea.fct-input { resize: vertical; min-height: 84px; }
.fct-root .fct-input:focus { border-color: var(--fct-brand); outline: none; box-shadow: 0 0 0 3px var(--fct-brand-soft); }
.fct-root .fct-input[readonly] { background: var(--fct-soft); }
.fct-root .fct-input--promo { text-transform: uppercase; }
.fct-root .fct-inline { display: flex; gap: 8px; }
.fct-root .fct-inline .fct-input { flex: 1 1 auto; min-width: 0; }
.fct-root .fct-help { font-size: 0.8rem; color: var(--fct-muted); margin-top: 6px; }
.fct-root .fct-help:empty { display: none; }
.fct-root .fct-help--ok { color: var(--fct-brand); font-weight: 600; }
.fct-root .fct-help--bad { color: var(--fct-danger); }

.fct-root .fct-breakdown:empty { display: none; }
.fct-root .fct-breakdown { margin-top: 14px; }
.fct-root .fct-line { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 0.925rem; font-variant-numeric: tabular-nums; }
.fct-root .fct-line span:first-child { color: var(--fct-muted); }
.fct-root .fct-line span:last-child { white-space: nowrap; }
.fct-root .fct-line--discount span:last-child { color: var(--fct-brand); font-weight: 600; }
.fct-root .fct-line--total { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--fct-ink); font-weight: 800; font-size: 1.05rem; }
.fct-root .fct-line--total span:first-child { color: var(--fct-ink); }

.fct-root .fct-payment { min-height: 180px; }
.fct-root .fct-secure { display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; }
.fct-root .fct-lock { flex: none; width: 11px; height: 9px; margin-top: 5px; background: var(--fct-muted); border-radius: 2px; position: relative; }
.fct-root .fct-lock::before { content: ""; position: absolute; left: 2px; top: -5px; width: 7px; height: 7px; border: 1.5px solid var(--fct-muted); border-bottom: 0; border-radius: 4px 4px 0 0; }

.fct-root .fct-error { color: var(--fct-danger); font-size: 0.875rem; margin-bottom: 10px; }
.fct-root .fct-error[hidden] { display: none; }

.fct-root .fct-spinner-wrap { display: flex; align-items: center; justify-content: center; min-height: 180px; }
.fct-root .fct-spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fct-line); border-top-color: var(--fct-brand); animation: fct-spin .8s linear infinite; }

/* Confirmation */
.fct-root .fct-thanks { padding: 28px 0 8px; text-align: left; }
.fct-root .fct-thanks-mark {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--fct-brand); position: relative; margin-bottom: 18px;
  animation: fct-pop .35s cubic-bezier(.2, .9, .3, 1.3);
}
.fct-root .fct-thanks-mark::after { content: ""; position: absolute; left: 21px; top: 14px; width: 12px; height: 22px; border: solid #FFF; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.fct-root .fct-thanks-mark.is-pending { background: #B7791F; }
.fct-root .fct-thanks-mark.is-failed { background: var(--fct-danger); }
.fct-root .fct-thanks-mark.is-pending::after,
.fct-root .fct-thanks-mark.is-failed::after {
  content: "!"; left: 0; top: 0; width: 100%; height: 100%; border: 0; transform: none;
  display: flex; align-items: center; justify-content: center;
  color: #FFF; font-weight: 800; font-size: 28px; line-height: 1;
}
@keyframes fct-pop { from { transform: scale(.6); opacity: 0; } }
.fct-root .fct-thanks-title { font-size: 1.6rem; font-weight: 800; line-height: 1.15; }
.fct-root .fct-thanks-lead { margin-top: 8px; color: var(--fct-muted); }
.fct-root .fct-thanks-summary { margin-top: 18px; font-weight: 600; text-wrap: pretty; }
.fct-root .fct-facts { margin-top: 16px; border-top: 1px solid var(--fct-line); }
.fct-root .fct-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--fct-line); font-size: 0.925rem; }
.fct-root .fct-facts dt { color: var(--fct-muted); }
.fct-root .fct-facts dd { text-align: right; font-weight: 600; }
.fct-root .fct-thanks-note { margin-top: 16px; padding: 12px 14px; background: var(--fct-brand-soft); border-radius: 10px; font-size: 0.925rem; white-space: pre-line; }

/* Small phones */
@media (max-width: 360px) {
  .fct-root .fct-card { padding: 16px 12px; }
  .fct-root .fct-day { min-height: 50px; }
  .fct-root .fct-day-price { font-size: 0.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .fct-root *, .fct-root *::before, .fct-root *::after { animation: none !important; transition: none !important; }
}

/* ================================================================
   Price tier switch (shared / private) and multiple start times
   ================================================================ */
.fct-root .fct-tiers { display: flex; gap: 6px; padding: 4px; margin-bottom: 14px; background: var(--fct-soft); border-radius: 12px; }
.fct-root .fct-tier {
  flex: 1 1 0; min-width: 0; padding: 9px 10px;
  border-radius: 9px; background: transparent; color: var(--fct-muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: background-color .12s ease, color .12s ease;
}
.fct-root .fct-tier:hover { color: var(--fct-ink); }
.fct-root .fct-tier.is-on { background: var(--fct-surface); color: var(--fct-ink); box-shadow: 0 1px 3px rgba(20, 24, 21, .12); }
.fct-root .fct-tier-label { font-weight: 700; font-size: 0.9rem; }
.fct-root .fct-tier-price { font-size: 0.75rem; }

.fct-root .fct-times { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.fct-root .fct-time-opt {
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--fct-line); color: var(--fct-ink);
  font-weight: 600; font-size: 0.95rem; font-variant-numeric: tabular-nums;
}
.fct-root .fct-time-opt:hover { border-color: var(--fct-faint); }
.fct-root .fct-time-opt.is-on { background: var(--fct-brand); border-color: var(--fct-brand); color: var(--fct-brand-ink); }

/* ================================================================
   Total price — shown above the button on the guests and details steps
   ================================================================ */
.fct-root .fct-total {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 0 14px; padding: 14px 16px;
  background: var(--fct-soft); border-radius: 12px;
}
.fct-root .fct-total-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fct-root .fct-total-label { font-weight: 800; font-size: 1.05rem; color: var(--fct-ink); }
.fct-root .fct-total-cart { font-size: 0.8rem; color: var(--fct-muted); line-height: 1.35; }
.fct-root .fct-total-amount {
  font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--fct-ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
@media (max-width: 360px) {
  .fct-root .fct-total-amount { font-size: 1.35rem; }
}

/* ================================================================
   Launch offer banner (new products, visitors already in the country)
   ================================================================ */
.fct-root .fct-launch {
  border: 1px solid var(--fct-brand);
  background: var(--fct-brand-soft);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 16px;
}
.fct-root .fct-launch-title {
  font-weight: 800; font-size: 1.05rem; line-height: 1.25; color: var(--fct-ink); margin-bottom: 6px;
}
.fct-root .fct-launch-text { font-size: 0.875rem; line-height: 1.5; color: var(--fct-ink); opacity: .85; white-space: pre-line; }

/* Discounted date: full price struck through, offer price in bold */
.fct-root .fct-day-price--off { display: flex; flex-direction: column; align-items: center; gap: 0; line-height: 1.1; }
.fct-root .fct-day-price--off s { opacity: .55; font-size: 0.58rem; }
.fct-root .fct-day-price--off b { color: var(--fct-brand); font-weight: 800; }
.fct-root .fct-day.is-selected .fct-day-price--off b { color: var(--fct-brand-ink); }
.fct-root .fct-offer-tag {
  display: inline-block; margin-bottom: 8px; padding: 4px 10px;
  background: var(--fct-brand); color: var(--fct-brand-ink);
  border-radius: 999px; font-size: 0.75rem; font-weight: 800; letter-spacing: .02em;
}
.fct-root .fct-time-opt.has-offer { border-color: var(--fct-brand); }
.fct-root .fct-time-off {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  background: var(--fct-brand); color: var(--fct-brand-ink); font-size: 0.7rem; font-weight: 800;
}
.fct-root .fct-time-opt.is-on .fct-time-off { background: var(--fct-brand-ink); color: var(--fct-brand); }
