/* Meal Planner — free limit modal & custom meal modal (split from planner-page.css, 500-line rule) */

/* ── Free limit modal ───────────────────────────────────── */
#limitModal {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 1rem;
}
#limitModal.open { display: flex; }
.limit-modal-inner {
  background: var(--clr-card);
  border-radius: 1.25rem;
  padding: 2.25rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(26,61,43,0.22);
  animation: fadeInUp 0.28s ease both;
}
.limit-modal-icon {
  width: 56px; height: 56px;
  background: hsl(32,88%,92%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
  color: hsl(25,85%,40%);
  font-size: 1.5rem;
}
[data-theme="dark"] .limit-modal-icon { background: hsl(32,50%,16%); }
.limit-modal-inner h2 {
  font-family: var(--font-display); font-style: italic;
  font-weight: 900; font-size: 1.45rem; letter-spacing: -0.03em;
  margin-bottom: 0.6rem; color: var(--clr-foreground);
}
.limit-modal-inner p {
  font-size: 0.9rem; color: var(--clr-muted-fg);
  line-height: 1.65; margin-bottom: 1.5rem;
}
.limit-features {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
  text-align: left;
}
.limit-features li {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.88rem; color: var(--clr-foreground);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--clr-border);
}
.limit-features li:last-child { border-bottom: none; }
.limit-features li::before {
  content: '';
  width: 18px; height: 18px; flex-shrink: 0;
  background: var(--clr-primary);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}
.limit-modal-dismiss {
  background: none; border: none; cursor: pointer;
  font-size: 0.82rem; color: var(--clr-muted-fg);
  margin-top: 0.75rem; font-family: inherit;
  text-decoration: underline; text-underline-offset: 2px;
}
.limit-modal-dismiss:hover { color: var(--clr-foreground); }

/* ── Custom meal modal ──────────────────────────────────── */
#customMealModal {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  background: var(--clr-scrim);
  backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
  padding: 1rem;
}
#customMealModal.open { display: flex; }
.custom-meal-modal-inner {
  background: var(--clr-card);
  border-radius: 1.25rem;
  padding: 1.75rem;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(26,61,43,0.22);
  animation: fadeInUp 0.28s ease both;
}
.custom-meal-modal-inner h2 {
  font-family: var(--font-display); font-style: italic;
  font-weight: 900; font-size: 1.3rem; letter-spacing: -0.03em;
  margin-bottom: 1rem; color: var(--clr-foreground);
}
.custom-meal-field { margin-bottom: 0.85rem; }
.custom-meal-field label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--clr-foreground); margin-bottom: 0.3rem;
}
.custom-meal-field input, .custom-meal-field select, .custom-meal-field textarea {
  width: 100%; padding: 0.55rem 0.7rem;
  border: 1px solid var(--clr-border); border-radius: 0.6rem;
  background: var(--clr-background); color: var(--clr-foreground);
  font-family: inherit; font-size: 0.9rem;
}
.custom-meal-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem;
}
.custom-meal-actions {
  display: flex; gap: 0.6rem; margin-top: 1.1rem;
}
.custom-meal-actions .btn { flex: 1; }
