/*
 * "Build your trip wishlist" (templates/components/taste_calibration.html). Look and motion:
 * docs/onboarding-taste-calibration/DESIGN.md and its mockups (mockups/mockup.css holds the values used here).
 * Plain CSS, so the flow does not depend on the Tailwind build. The template links its parts in cascade order:
 * base (tokens, sheet, top bar, layout, type, glass), components (buttons, chips, product pieces), the steps who,
 * grid and ready, and last adaptive (screen sizes, motion, transparency, contrast), which overrides the others.
 */

/* The site reserves a stable scrollbar gutter; under the full-screen flow nothing scrolls, so it gives it back. */
html.tc-open { overflow: hidden; scrollbar-gutter: auto; }

dialog.tc {
  --tc-text: #f4f7fb;
  --tc-muted: #a9b4c6;
  --tc-sky: #1898ea;
  --tc-sky-light: #7cc8f8;
  --tc-save-text: #6ee7b7;
  --tc-save-fill: rgba(16, 185, 129, 0.16);
  --tc-heart: #ff5a6e;
  --tc-tile: #f5f7fa;
  --tc-solid: #16213a;
  --tc-solid-line: #2a3a5c;
  --tc-glass-fill: rgba(255, 255, 255, 0.09);
  --tc-glass-line: rgba(255, 255, 255, 0.18);
  --tc-glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.22);
  --tc-pad: 20px;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: var(--tc-text);
  background: #0b1220;
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
dialog.tc::backdrop { background: rgba(4, 8, 18, 0.72); }
dialog.tc [hidden] { display: none !important; }
dialog.tc button, dialog.tc a { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
dialog.tc button { margin: 0; }
dialog.tc :focus-visible { outline: 3px solid var(--tc-sky-light); outline-offset: 2px; }
dialog.tc [tabindex="-1"]:focus { outline: none; }
.tc-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.tc-icon { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tc-dot-fill { fill: currentColor; stroke: none; }

/* Dark hero: night-sky gradient with a sky glow top-right and a faint sunset glow bottom-left. */
.tc-surface {
  display: flex;
  flex-direction: column;
  height: 100%;
  background:
    radial-gradient(420px 380px at 92% 4%, rgba(24, 152, 234, 0.18), transparent 70%),
    radial-gradient(380px 360px at 0% 100%, rgba(250, 130, 50, 0.1), transparent 70%),
    linear-gradient(180deg, #0b1220 0%, #111c33 100%);
}

/* Top bar: progress dots, the step 2 title, Skip. */
.tc-top {
  flex: none;
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) minmax(0, max-content) minmax(max-content, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: max(6px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 0 max(var(--tc-pad), env(safe-area-inset-left));
}
.tc-dots { grid-column: 1; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tc-dots li { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.3); transition: width 200ms ease, background-color 200ms ease; }
.tc-dots li.is-current { width: 22px; background: var(--tc-sky); box-shadow: 0 0 10px rgba(24, 152, 234, 0.6); }
.tc-navtitle {
  grid-column: 2;
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.3px;
  text-align: center;
  text-wrap: balance;
}
.tc-skip {
  grid-column: 3;
  justify-self: end;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--tc-muted) !important;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
}
.tc-skip:hover { color: var(--tc-text) !important; }

/* Every step fills the sheet: its content scrolls, its footer stays put. */
.tc-step { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.tc-scroll { flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
/* What scrolls fades out under the top bar (or the tabs) and above a step's footer instead of ending in a hard
   edge. A mask fades the content only, never the sheet's glows behind it; every step's content starts below the top
   fade. */
.tc-scroll {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12px);
  mask-image: linear-gradient(180deg, transparent 0, #000 12px);
}
.tc-scroll:has(+ .tc-footer) {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent);
  mask-image: linear-gradient(180deg, transparent 0, #000 12px, #000 calc(100% - 24px), transparent);
}
/* Scrolled to its end, the content clears the bottom fade. */
.tc-scroll:has(+ .tc-footer) > .tc-column { padding-bottom: 24px; }
.tc-column, .tc-wide { width: 100%; margin: 0 auto; padding: 0 max(var(--tc-pad), env(safe-area-inset-right)) 0 max(var(--tc-pad), env(safe-area-inset-left)); }
.tc-column { max-width: calc(640px + 2 * var(--tc-pad)); }
.tc-wide { max-width: calc(1040px + 2 * var(--tc-pad)); }
.tc-footer { position: relative; flex: none; padding: 12px 0 max(20px, env(safe-area-inset-bottom)); }
.tc-footer .tc-column { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }

.tc-title {
  margin: 0;
  font-family: "Sora", "Public Sans", system-ui, sans-serif;
  font-size: 1.9375rem;
  font-weight: 700;
  line-height: 2.25rem;
  letter-spacing: -0.6px;
  text-wrap: balance;
}
.tc-subtitle { margin: 10px 0 0; font-size: 1.0312rem; line-height: 1.4375rem; letter-spacing: -0.1px; color: var(--tc-muted); }
.tc-footnote { margin: 0 0 8px; font-size: 0.8438rem; text-align: center; color: var(--tc-muted); }
.tc-label { margin: 0 0 10px; font-size: 0.8125rem; font-weight: 600; line-height: 1rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tc-muted); }

/* Glass, subtle: translucent fill, hairline, inner top highlight; floating surfaces also blur what is under them. */
.tc-chip, .tc-tabs, .tc-learn, .tc-tile, .tc-hero-card, .tc-pick-list, .tc-bar {
  background: var(--tc-glass-fill);
  border: 1px solid var(--tc-glass-line);
  box-shadow: var(--tc-glass-shadow);
}
.tc-chip, .tc-tabs, .tc-learn, .tc-hero-card, .tc-bar, .tc-heart {
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
}
