/* ================================================================
   Plan Reveal — "Your week is ready." Shown once after a successful
   authenticated full-week generation (Dashboard + Meal Planner).
   Tokens only (public/css/tokens.css); dark mode inherits automatically
   from the [data-theme="dark"] token overrides already defined there.
   Mobile-first: full-bleed at phone widths (the screenshot/TikTok
   surface), a centered card from tablet up.
   ================================================================ */

body.plan-reveal-open { overflow: hidden; }

.plan-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-reveal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--clr-scrim);
}

.plan-reveal-card {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 480px;
  max-height: 100vh;
  overflow-y: auto;
  background: var(--clr-surface);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  animation: plan-reveal-in var(--duration-base) var(--ease-out);
}

@keyframes plan-reveal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.plan-reveal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.45);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plan-reveal-close:hover { background: rgba(15, 23, 42, 0.65); }

/* ---------- Body: brand + headline + numbers are the payoff, and they
   sit at the top so a one-second screenshot reads them first. ---------- */
.plan-reveal-body {
  padding: var(--space-6) var(--space-5);
  text-align: center;
  display: flex;
  flex-direction: column;
}

/* Mealzy wordmark — same treatment as the sidebar/footer wordmark
   (display face, italic, 700) so the screenshot is unmistakably Mealzy. */
.plan-reveal-brand {
  margin: 0 0 var(--space-3);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: var(--font-size-lg);
  letter-spacing: -0.01em;
  color: var(--color-green);
}

.plan-reveal-headline {
  margin: 0 0 var(--space-5);
  font-family: 'Fraunces', var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 7.5vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--color-foreground);
}

.plan-reveal-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--color-hairline);
  border-bottom: 1px solid var(--color-hairline);
}

.plan-reveal-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.plan-reveal-stat:not(:last-child) {
  border-right: 1px solid var(--color-hairline);
}

.plan-reveal-stat-value {
  font-family: 'Fraunces', var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 6.5vw, 2rem);
  line-height: 1.1;
  color: var(--color-forest);
  letter-spacing: -0.01em;
}
[data-theme="dark"] .plan-reveal-stat-value { color: var(--color-green-light); }

.plan-reveal-stat-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-muted-fg);
}

/* Disclosure copy — kept, but small and quiet: it is not the message. */
.plan-reveal-caveat {
  margin-top: var(--space-2);
  font-size: 0.6875rem;
  line-height: 1.3;
  color: var(--color-muted-fg);
  opacity: 0.75;
}

/* ---------- Output quantity — "what Mealzy just produced" ---------- */
.plan-reveal-output {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.plan-reveal-output-item {
  flex: 1;
  min-width: 0;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-md);
  background: var(--color-muted-bg);
  border: 1px solid var(--color-hairline);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  line-height: 1.25;
  color: var(--color-muted-fg);
}

.plan-reveal-output-num {
  display: block;
  font-family: 'Fraunces', var(--font-display);
  font-weight: 900;
  font-size: var(--font-size-xl);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-foreground);
}

/* ---------- Compact meal list — proof of real dishes, ~1/4 of the
   screen, and no meal name is ever truncated mid-word. ---------- */
.plan-reveal-meals {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-align: left;
}

.plan-reveal-meal {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--color-muted-bg);
}

.plan-reveal-meal-chip {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plan-reveal-meal-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.plan-reveal-meal-chip-noimg { background: var(--gradient-primary); }

.plan-reveal-meal-mark {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full) var(--radius-full) 2px var(--radius-full);
  background: var(--clr-on-forest-faint);
  transform: rotate(45deg);
}

.plan-reveal-meal-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.plan-reveal-meal-type {
  font-size: 0.625rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-green);
}

.plan-reveal-meal-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  line-height: 1.25;
  color: var(--color-foreground);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plan-reveal-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.plan-reveal-cta-primary {
  width: 100%;
  padding: var(--space-4);
  font-size: var(--font-size-base);
}

.plan-reveal-cta-secondary {
  background: none;
  border: none;
  padding: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-green);
  cursor: pointer;
}
.plan-reveal-cta-secondary:hover { text-decoration: underline; }

/* ---------- Tablet / desktop: centered card, not full-bleed ---------- */
@media (min-width: 640px) {
  .plan-reveal-overlay { padding: var(--space-6); }
  .plan-reveal-card {
    height: auto;
    max-height: calc(100vh - var(--space-12));
    border-radius: var(--radius-xl);
  }
}
