/* Feedback-Knopf der AUC (Regelwerk Kapitel 9b). Gehört zu feedback.js.
   Nutzt die Variablen des AUC-Styleguides, mit Ersatzwerten für Seiten ohne app.css.
   --auc-fb-unten: Abstand des Knopfs zum unteren Rand. Eine Seite mit Leiste oder Kartensteuerung unten rechts setzt hier einen größeren Wert. */

.auc-fb-rund, .auc-fb {
  --fb-blau: var(--auc-blau, #0f427a);
  --fb-hell: var(--auc-hellblau, #14beed);
  --fb-dunkel: var(--auc-dunkelblau, #0a283c);
  --fb-rand: var(--auc-border, #e2e6ea);
  --fb-flaeche: var(--auc-surface, #f4f6f8);
  /* Dunkler als --auc-text-muted, damit kleiner Text den Kontrast nach WCAG AA erreicht */
  --fb-grau: #56677a;
  font-family: var(--auc-font, "Jost", Arial, sans-serif);
  box-sizing: border-box;
}
.auc-fb *, .auc-fb *::before, .auc-fb *::after { box-sizing: border-box; }

/* ---------- Schwebender Knopf ---------- */
.auc-fb-rund {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(var(--auc-fb-unten, 16px) + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  width: 56px;
  height: 56px;
  padding: 0;
  margin: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--fb-blau);
  color: #fff;
  box-shadow: 0 6px 20px rgba(10, 40, 60, .25);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.auc-fb-rund[hidden] { display: none; }
.auc-fb-rund:hover { background: var(--fb-hell); }
.auc-fb-rund:focus-visible { outline: 3px solid var(--fb-hell); outline-offset: 3px; }
.auc-fb-icon { width: 24px; height: 24px; fill: currentColor; flex: none; }
.auc-fb-rund .auc-fb-icon { width: 26px; height: 26px; }
@media print { .auc-fb-rund { display: none; } }
@media (prefers-reduced-motion: reduce) { .auc-fb-rund { transition: none; } }

/* ---------- Dialog ---------- */
.auc-fb { border: 0; border-top: 4px solid var(--fb-blau); padding: 0; width: 100%; max-width: 560px; max-height: 92vh; color: var(--fb-dunkel); background: #fff; font-size: 16px; line-height: 1.45; overflow: auto; }
.auc-fb::backdrop { background: rgba(10, 40, 60, .45); }
.auc-fb-innen { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.auc-fb-form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.auc-fb-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.auc-fb-kopf h2 { margin: 0; font-size: 20px; font-weight: 500; color: var(--fb-blau); }
.auc-fb-kopf h2:focus { outline: none; }
.auc-fb-zu { width: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: none; color: var(--fb-dunkel); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.auc-fb fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.auc-fb legend, .auc-fb-l { display: block; margin: 0 0 6px; padding: 0; font-size: 14px; font-weight: 500; color: var(--fb-dunkel); }
.auc-fb-arten { display: flex; flex-wrap: wrap; gap: 6px; }
.auc-fb-arten label { position: relative; display: inline-flex; align-items: center; min-height: 44px; margin: 0; padding: 0 14px; border: 1px solid var(--fb-blau); color: var(--fb-blau); font-size: 15px; font-weight: 500; cursor: pointer; }
.auc-fb-arten input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.auc-fb-arten label:has(input:checked) { background: var(--fb-blau); color: #fff; }
.auc-fb-arten label:has(input:focus-visible) { outline: 3px solid var(--fb-hell); outline-offset: 2px; }
.auc-fb textarea { display: block; width: 100%; min-height: 120px; margin: 0; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--fb-dunkel); background: #fff; border: 1px solid var(--fb-rand); border-radius: 0; resize: vertical; }
.auc-fb textarea::placeholder { color: var(--fb-grau); }
.auc-fb textarea:focus-visible, .auc-fb button:focus-visible, .auc-fb summary:focus-visible, .auc-fb a:focus-visible { outline: 3px solid var(--fb-hell); outline-offset: 1px; }
.auc-fb-zaehler { margin-top: 2px; font-size: 12px; color: var(--fb-grau); text-align: right; }
.auc-fb-warn { margin: 0; padding: 8px 10px; background: rgba(247, 214, 109, .32); border-left: 4px solid var(--auc-warning, #f7d66d); font-size: 14px; color: #5c4400; }
.auc-fb-klein { margin: 0; font-size: 13px; color: var(--fb-grau); }
.auc-fb a { color: var(--fb-blau); }
.auc-fb details { font-size: 13px; color: var(--fb-grau); }
.auc-fb summary { display: flex; align-items: center; min-height: 40px; cursor: pointer; text-decoration: underline; }
.auc-fb dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0 0 6px; }
.auc-fb dt { color: var(--fb-grau); }
.auc-fb dd { margin: 0; color: var(--fb-dunkel); overflow-wrap: anywhere; }
.auc-fb-fehler { margin: 0; padding: 8px 10px; background: rgba(230, 60, 75, .12); border-left: 4px solid var(--auc-rot, #e63c4b); color: #b32230; font-size: 14px; }
.auc-fb-fehler:empty { display: none; }
.auc-fb-knoepfe { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.auc-fb-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 0; padding: 0 18px; font: inherit; font-size: 15px; font-weight: 500; border: 1px solid var(--fb-blau); border-radius: 0; background: #fff; color: var(--fb-blau); cursor: pointer; }
.auc-fb-knopf-haupt { background: var(--fb-blau); color: #fff; }
.auc-fb-knopf-haupt:hover { background: var(--fb-hell); border-color: var(--fb-hell); }
.auc-fb-knopf:disabled { opacity: .6; cursor: wait; }
.auc-fb-knopf .auc-fb-icon { width: 20px; height: 20px; }
.auc-fb-ok { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-left: 4px solid var(--auc-gruen, #6ed7a0); background: var(--fb-flaeche); }
.auc-fb-ok strong { font-size: 16px; font-weight: 500; }

/* Handy: Blatt von unten über die ganze Breite */
@media (max-width: 599px) {
  .auc-fb { margin: auto 0 0; max-width: 100%; max-height: 90vh; }
  .auc-fb-knoepfe .auc-fb-knopf { flex: 1 1 auto; }
}
