/* Impfplan Österreich 2026/2027 — UI */
:root {
  --bg: #f4f6f9;
  --panel: #ffffff;
  --ink: #1c2430;
  --muted: #5b6774;
  --line: #dfe5ec;
  --accent: #155e8f;
  --green: #1e7e34;
  --green-bg: #e3f3e7;
  --orange: #b35900;
  --orange-bg: #fdeedd;
  --red: #a12622;
  --red-bg: #fbe7e6;
  --blue-bg: #e3edf7;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 30, 54, .08), 0 4px 16px rgba(16, 30, 54, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}

/* ---------- Header ---------- */
header {
  background: linear-gradient(135deg, #103a5c 0%, #155e8f 60%, #1d7ab5 100%);
  color: #fff;
  padding: 22px 28px;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
}
h1 { margin: 0; font-size: 1.6rem; letter-spacing: .2px; }
h1 span { font-weight: 300; }
.subtitle { margin: 6px 0 0; font-size: .85rem; opacity: .85; }
.subtitle a { color: #cfe7fb; }
.api-config { display: flex; align-items: center; gap: 8px; font-size: .8rem; }
.api-config input {
  width: 260px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.35);
  border-radius: 8px; background: rgba(255,255,255,.12); color: #fff;
}
.api-config input::placeholder { color: rgba(255,255,255,.6); }

/* ---------- Layout ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 22px 28px 40px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.panel h2 { margin: 0 0 4px; font-size: 1.1rem; }

#diseasesBody p.hint { margin: 8px 0 0; }

h2 { font-size: 1.25rem; }

.hint { color: var(--muted); font-size: .85rem; }
code {
  background: #eef1f5; border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 5px; font-size: .85em;
}

/* ---------- Abfrage-Panel ---------- */
#query-panel { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.field.grow { flex: 1; }
.field label { font-size: .85rem; font-weight: 600; }
input[type="number"], #indicationInput {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: .95rem;
  background: #fff;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.actions { display: flex; gap: 10px; }
button {
  border: none; border-radius: 8px; padding: 10px 18px;
  font-size: .92rem; font-weight: 600; cursor: pointer;
  background: var(--accent); color: #fff;
}
button:hover { filter: brightness(1.08); }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { background: #eef1f5; color: var(--ink); }
button.secondary:hover { background: #e2e7ee; }

/* ---------- Chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-bg); color: #12405f;
  border-radius: 999px; padding: 4px 10px; font-size: .82rem;
}
.chip button {
  background: transparent; color: #12405f; padding: 0 2px;
  font-size: .95rem; line-height: 1; font-weight: 700;
}
.chip button:hover { color: var(--red); filter: none; }
.chip.static { cursor: default; }

/* ---------- Beispiele ---------- */
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.examples-label { font-size: .85rem; color: var(--muted); align-self: center; }
.example {
  background: #fff; color: var(--accent);
  border: 1px solid var(--line); font-weight: 500;
  font-size: .82rem; padding: 6px 12px; border-radius: 999px;
  box-shadow: var(--shadow);
}

/* ---------- Banner ---------- */
.banner {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: .9rem;
  border: 1px solid transparent;
}
.banner.error { background: var(--red-bg); color: var(--red); border-color: #f0c8c6; }
.banner.warn { background: var(--orange-bg); color: #7a3c00; border-color: #f3d9b8; }
.banner.info { background: var(--blue-bg); color: #12405f; border-color: #c4d8ec; }

/* ---------- Ergebnis ---------- */
.results-head h2 { margin: 0 0 4px; }
.results-head { margin-bottom: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); gap: 16px; }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

.disease-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
}
.disease-card.cat-allgemein { border-left-color: var(--green); }
.disease-card.cat-indikations { border-left-color: var(--orange); }

.card-head { margin-bottom: 8px; }
.card-head h3 { margin: 0 0 6px; font-size: 1.05rem; }
.card-head h3 .en { color: var(--muted); font-weight: 400; font-size: .85em; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-size: .72rem; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  letter-spacing: .2px;
}
.badge.cat-allgemein { background: var(--green-bg); color: var(--green); }
.badge.cat-indikations { background: var(--orange-bg); color: var(--orange); }
.badge.free { background: var(--green-bg); color: var(--green); }
.badge.paid { background: var(--red-bg); color: var(--red); }
.badge.matched { background: var(--blue-bg); color: #12405f; }

.reasons { margin: 8px 0 0; padding-left: 18px; font-size: .88rem; }
.reasons li { margin-bottom: 3px; }
.kw-note { font-size: .75rem; color: var(--muted); display: block; margin-top: 4px; }

.detail-block { border-top: 1px dashed var(--line); margin-top: 10px; padding-top: 8px; }
.detail-block h4 { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.detail-block p { margin: 4px 0; font-size: .88rem; }
.schedule-desc { font-size: .88rem; }
details.detail-block { border: none; }
details.detail-block summary {
  cursor: pointer; font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px; color: var(--accent);
  margin-top: 10px;
}

.kv { display: flex; gap: 10px; font-size: .85rem; margin: 4px 0; }
.kv-label { flex: 0 0 130px; color: var(--muted); font-weight: 600; }
.kv-value { flex: 1; }
.kv-value.chips-static { display: flex; flex-wrap: wrap; gap: 5px; }

.list { margin: 6px 0; padding-left: 18px; font-size: .85rem; }
.list li { margin-bottom: 3px; }

table.doses { width: 100%; border-collapse: collapse; font-size: .85rem; margin: 6px 0; }
table.doses th {
  text-align: left; background: #f0f3f7; font-size: .75rem;
  text-transform: uppercase; letter-spacing: .4px; color: var(--muted);
}
table.doses th, table.doses td { padding: 5px 8px; border-bottom: 1px solid var(--line); }

.pep {
  margin-top: 10px; background: var(--green-bg); color: #14532d;
  border: 1px solid #bfe3c9; border-radius: 8px;
  padding: 8px 12px; font-size: .85rem;
}

/* ---------- Schnellansicht (Stufe 1) ---------- */
.stage-badge {
  display: inline-block; margin-left: 10px; padding: 2px 10px;
  background: var(--blue-bg); color: #12405f;
  border-radius: 999px; font-size: .7rem; font-weight: 600; vertical-align: middle;
}
.quick-list {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden;
}
.quick-row {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 6px 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  border-left: 5px solid var(--accent);
}
.quick-row:last-child { border-bottom: none; }
.quick-row.cat-allgemein { border-left-color: var(--green); }
.quick-row.cat-indikations { border-left-color: var(--orange); }
.quick-name { flex: 1 1 auto; }
.quick-name .en { color: var(--muted); font-weight: 400; font-size: .85em; }
.quick-row .reasons { flex: 1 1 100%; margin-top: 4px; }
.quick-schedule {
  flex: 1 1 100%; margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--line); font-size: .85rem;
}
.quick-schedule-title {
  display: block; margin-bottom: 3px;
  font-size: .7rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted);
}
.quick-doses { margin: 0; padding-left: 18px; }
.quick-doses li { margin-bottom: 2px; }
.quick-vaccines { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.quick-vaccines .chip { font-size: .74rem; padding: 3px 9px; }
.quick-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 14px; }
.full-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- Krankheits-Gitter ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin-top: 12px; }
.disease-item {
  text-align: left; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 8px; padding: 8px 12px; font-weight: 400;
  display: flex; flex-direction: column; gap: 1px;
}
.disease-item.cat-allgemein { border-left-color: var(--green); }
.disease-item.cat-indikations { border-left-color: var(--orange); }
.disease-item .di-name { font-size: .88rem; font-weight: 600; }
.disease-item .di-en { font-size: .74rem; color: var(--muted); }
.disease-item:hover { background: #f7fafc; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(15, 25, 40, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
/* hidden-Attribut muss display:flex überschreiben (sonst permanent sichtbar) */
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative;
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 12px 48px rgba(10, 20, 40, .3);
  max-width: 760px; width: 100%;
  max-height: 86vh; overflow-y: auto;
  padding: 22px 26px;
}
.modal-close {
  position: absolute; top: 10px; right: 12px;
  background: transparent; color: var(--muted);
  font-size: 1.5rem; line-height: 1; padding: 4px 8px;
}
.modal-close:hover { color: var(--red); filter: none; }

/* ---------- Footer ---------- */
footer {
  background: #fff; border-top: 1px solid var(--line);
  padding: 16px 28px; font-size: .8rem; color: var(--muted);
}
footer p { max-width: 1280px; margin: 0 auto; }
