/* =========================================================
   af-abx.css
   Scope: Dosierungs-Widget (Niereninsuffizienz, TDM)
   Quelle: af-abx-frontend.php (inline CSS ausgelagert)
   ========================================================= */

/* ---------------------------------------------------------
   Panel (Standard-Infos)
   --------------------------------------------------------- */
.af-panel { padding: 0; overflow: hidden; }

.af-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.55);
}

.af-panel-title { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.af-panel-title .af-ico { font-size: 1.05rem; }
.af-panel-chevron { opacity: .65; font-weight: 900; }
.af-panel-body { padding: 10px 12px 12px; }

/* ---------------------------------------------------------
   Key-Value Rows
   --------------------------------------------------------- */
.af-kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid rgba(15,23,42,0.10);
}
.af-panel-body .af-kv:first-child { border-top: 0; padding-top: 2px; }
.af-k { opacity: .72; font-weight: 600; }
.af-v { font-weight: 800; text-align: right; white-space: nowrap; }
.af-subtext { padding: 6px 0 2px; opacity: .88; line-height: 1.35; }
.af-gap { height: 10px; }

/* ---------------------------------------------------------
   Highlight (Typische Indikationen)
   --------------------------------------------------------- */
.af-highlight {
  margin: 10px 0;
  border-radius: 12px;
  border: 1px solid rgba(245,158,11,0.28);
  background: rgba(255,246,214,0.92);
  padding: 9px 10px;
}
.af-highlight-title { font-weight: 900; margin-bottom: 6px; }
.af-highlight-body { opacity: .92; line-height: 1.35; }

/* ---------------------------------------------------------
   Collapse Cards (Standard / Niere / Dialyse)
   --------------------------------------------------------- */
.af-collapse { padding: 10px 12px 12px; }

.af-collapse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.af-collapse-title { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.af-collapse-title .af-ico { font-size: 1.05rem; }

.af-collapse-chevron {
  opacity: .65;
  font-weight: 900;
  transition: transform .12s ease;
}
.af-collapse.is-open .af-collapse-chevron { transform: rotate(180deg); }

.af-collapse-summary { margin-top: 6px; opacity: .78; line-height: 1.35; }

.af-collapse-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(15,23,42,0.10);
  display: none;
}

@media (max-width: 480px) {
  .af-panel-head { padding: 10px 10px; }
  .af-panel-body { padding: 10px 10px 12px; }
  .af-collapse { padding: 10px 10px 12px; }
  .af-v { white-space: normal; }
}

/* ---------------------------------------------------------
   ABX Hero (Antibiotikum-Auswahl-Card)
   --------------------------------------------------------- */
.af-abx-grid { gap: 14px; }

.af-abx-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.af-abx-hero-left { display: flex; align-items: center; gap: 12px; }

.af-abx-hero-ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(19,127,236,0.10);
  border: 1px solid rgba(19,127,236,0.18);
}
.af-abx-hero-ico span { font-size: 20px; }

.af-abx-hero-title { font-size: 1.05rem; font-weight: 900; margin: 0; line-height: 1.15; }
.af-abx-hero-sub {
  margin-top: 2px;
  font-size: .72rem; font-weight: 700; opacity: .65;
  letter-spacing: .08em; text-transform: uppercase;
}

.af-abx-hero-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 800; font-size: .86rem;
  background: rgba(19,127,236,1);
  color: #fff; border: 0;
}
.af-abx-hero-btn:active { transform: translateY(1px); }

/* ---------------------------------------------------------
   KPI-Tiles
   --------------------------------------------------------- */
.af-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 620px) {
  .af-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

.af-kpi {
  text-align: center;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.75);
  padding: 10px 10px;
}
.af-kpi .k {
  display: block;
  font-size: .68rem; font-weight: 900; opacity: .55;
  letter-spacing: .10em; text-transform: uppercase;
  margin-bottom: 4px;
}
.af-kpi .v { font-size: 1.10rem; font-weight: 900; color: rgba(19,127,236,1); }

/* ---------------------------------------------------------
   Indikationen (Amber-Box)
   --------------------------------------------------------- */
.af-indications {
  border-radius: 16px;
  border: 1px solid rgba(245,158,11,0.25);
  background: rgba(255,246,214,0.92);
  padding: 12px 12px;
}
.af-indications-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.af-indications-head .ico { font-size: 18px; opacity: .85; }
.af-indications-head .t {
  font-size: .72rem; font-weight: 900; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(180,83,9,0.95);
}
.af-indications-body { line-height: 1.4; font-weight: 650; opacity: .88; }

/* ---------------------------------------------------------
   Collapsible Sections
   --------------------------------------------------------- */
.af-sec {
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(248,250,255,0.92);
  overflow: hidden;
}
.af-sec-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 12px; cursor: pointer;
}
.af-sec-left { display: flex; align-items: center; gap: 10px; }
.af-sec-left .ico { font-size: 20px; color: rgba(19,127,236,1); }
.af-sec-left .label { font-weight: 900; }
.af-sec-chevron { opacity: .65; font-weight: 900; transition: transform .12s ease; }
.af-sec.is-open .af-sec-chevron { transform: rotate(180deg); }

.af-sec-summary { padding: 0 12px 12px; opacity: .75; line-height: 1.35; font-weight: 650; }

.af-sec-body {
  display: none;
  padding: 12px 12px;
  border-top: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.55);
}

.af-sec-kv {
  display: flex; justify-content: space-between;
  gap: 12px; padding: 8px 0;
  border-top: 1px solid rgba(15,23,42,0.10);
}
.af-sec-kv:first-child { border-top: 0; padding-top: 0; }
.af-sec-k { opacity: .72; font-weight: 650; }
.af-sec-v { font-weight: 900; text-align: right; }

/* ---------------------------------------------------------
   Mini-Grid (Nierenwerte)
   --------------------------------------------------------- */
.af-mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.af-mini {
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.80);
  padding: 8px 8px;
}
.af-mini .k {
  font-size: .68rem; font-weight: 900; opacity: .55;
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 4px;
}
.af-mini .v { font-weight: 900; }

/* ---------------------------------------------------------
   Bottom Sheet (Antibiotikum-Auswahl)
   --------------------------------------------------------- */
#af-abx-sheet { display: none; }
#af-abx-sheet.is-open { display: flex; }

#af-abx-sheet .af-abx-sheet-panel { color: #0f172a; }
#af-abx-sheet #af-abx-sheet-search { color: #0f172a; background: #fff; }
#af-abx-sheet .af-abx-sheet-item { color: #0f172a; background: rgba(248,250,255,.95); }
#af-abx-sheet .af-abx-sheet-item:hover { background: rgba(19,127,236,.10); }
