/* ============================================
   NEM & Ergänzungen – Seitenlayout (Vorschlag)
   Nutzt die Tokens aus styles.css. Klassen-Präfix: np-
   ============================================ */

.np-head { padding: var(--space-xl) 0 var(--space-md); }
.np-head h1 { font-size: 2.5rem; font-weight: 600; margin-bottom: var(--space-xs); }
.np-head .np-intro { max-width: 40rem; font-size: 1.1rem; color: #5B5B57; }

:root { interpolate-size: allow-keywords; }

.np-notes { display: grid; grid-template-columns: 1fr 1.5fr; gap: var(--space-sm); margin-top: var(--space-md); max-width: 66rem; }
.np-note {
  display: flex; gap: 0.85rem; align-items: flex-start;
  padding: 1rem 1.25rem;
  background: var(--color-white);
  border: var(--card-border);
  border-radius: var(--card-radius);
  font-size: 0.92rem; line-height: 1.6; color: #4A4A47;
}
.np-note svg { flex: none; margin-top: 0.15rem; color: var(--color-primary); }
.np-note p + p { margin-top: 0.35rem; }
.np-note strong { color: var(--color-primary-dark); font-weight: 600; }
.np-note.is-partner { background: var(--color-red-highlight); border-color: rgba(153, 60, 29, 0.15); }

/* --- Themen-Leiste --- */
.np-bar {
  position: sticky; top: var(--nav-height); z-index: 900;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-gray-medium);
}
.np-bar .container { display: flex; gap: 0.5rem; padding-top: 0.75rem; padding-bottom: 0.75rem; overflow-x: auto; scrollbar-width: thin; }
.np-chip {
  flex: none; display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0 1rem;
  background: var(--color-white); color: var(--color-text);
  border: 1px solid var(--color-gray-medium); border-radius: 22px;
  font-size: 0.92rem; font-weight: 500; white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.np-chip span { color: #6B6B67; font-weight: 400; font-variant-numeric: tabular-nums; }
.np-chip:hover { border-color: var(--color-primary); color: var(--color-primary-dark); }
.np-chip.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.np-chip.is-active span { color: rgba(255,255,255,0.85); }
.np-chip:focus-visible, .np-sum:focus-visible, .np-row:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }

/* --- Themenleiste: kompakt, ohne Zahlen; passt am Desktop in eine Zeile, am Handy mit Pfeilen scrollbar --- */
.np-bar .container.np-bar-in { display: block; overflow: visible; position: relative; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.np-chips { display: flex; gap: 0.4rem; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.np-chips::-webkit-scrollbar { display: none; }
.np-chips .np-chip { min-height: 38px; padding: 0 0.8rem; font-size: 0.88rem; }
.np-arr {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  background: var(--color-white); color: var(--color-primary);
  border: 1px solid var(--color-gray-medium); border-radius: 50%;
  box-shadow: 0 2px 8px rgba(74, 27, 12, 0.15); cursor: pointer;
}
.np-arr[hidden] { display: none; }
.np-arr-l { left: calc(1.5rem - 10px); }
.np-arr-r { right: calc(1.5rem - 10px); }
.np-arr:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
@media (max-width: 640px) {
  .np-arr-l { left: 0.25rem; } .np-arr-r { right: 0.25rem; }
  .np-bar .container.np-bar-in { padding-left: 0; padding-right: 0; }
  .np-chips { padding: 0 1rem; }
}

/* --- Abschnitte --- */
.np-section { margin-top: 3.5rem; scroll-margin-top: calc(var(--nav-height) + 5rem); }
.np-section h2 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.np-section h2 small { font-size: 1rem; font-weight: 400; color: #6B6B67; margin-left: 0.4rem; }
.np-section h2 small::before { content: "("; }
.np-section h2 small::after { content: ")"; }
.np-section > p { color: #5B5B57; max-width: 44rem; margin-bottom: var(--space-md); }
.np-section > h2 + .np-grid { margin-top: var(--space-md); }

.np-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: var(--space-md); }

/* --- Karte --- */
.np-card {
  container-type: inline-size;
  position: relative;
  display: flex; flex-direction: column;
  background: var(--color-white);
  border: 1px solid #E3DAD5;
  border-left: 3px solid var(--color-secondary);
  border-radius: var(--card-radius);
  padding: var(--space-md);
  box-shadow: 0 1px 2px rgba(74, 27, 12, 0.07), 0 6px 18px rgba(74, 27, 12, 0.09);
  min-height: var(--np-h, 0);
}
.np-measure .np-grid { align-items: start; }
.np-measure .np-card { min-height: 0; }
.np-card h3 { font-size: 1.2rem; line-height: 1.35; margin-bottom: 0.45rem; }
.np-kind {
  align-self: flex-start; display: inline-block;
  margin-bottom: 0.7rem; padding: 0.25rem 0.75rem;
  background: var(--color-green-highlight); border: 0; border-radius: 20px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.4; color: var(--color-secondary);
}
.np-body { flex: 1; display: flex; flex-direction: column; }
.np-body > p { font-size: 0.95rem; line-height: 1.65; }
.np-body > .np-pills { margin-top: auto; padding-top: 1rem; position: relative; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.np-pills .np-dose { position: static; }
.np-pills .np-dosepanel { left: 0; right: 0; }
.np-size { color: #6B6B67; font-size: 0.9rem; }

.np-fact {
  margin-top: 0.85rem; padding: 0.6rem 0.85rem;
  background: var(--color-bg); border-radius: 8px;
  font-size: 0.9rem; line-height: 1.55;
}
.np-fact b {
  display: block; margin-bottom: 0.1rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6B6B67;
}
.np-fact.is-caution { background: var(--color-red-highlight); }
.np-fact.is-caution b { color: var(--color-primary-dark); }

/* --- Fußbereich: Bezugsbox + Hinweis (feste Höhen, auf jeder Karte gleich) --- */
.np-foot { margin-top: 1.25rem; }
.np-buy { position: relative; }
.np-sum, .np-none {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  height: 48px; padding: 0 1rem;
  border-radius: 8px; font-size: 0.95rem; font-weight: 500; line-height: 1;
}
.np-sum {
  list-style: none; cursor: pointer;
  background: var(--color-primary); color: #fff !important;
  transition: background 0.2s ease;
}
.np-sum::-webkit-details-marker { display: none; }
.np-sum:hover, .np-buy[open] > .np-sum { background: var(--color-primary-dark); color: #fff !important; }
.np-sum .np-meta { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 400; font-size: 0.85rem; opacity: 0.92; }
.np-sum .np-count {
  display: inline-grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.4rem;
  border-radius: 12px; background: rgba(255,255,255,0.22); font-size: 0.8rem; font-weight: 600; font-variant-numeric: tabular-nums;
}
.np-sum .np-chev { transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.np-buy[open] .np-chev { transform: rotate(180deg); }
.np-none { border: 1px dashed var(--color-gray-medium); color: #6B6B67; font-weight: 400; font-size: 0.9rem; }

.np-panel {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 5;
  max-height: 20rem; overflow-y: auto; overscroll-behavior: contain;
  background: var(--color-white);
  border: 1px solid var(--color-gray-medium); border-radius: 12px;
  padding: 0.35rem;
  box-shadow: 0 8px 24px rgba(74, 27, 12, 0.14);
  animation: np-up 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.np-panel-head { padding: 0.5rem 0.75rem 0.35rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6B6B67; }
.np-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 52px; padding: 0.5rem 0.75rem; border-radius: 8px;
  color: var(--color-text);
  transition: background 0.15s ease;
}
.np-row:hover { background: var(--color-red-highlight); color: var(--color-primary-dark); }
.np-row strong { display: block; font-size: 0.92rem; font-weight: 500; line-height: 1.35; }
.np-row small { display: block; font-size: 0.8rem; color: #6B6B67; }
.np-row svg { flex: none; color: var(--color-primary); }
@keyframes np-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Hinweisleiste: über die ganze Kartenbreite, immer eine Zeile; die Schrift passt sich der Kartenbreite an */
.np-disc {
  display: flex; align-items: center; gap: 0.4rem;
  margin: 1.1rem -1.5rem -1.5rem; padding: 0.4rem 0.75rem;
  background: var(--color-red-highlight);
  border-top: 1px solid rgba(153, 60, 29, 0.15); border-radius: 0 0 11px 11px;
  font-size: clamp(0.6875rem, calc((100cqw - 2.8rem) / 25), 0.78rem);
  line-height: 1.3; color: var(--color-primary-dark);
  white-space: nowrap; overflow: hidden;
}
.np-disc svg { flex: none; color: var(--color-primary); }
.np-disc span { overflow: hidden; text-overflow: ellipsis; }

/* --- Dosierung: kleines Feld, zieht eine Karteikarte nach oben auf --- */
.np-dose { position: relative; }
.np-dosesum {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 40px; padding: 0 0.85rem 0 1rem;
  list-style: none; cursor: pointer;
  background: var(--color-bg); color: var(--color-primary-dark);
  border: 1px solid var(--color-gray-medium); border-radius: 20px;
  font-size: 0.88rem; font-weight: 500;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.np-dosesum::-webkit-details-marker { display: none; }
.np-dosesum:hover, .np-dose[open] > .np-dosesum { border-color: var(--color-primary); background: var(--color-red-highlight); }
.np-dosesum .np-plus { color: var(--color-primary); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.np-dose[open] .np-plus { transform: rotate(135deg); }
.np-dosesum:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.np-dosepanel {
  position: absolute; left: 0; right: 0; bottom: calc(100% - 0.4rem); z-index: 5;
  padding: 0.9rem 1.1rem 1rem;
  background: var(--color-bg);
  border: 1px solid var(--color-gray-medium); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(74, 27, 12, 0.14);
  animation: np-pull 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}
.np-dosepanel b { display: block; margin-bottom: 0.25rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #6B6B67; }
.np-dosepanel p { font-size: 1rem; line-height: 1.5; color: var(--color-text); }
@keyframes np-pull { from { clip-path: inset(100% 0 0 0); transform: translateY(6px); } to { clip-path: inset(0); transform: none; } }

/* Vorsicht-Feld: gleiche Mechanik wie Dosierung, in Warnfarbe */
.np-dose.is-caution > .np-dosesum { background: var(--color-red-highlight); border-color: rgba(153, 60, 29, 0.3); }
.np-dose.is-caution > .np-dosesum:hover, .np-dose.is-caution[open] > .np-dosesum { border-color: var(--color-primary); }
.np-dose.is-caution .np-dosepanel { background: var(--color-red-highlight); border-color: rgba(153, 60, 29, 0.25); }
.np-dose.is-caution .np-dosepanel b { color: var(--color-primary-dark); }

/* --- Häufige Fragen --- */
.np-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--space-lg); align-items: start; }
.np-faq-intro { position: sticky; top: calc(var(--nav-height) + 5rem); }
.np-faq-intro h2 { margin-bottom: 0.5rem; }
.np-faq-intro p { color: #5B5B57; font-size: 0.95rem; max-width: 22rem; }
.np-faq-list { display: grid; gap: 0.75rem; }
.np-q {
  background: var(--color-white);
  border: 1px solid #E3DAD5; border-left: 3px solid var(--color-secondary); border-radius: 12px;
  padding: 0 1rem;
  box-shadow: 0 1px 2px rgba(74, 27, 12, 0.07), 0 4px 12px rgba(74, 27, 12, 0.06);
}
.np-q summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 56px; padding: 0.85rem 0; cursor: pointer; list-style: none;
  font-size: 1.02rem; font-weight: 500; line-height: 1.4; color: var(--color-primary-dark);
  transition: color 0.2s ease;
}
.np-q summary::-webkit-details-marker { display: none; }
.np-q summary:hover { color: var(--color-primary); }
.np-q summary:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; border-radius: 6px; }
.np-q summary .np-plus { flex: none; color: var(--color-primary); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.np-q[open] summary .np-plus { transform: rotate(135deg); }
.np-q::details-content { block-size: 0; overflow: clip; transition: block-size 0.32s cubic-bezier(0.16, 1, 0.3, 1), content-visibility 0.32s allow-discrete; }
.np-q[open]::details-content { block-size: auto; }
.np-a { padding: 0 0 1.25rem; max-width: 42rem; }
.np-a p { font-size: 0.98rem; line-height: 1.7; }
.np-src { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.75rem; padding: 0.2rem 0.65rem; border-radius: 14px; background: var(--color-gray-light); color: #5B5B57; font-size: 0.8rem; }
.np-src.is-ok { background: var(--color-green-highlight); color: #146B50; }

@media (max-width: 1024px) {
  .np-grid { grid-template-columns: repeat(2, 1fr); }
  .np-notes { grid-template-columns: 1fr; }
  .np-faq { grid-template-columns: 1fr; gap: var(--space-md); }
  .np-faq-intro { position: static; }
}
@media (max-width: 640px) {
  .np-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .np-card { min-height: 0; }
  .np-head h1 { font-size: 2rem; }
  .np-section { margin-top: 2.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .np-panel, .np-dosepanel { animation: none; }
  .np-sum .np-chev, .np-chip, .np-sum, .np-plus, .np-q::details-content { transition: none; }
}
