/* ── Meals page accent ──────────────────────────────────────────────────── */
:root {
  --page-accent: #FF8C42;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.meals-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ── Section shell ───────────────────────────────────────────────────────── */
.list-section {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 140, 66, 0.2);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.list-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.list-heading {
  font-family: 'Syne', sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--page-accent);
  margin: 0;
}

/* ── Add button ─────────────────────────────────────────────────────────── */
.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: 'Satoshi', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--page-accent);
  background: transparent;
  border: 1.5px solid var(--page-accent);
  border-radius: 2rem;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.15s, color 0.15s;
}
.btn-add:hover {
  background: var(--page-accent);
  color: #07071A;
}

/* ── Add forms ──────────────────────────────────────────────────────────── */
.add-item-form,
.add-recipe-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.list-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-elevated);
  border: 1.5px solid rgba(255, 140, 66, 0.35);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-family: 'Satoshi', sans-serif;
  font-size: 1rem;
  padding: 0.6rem 0.85rem;
  outline: none;
  transition: border-color 0.15s;
}
.list-input:focus {
  border-color: var(--page-accent);
}

.recipe-textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-elevated);
  border: 1.5px solid rgba(255, 140, 66, 0.35);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-family: 'Geist Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  padding: 0.6rem 0.85rem;
  outline: none;
  resize: vertical;
  min-height: 120px;
  white-space: pre-wrap;
  transition: border-color 0.15s;
}
.recipe-textarea:focus {
  border-color: var(--page-accent);
}

.form-actions {
  display: flex;
  gap: 0.6rem;
}

.btn-save {
  font-family: 'Satoshi', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #07071A;
  background: var(--page-accent);
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.15s;
}
.btn-save:hover { opacity: 0.88; }

.btn-cancel {
  font-family: 'Satoshi', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.15s;
}
.btn-cancel:hover { border-color: rgba(255,255,255,0.3); }

/* ── Shopping list items ─────────────────────────────────────────────────── */
.items-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.list-empty {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
  padding: 0.5rem 0;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-elevated);
  border-radius: 0.5rem;
  padding: 0.6rem 0.85rem;
}

.item-text {
  flex: 1;
  font-family: 'Satoshi', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  word-break: break-word;
}

.item-remove {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.3);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  padding: 0.2rem 0.3rem;
  transition: color 0.15s;
}
.item-remove:hover { color: var(--neon-pink); }

/* ── Recipes ─────────────────────────────────────────────────────────────── */
.recipes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recipe-item {
  background: var(--bg-elevated);
  border-radius: 0.5rem;
  overflow: hidden;
}

.recipe-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: background 0.15s;
}
.recipe-header:hover { background: rgba(255, 140, 66, 0.08); }

.recipe-toggle-icon {
  color: var(--page-accent);
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.recipe-item.expanded .recipe-toggle-icon {
  transform: rotate(90deg);
}

.recipe-name {
  flex: 1;
  font-family: 'Satoshi', sans-serif;
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-primary);
}

.recipe-delete {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.25);
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
  padding: 0.2rem 0.3rem;
  flex-shrink: 0;
  transition: color 0.15s;
}
.recipe-delete:hover { color: var(--neon-pink); }

.recipe-body {
  display: none;
  padding: 0 0.85rem 0.85rem;
}
.recipe-item.expanded .recipe-body { display: block; }

.recipe-content {
  font-family: 'Geist Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-void);
  border-radius: 0.4rem;
  padding: 0.75rem;
  margin: 0;
}
