/* MEDVi Meals — brand tokens + layout (no Nuxt export) */
:root {
  --color-main-darker: 50 97 89;
  --color-main-default: 62 121 111;
  --color-main-lighter: 74 145 133;
  --color-main-lightest: 87 169 155;
  --color-btn-main: 62 121 111;
  --color-icon-main: 62 121 111;
  --meals-cream: #f3f1e9;
}

.nav-logo-m {
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1;
  color: #1a1a1a;
  letter-spacing: -0.04em;
  text-decoration: none;
  display: inline-block;
}

.meals-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body, "Josefin Sans", sans-serif);
  -webkit-font-smoothing: antialiased;
}

.meals-countdown-bar {
  background-color: var(--green);
  color: #fff;
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.5rem;
  font-weight: 900;
}

@media (min-width: 768px) {
  .meals-countdown-bar {
    padding: 1rem 0;
  }
}

/* Override fixed positioning for meals page — header flows in the document */
.meals-shell .site-header {
  position: relative;
  top: auto !important;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}

.meals-shell .site-header .site-header__logo-img {
  filter: none;
}

.meals-shell .site-header .site-header__menu-btn {
  color: #242220;
}

.meals-nav {
  background: #fff;
}

.meals-nav > div > div {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding: 0.5rem;
}

@media (min-width: 1024px) {
  .meals-nav > div > div {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    min-height: 8rem;
    padding: 0 2rem;
  }

  .meals-nav > div > div > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: 8rem;
  }

  .meals-nav .meals-nav__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }

  .meals-nav .meals-nav__links a {
    color: #111827;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
  }

  .meals-nav .meals-nav__links a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .meals-nav .meals-nav__actions {
    display: flex;
    align-items: center;
    width: 25%;
  }

  .meals-nav .meals-nav__actions .meals-btn {
    background: var(--green);
    color: #fff;
    border: 1px solid var(--green);
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-weight: 700;
    text-decoration: none;
    margin-left: 1rem;
  }

  .meals-nav .meals-nav__actions button {
    background: transparent;
    border: 0;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
  }
}

.meals-btn {
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
  border-radius: 0.25rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
}

.meals-btn--compact {
  padding: 0.5rem;
}

@media (max-width: 1023px) {
  .meals-nav > div > div > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .meals-nav .meals-nav__links,
  .meals-nav > div > div > div:last-child {
    display: none;
  }
}

.meals-page-wrap {
  background-color: var(--telemed-color-surface, #dee9e1);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.buyer-promo {
  background-color: rgb(var(--color-main-lighter));
}

.buyer-promo__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.875rem;
  color: #fff;
  text-shadow: 0 1.2px 1.2px rgba(0, 0, 0, 0.8);
  background: transparent;
  border: 0;
  font-family: inherit;
}

@media (min-width: 640px) {
  .buyer-promo__toggle {
    font-size: 1rem;
  }
}

.buyer-promo__sep {
  opacity: 0.95;
}

.buyer-promo__chevron {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.buyer-promo.is-open .buyer-promo__chevron {
  transform: rotate(180deg);
}

.buyer-promo__panel {
  display: none;
  padding: 0 1rem 1.25rem;
}

.buyer-promo.is-open .buyer-promo__panel {
  display: block;
}

.buyer-promo__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px 24px;
  text-align: center;
  color: #fff;
}

.buyer-promo__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100px;
}

.buyer-promo__pill {
  display: inline-block;
  background-color: rgb(var(--color-main-darker));
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.buyer-promo__box {
  width: 3rem;
  height: 3rem;
  color: #fff;
}

.buyer-promo__off {
  font-size: 1rem;
  font-weight: 500;
}

.buyer-promo__note {
  text-align: center;
  color: #fff;
  font-size: 0.75rem;
  font-style: italic;
  margin-top: 1.5rem;
}

.meals-hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  background: #f5f2ec url("../images/bannerbg.png") center / cover no-repeat;
  overflow: hidden;
}

.meals-hero__inner {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .meals-hero__inner {
    padding: 2.5rem 2rem;
  }
}

@media (min-width: 1024px) {
  .meals-hero__inner {
    padding: 2.75rem 2.5rem;
  }
}

.meals-hero__content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 36rem;
}

