/* ===== Wochenplan (Prototyp – Sprint 1) ===== */
.wp-intro { text-align: center; max-width: 46rem; margin: 0 auto 2.5rem; }
.wp-intro h1 { font-size: clamp(2rem, 5vw, 3rem); }
.wp-intro p { color: var(--green-700); }
.wp-proto-badge {
  display: inline-block; background: var(--lemon); color: #6b5900;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.25rem 0.8rem; border-radius: 999px; margin-bottom: 0.8rem;
}

/* 7-Tage-Raster */
.wp-week {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  align-items: start;
}
.wp-day {
  background: var(--white); border: 1px solid var(--cream-2);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 0.9rem; display: flex; flex-direction: column; gap: 0.6rem;
  min-height: 150px;
}
.wp-day h2 {
  font-size: 1rem; margin: 0; display: flex; justify-content: space-between; align-items: center;
}
.wp-day h2 .count { font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; color: var(--muted); }

/* Eintrag im Tag */
.wp-entry {
  display: flex; align-items: center; gap: 0.55rem;
  background: var(--cream); border-radius: 12px; padding: 0.45rem 0.55rem;
}
.wp-entry img, .wp-entry .emoji {
  width: 38px; height: 38px; border-radius: 9px; object-fit: cover; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.3rem; background: var(--green-100);
}
.wp-entry .title { flex: 1; font-size: 0.85rem; font-weight: 600; color: var(--green-900); line-height: 1.25; }
.wp-entry .remove {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0.2rem;
}
.wp-entry .remove:hover { color: #b23a3a; }

/* Hinzufügen-Button (Kern von User Story 1) */
.wp-add {
  border: 2px dashed var(--green-300); background: none; color: var(--green-700);
  border-radius: 12px; padding: 0.55rem; font-family: var(--font-body);
  font-weight: 600; font-size: 0.85rem; cursor: pointer; width: 100%;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.wp-add:hover { background: var(--green-100); border-color: var(--green-500); }

/* Rezept-Auswahl (Dialog) */
.wp-picker-overlay {
  position: fixed; inset: 0; background: rgba(31, 58, 45, 0.5);
  display: none; place-items: center; z-index: 90; padding: 1rem;
}
.wp-picker-overlay.open { display: grid; }
.wp-picker {
  background: var(--cream); border-radius: var(--radius-lg); width: min(560px, 100%);
  max-height: 85vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.wp-picker-head { padding: 1.2rem 1.3rem 0.8rem; display: flex; justify-content: space-between; align-items: baseline; }
.wp-picker-head h2 { margin: 0; font-size: 1.25rem; }
.wp-picker-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--green-900); }
.wp-picker-list { overflow-y: auto; padding: 0.4rem 1.3rem 1.3rem; display: grid; gap: 0.6rem; }
.wp-picker-item {
  display: flex; align-items: center; gap: 0.8rem; text-align: left; width: 100%;
  background: var(--white); border: 1px solid var(--cream-2); border-radius: 12px;
  padding: 0.55rem 0.7rem; cursor: pointer; font-family: var(--font-body);
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.wp-picker-item:hover { border-color: var(--green-500); transform: translateY(-1px); }
.wp-picker-item img, .wp-picker-item .emoji {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
  display: grid; place-items: center; font-size: 1.5rem; background: var(--green-100);
}
.wp-picker-item .name { font-weight: 600; color: var(--green-900); font-size: 0.95rem; }
.wp-picker-item .meta { font-size: 0.78rem; color: var(--muted); }

@media (max-width: 700px) {
  .wp-week { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 440px) {
  .wp-week { grid-template-columns: 1fr; }
}

/* Dark Mode: erbt die Token-Umschaltung aus style.css automatisch */

/* ===== Einkaufsliste (Sprint 2) ===== */
.wp-list {
  margin-top: 2.5rem; background: var(--white); border: 1px solid var(--cream-2);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  padding: 1.6rem 1.8rem; max-width: 560px; margin-inline: auto;
}
.wp-list h2 { font-size: 1.35rem; margin: 0 0 0.3rem; }
.wp-list-hint { color: var(--muted); font-size: 0.88rem; margin: 0 0 1rem; }
/* Erhöhte Spezifität, da style.css für .page ul einen Listen-Punkt vorgibt */
.page .wp-list ul { list-style: none; padding: 0; margin: 0; }
.wp-list li {
  padding: 0.5rem 0.2rem; border-bottom: 1px dashed rgba(31, 58, 45, 0.12);
  font-size: 0.95rem; color: var(--ink);
}
.wp-list li:last-child { border-bottom: none; }
.wp-list li.per-taste { color: var(--muted); font-style: italic; }
@media (prefers-color-scheme: dark) {
  .wp-list li { border-bottom-color: rgba(255, 255, 255, 0.12); }
}

/* ===== Sprint 3: Abhaken + Druck/PDF-Export ===== */
.wp-list li label { display: flex; align-items: baseline; gap: 0.6rem; cursor: pointer; }
.wp-list li input[type="checkbox"] { accent-color: var(--green-500); width: 1.05rem; height: 1.05rem; flex-shrink: 0; transform: translateY(2px); cursor: pointer; }
.wp-list li.checked span { text-decoration: line-through; color: var(--muted); }
.wp-print-btn { width: 100%; justify-content: center; margin-top: 1.2rem; cursor: pointer; }

/* Druckansicht: nur die Einkaufsliste, schwarz auf weiß, ohne UI-Elemente */
@media print {
  .site-header, .site-footer, .wp-intro, .wp-week, .wp-picker-overlay,
  .wp-print-btn, .wp-list-hint { display: none !important; }
  body { background: #fff !important; }
  .page { padding: 0; }
  .wp-list {
    display: block !important; box-shadow: none; border: none;
    max-width: none; padding: 0; margin: 0; background: #fff;
  }
  .wp-list h2 { color: #000; }
  .wp-list li { color: #000; border-bottom-color: #ccc; break-inside: avoid; }
  .wp-list li.checked span { color: #888; }
  .wp-list li input[type="checkbox"] { accent-color: #000; }
}

/* ===== Sprint 4: Portionen (US 5), eigene Artikel (US 9), Nährwerte (US 10) ===== */
.wp-entry .title .servings {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; font-weight: 500; color: var(--muted); margin-top: 0.15rem;
}
.wp-entry .title .servings b { font-weight: 700; color: var(--green-700); min-width: 1ch; text-align: center; }
.wp-entry .title .servings button {
  width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--green-300);
  background: var(--white); color: var(--green-900); cursor: pointer;
  font-size: 0.8rem; line-height: 1; display: grid; place-items: center; padding: 0;
}
.wp-entry .title .servings button:hover { background: var(--green-100); }
.wp-entry .title { display: flex; flex-direction: column; align-items: flex-start; }

.wp-day-nutrition {
  margin: 0; font-size: 0.72rem; color: var(--muted);
  border-top: 1px dashed rgba(31, 58, 45, 0.12); padding-top: 0.5rem;
}

.wp-custom-form { display: flex; gap: 0.6rem; margin-top: 1rem; }
.wp-custom-form input {
  flex: 1; min-width: 0; font-family: var(--font-body); font-size: 0.9rem;
  padding: 0.55rem 0.9rem; border: 2px solid var(--cream-2); border-radius: 999px;
  background: var(--white); color: var(--ink);
}
.wp-custom-form input:focus { outline: none; border-color: var(--green-300); box-shadow: 0 0 0 3px var(--green-100); }
.wp-custom-form .btn { padding: 0.5rem 1.1rem; font-size: 0.88rem; cursor: pointer; }
.wp-list li .remove-custom {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1rem; line-height: 1; padding: 0 0.3rem; float: right;
}
.wp-list li .remove-custom:hover { color: #b23a3a; }
.wp-list li.custom label { display: inline-flex; width: calc(100% - 2rem); }

@media (prefers-color-scheme: dark) {
  .wp-day-nutrition { border-top-color: rgba(255, 255, 255, 0.12); }
}
@media print {
  .wp-custom-form { display: none !important; }
  .wp-list li .remove-custom { display: none !important; }
}
