/* =========================================================
   af-antibiogramm.css
   Scope: Antibiogramm-Widget
   ========================================================= */

/* ---------------------------------------------------------
   Card + Tabelle
   --------------------------------------------------------- */
.single-kapitel .entry-content .af-abg-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  padding: 14px 16px;
  margin-top: 12px;
}

.single-kapitel .entry-content .af-abg-note {
  font-size: 0.9rem;
  opacity: 0.85;
  margin: 0 0 10px 0;
}

.single-kapitel .entry-content .af-abg-table-wrap { overflow-x: auto; }

.single-kapitel .entry-content .af-abg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
}

.single-kapitel .entry-content .af-abg-table thead th {
  text-align: left;
  font-weight: 700;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.12);
  white-space: nowrap;
}

.single-kapitel .entry-content .af-abg-table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: middle;
}

.single-kapitel .entry-content .af-center { text-align: center; }

/* ---------------------------------------------------------
   Badges (S/I/R)
   --------------------------------------------------------- */
.single-kapitel .entry-content .af-abg-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9em;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.03);
}
.single-kapitel .entry-content .af-abg-badge-s {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.35);
}
.single-kapitel .entry-content .af-abg-badge-i {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.35);
}
.single-kapitel .entry-content .af-abg-badge-r {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.35);
}

/* ---------------------------------------------------------
   Erreger-Eingabefeld + Clear-Button
   --------------------------------------------------------- */
.af-input-wrap { position: relative; }

.single-kapitel .entry-content .af-input-wrap { position: relative; }

.single-kapitel .entry-content .af-input {
  width: 100%;
  padding-right: 40px;
  box-sizing: border-box;
}

.single-kapitel .entry-content .af-input-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 999px;
  background: rgba(0,0,0,0.03);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
}
.single-kapitel .entry-content .af-input-clear::before {
  content: "×";
  font-size: 20px;
  line-height: 1;
  color: rgba(17,24,39,0.85);
  transform: translateY(-1px);
}
.single-kapitel .entry-content .af-input-clear:hover { opacity: 0.9; background: rgba(0,0,0,0.06); }
.single-kapitel .entry-content .af-input-clear:focus {
  outline: 2px solid rgba(59,130,246,0.35);
  outline-offset: 2px;
}

/* ---------------------------------------------------------
   Autocomplete Dropdown
   --------------------------------------------------------- */
.af-erreger-dd {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 6px);
  z-index: 9999;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  max-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.af-erreger-dd-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.af-erreger-dd-item:hover { background: rgba(0,0,0,.04); }

/* ---------------------------------------------------------
   Material-Buttons
   --------------------------------------------------------- */
.af-abg-mat-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px 0;
}

.af-abg-mat-btn {
  appearance: none;
  border: 1px solid rgba(0,0,0,.18);
  background: #f3f4f6;
  color: #111827;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .05s ease;
}
.af-abg-mat-btn:hover { background: #e5e7eb; }
.af-abg-mat-btn:active { transform: translateY(1px); }
.af-abg-mat-btn.is-active {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

@media (max-width: 640px) {
  .af-abg-mat-btn { padding: 10px 12px; font-size: 15px; }
}

/* Mobile: Formular-Felder untereinander */
@media (max-width: 720px) {
  .af-abg-form > div:first-child {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

/* Formular-Raster (ersetzt die früheren Inline-Styles, Plugin ≥ 0.5.0) */
.af-abg-felder {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 10px;
  align-items: end;
}
.af-abg-felder select { width: 100%; }
.af-abg-aktionen {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.af-abg-status { opacity: .7; }
.af-abg-mehr { margin-top: 12px; }
.af-abg + .af-abg { margin-top: 24px; }

@media (max-width: 720px) {
  .af-abg-felder { grid-template-columns: 1fr; }
}
