/* ============================================================================
   Souper - souper-overrides.css   (ENGINE-OWNED - loaded AFTER styles.css)
   ----------------------------------------------------------------------------
   Custom styling that must survive a Claude Design styles.css re-export lives
   here (Claude Design never ships this file). Currently: the single-screen
   mobile shell that replaces the 4-phone review stage.

   The design's screens already lay out correctly inside a flex column with an
   absolutely-positioned .tabbar overlaying the bottom (the scroll areas carry
   100px bottom padding to clear it). We just reproduce that context at full
   viewport: one screen at a time, persistent tab bar, no fake phone chrome.

   Load order (set in build.js): the <link> comes AFTER styles.css.
   ========================================================================== */

/* Full-viewport app container (replaces the multi-phone .stage canvas). */
.mobile-app {
  position: relative;            /* positioning context for the .tabbar overlay */
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;              /* keeps it phone-width on desktop */
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;                /* dynamic vh: respects mobile browser chrome */
  background: var(--cream, #f4ede2);
  overflow: hidden;
}

/* The active screen fills the space; the tab bar overlays its bottom edge,
   exactly as it did inside the old phone frame. */
.mobile-content {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mobile-content > * {            /* the screen component (rate/feed/saved/you) */
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

/* Respect the phone's home-indicator / safe area at the bottom of the tab bar. */
.mobile-app .tabbar {
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  height: auto;
  min-height: 88px;
}

/* Clear the overlaying tab bar so no screen's content hides behind it.
   The scroll screens already reserve ~100px; we top that up with the safe-area
   inset, and give the (non-scrolling) Rate screen the same clearance so its
   action buttons aren't covered. */
.feed-scroll,
.saved-scroll,
.profile-scroll {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}
.rate-body {
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}

/* In a standalone (installed) PWA the screen runs edge-to-edge; keep content
   out from under the notch / status bar. No effect in a normal browser tab. */
.mobile-app {
  padding-top: env(safe-area-inset-top, 0px);
}

/* ============================================================================
   RATE CARD REWORK  (engine-owned, survives a styles.css re-export)
   ----------------------------------------------------------------------------
   Fills the empty Rate card: flavour tags + a short dish blurb, and a
   Previous/Next button pair. The slider itself is untouched. The Rate screen
   does NOT scroll, so the blurb is line-clamped and the rows are capped to
   guarantee no overflow or overlap on short phones.
   ========================================================================== */

/* Flavour tags under the meta pills. Subtle filled chips (no dot/border) so
   they read as secondary to the .pill meta row above them. */
.rate-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -4px;              /* tuck close under the pills (body gap is 14) */
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--clay-06, rgba(42, 33, 28, 0.06));
  color: var(--clay-70, rgba(42, 33, 28, 0.72));
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Short dish blurb. Clamped to 3 lines so a long description can never push the
   slider or buttons off the fixed-height Rate screen. */
.rate-desc {
  margin: 0;
  color: var(--clay-50, rgba(42, 33, 28, 0.55));
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Centre the slider in the slack between the top block and the buttons so the
   card reads balanced rather than top-heavy. Paired with .rate-actions' own
   margin-top:auto, the two auto-margins split the free space evenly. */
.rate-body .heat { margin-top: auto; }

/* Previous / Next on one row; the "I don't know it" skip link stays below. */
.rate-nav { display: flex; gap: 10px; }
.rate-nav .btn-primary,
.rate-nav .btn-secondary { flex: 1 1 0; margin: 0; }

/* Previous = outlined/secondary so Next (filled clay) stays the obvious action. */
.btn-secondary {
  height: 56px;
  border-radius: 18px;
  background: transparent;
  color: var(--clay, #2A211C);
  border: 1.5px solid var(--clay-12, rgba(42, 33, 28, 0.12));
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn-secondary:hover {
  background: rgba(42, 33, 28, 0.04);
  border-color: var(--clay-30, rgba(42, 33, 28, 0.30));
}
.btn-secondary:active { transform: scale(0.985); }
.btn-secondary:disabled { opacity: 0.32; cursor: default; }
.btn-secondary:disabled:hover {
  background: transparent;
  border-color: var(--clay-12, rgba(42, 33, 28, 0.12));
}