.meals-hero__brand {
  font-size: clamp(3.25rem, 9vw, 6.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: #1a1a1a;
  margin: 0;
}

.meals-hero__tagline {
  font-size: clamp(1.2rem, 2.8vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 0;
}

.meals-hero__desc {
  font-size: clamp(0.95rem, 1.6vw, 1.125rem);
  line-height: 1.45;
  color: #2a2a2a;
  margin: 0;
  font-weight: 500;
  max-width: 32rem;
}

.meals-divider {
  border-top: 2px solid transparent;
  border-image: repeating-linear-gradient(
      to right,
      rgb(var(--color-main-lightest)) 0,
      rgb(var(--color-main-darker)) 8px,
      transparent 5px,
      transparent 15px
    )
    5;
}

.meals-divider-v {
  border-left: 2px solid transparent;
  height: 100%;
  border-image: repeating-linear-gradient(
      to bottom,
      rgb(var(--color-icon-main) / 0.2) 0,
      rgb(var(--color-icon-main) / 0.2) 8px,
      transparent 5px,
      transparent 15px
    )
    1 100%;
}

/* ─── Newsletter ─────────────────────────────────────────────────────────── */
.meals-newsletter {
  width: 100%;
  background: #fff;
  padding: 64px 20px;
}

.meals-newsletter__inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.meals-newsletter__icon {
  width: 52px;
  height: 52px;
  background: rgb(var(--color-main-default) / 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--color-btn-main));
  margin-bottom: 4px;
}

.meals-newsletter__heading {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 800;
  color: #111;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

.meals-newsletter__sub {
  font-size: 16px;
  color: #555;
  margin: 0;
  line-height: 1.55;
  max-width: 480px;
}

.meals-newsletter__form {
  width: 100%;
  margin-top: 8px;
}

.meals-newsletter__row {
  display: flex;
  gap: 0;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid #d1d5db;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.meals-newsletter__input {
  flex: 1;
  padding: 14px 18px;
  font-size: 15px;
  border: none;
  outline: none;
  background: #fff;
  color: #111;
  min-width: 0;
}

.meals-newsletter__input::placeholder { color: #9ca3af; }

.meals-newsletter__btn {
  padding: 14px 24px;
  background: rgb(var(--color-btn-main));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}

.meals-newsletter__btn:hover { opacity: .88; }

.meals-newsletter__note {
  font-size: 13px;
  color: #9ca3af;
  margin: 10px 0 0;
}

.meals-newsletter__success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: rgb(var(--color-btn-main));
  margin-top: 10px;
}

/* ─── Meal Detail Modal ──────────────────────────────────────────────────── */

.meals-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 640px) {
  .meals-modal-overlay { align-items: center; }
}

.meals-modal-overlay[hidden] { display: none; }

.meals-modal {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 -4px 32px rgba(0,0,0,.18);
  animation: modalSlideUp .25s ease;
}

@media (min-width: 640px) {
  .meals-modal {
    border-radius: 20px;
    max-height: 90dvh;
    animation: modalFadeIn .2s ease;
  }
}

@keyframes modalSlideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes modalFadeIn {
  from { transform: scale(.97); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* Fixed header */
.meals-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.meals-modal__header-text { flex: 1; min-width: 0; }

/* Close button */
.meals-modal__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .12s;
  margin-top: 2px;
}
.meals-modal__close:hover { background: #e5e7eb; }

/* Scrollable body — grows to fill remaining space */
.meals-modal__body {
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Fixed footer */
.meals-modal__footer {
  flex-shrink: 0;
  padding: 14px 20px 20px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.meals-modal__title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.meals-modal__subtitle {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 8px;
}

.meals-modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.meals-modal__tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: rgb(var(--color-btn-main));
  color: #fff;
}

.meals-modal__tag:nth-child(even) {
  background: var(--green);
}

/* Image */
.meals-modal__img-wrap {
  width: 100%;
  background: #f9fafb;
  position: relative;
}

.meals-modal__img-wrap img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
}

/* Macro grid */
.meals-modal__macros {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: #e5e7eb;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.meals-modal__macro {
  background: #fff;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.meals-modal__macro-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: #374151;
}

.meals-modal__macro-val {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  line-height: 1;
}

/* Toggle links */
.meals-modal__toggle {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 20px;
  background: none;
  border: none;
  color: rgb(var(--color-btn-main));
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.meals-modal__toggle:hover { opacity: .8; }

/* Ingredient icon row */
.meals-modal__ing-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 8px 16px 4px;
}

.meals-modal__ing-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.meals-modal__ing-item img,
.meals-modal__ing-placeholder {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.meals-modal__ing-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
}

.meals-modal__ing-item span {
  font-size: 10px;
  color: #374151;
  line-height: 1.2;
  word-break: break-word;
}

/* Full ingredient list */
.meals-modal__ing-all {
  margin: 4px 16px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.meals-modal__ing-all-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.meals-modal__ing-all-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 12px;
  color: #374151;
}

.meals-modal__ing-all-item:last-child { border-bottom: none; }

.meals-modal__ing-all-item img,
.meals-modal__ing-all-placeholder {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.meals-modal__ing-all-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border-radius: 50%;
}

/* Allergens */
.meals-modal__allergens {
  padding: 12px 20px 4px;
  font-size: 13px;
  color: #374151;
  margin: 0;
}

/* CTA button */
.meals-modal__cta {
  display: block;
  margin: 0;
  padding: 16px;
  background: rgb(var(--color-btn-main));
  color: #fff;
  text-align: center;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity .15s;
  border: none;
  cursor: pointer;
}
.meals-modal__cta:hover { opacity: .88; color: #fff; text-decoration: none; }

/* ─── Nutrition Facts FDA-style label ─────────────────────────────────── */

.meals-nf-label {
  margin: 8px 20px 12px;
  border: 2px solid #000;
  padding: 6px 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #000;
  background: #fff;
  border-radius: 2px;
}

.meals-nf-label__title {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  border-bottom: 1px solid #000;
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.meals-nf-label__serving {
  font-size: 13px;
  margin-bottom: 2px;
}

.meals-nf-label__amount {
  font-size: 12px;
  font-weight: 700;
}

.meals-nf-label__calories-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 8px solid #000;
  border-bottom: 4px solid #000;
  padding: 2px 0;
  margin: 4px 0;
}

.meals-nf-label__calories-row > span:first-child {
  font-size: 18px;
  font-weight: 700;
}

.meals-nf-label__calories-row > span:last-child {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
}

.meals-nf-label__pct-header {
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  border-bottom: 1px solid #000;
  margin-bottom: 2px;
}

.meals-nf-label__row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  padding: 2px 0;
  font-size: 12.5px;
}

.meals-nf-label__row.is-bold { font-weight: 700; }
.meals-nf-label__row.is-indent { padding-left: 16px; }
.meals-nf-label__row.is-indent-2 { padding-left: 28px; }
.meals-nf-label__row.is-italic { font-style: italic; padding-left: 16px; }

.meals-nf-label__row .pct { font-weight: 700; white-space: nowrap; }

.meals-nf-label__divider { border-top: 8px solid #000; margin: 4px 0; }

.meals-nf-label__footnote {
  font-size: 10px;
  color: #333;
  margin-top: 6px;
  line-height: 1.4;
  border-top: 1px solid #ddd;
  padding-top: 4px;
}

/* Meal card hover cursor */
#meal-grid [class*="rounded"] { cursor: pointer; }

/* ── Category tabs — reliable active state (not Tailwind-dependent) ──── */
.meal-tab {
  transition: background .15s, color .15s, box-shadow .15s;
}

/* Active tab: filled green */
.meal-tab.tab-is-active,
.meal-tab[data-active] {
  background-color: var(--green) !important;
  color: #fff !important;
  outline: 2px solid var(--green) !important;
  box-shadow: 0 2px 10px rgba(var(--color-main-default, 48,112,85),.25);
}

/* Inactive tab: white with green text */
.meal-tab:not(.tab-is-active) {
  background-color: #fff;
  color: var(--green);
}

.meal-tab:not(.tab-is-active):hover {
  background-color: var(--telemed-color-surface, #f0f7f4);
}

/* ── Premium badge — clear visibility ───────────────────────────────── */
#premium-badge {
  background-color: var(--green) !important;
  color: #fff !important;
  border-radius: 8px;
  padding: 0 16px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#premium-badge.hidden { display: none !important; }

#premium-badge svg { color: #fff; }

.premium-badge__text {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff !important;
  text-transform: uppercase;
}

/* ── Program cards (Classic / Premium) ───────────────────────────────── */
.mn-prog-card {
  position: relative;
  width: 100%;
  max-width: 50%;
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 16px;
  background: #f4f4f4;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.mn-prog-card:hover { background: #f0f0f0; }

.mn-prog-card--selected {
  border-color: #000;
  background: #fff;
}

.mn-prog-card__check {
  position: absolute;
  top: 8px;
  left: 8px;
  opacity: 0;
  transition: opacity 0.15s;
}

.mn-prog-card--selected .mn-prog-card__check { opacity: 1; }

/* ── Plan selection tiles (CREATE YOUR FIRST BOX section) ─────────────── */
.mn-plan-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 5px;
  border: 2px solid transparent;
  background: #e7e7e7;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  user-select: none;
}

@media (min-width: 768px) {
  .mn-plan-tile { width: 80px; height: 80px; }
}

.mn-plan-tile:hover {
  background: #f5f5f5;
}

.mn-plan-tile--selected {
  background: #fff;
  border-color: #000;
}

.mn-plan-tile__heart {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--green, #307055);
  z-index: 10;
}
