/*
 * „Fragen? Frag Daniel." — Kontakt-Widget der fünf Landingpages.
 *
 * Quelle: brand/frag-daniel/. In die Seiten kopiert von
 * brand/frag-daniel/verteilen.sh (assets/frag-daniel.3e2a80e9.css). Nicht in den
 * Kopien ändern.
 *
 * Farben aus der Seite: --blue, --blue-dk, --blue-lt. Die Vorgaben dahinter
 * greifen nur, wenn eine Seite sie nicht setzt.
 *
 * .fdt ist die Terminwahl im Anfrageformular (frag-daniel.js,
 * formulareAnbinden). Sie teilt sich Farben und Raster mit dem Widget.
 */
.fd, .fdt {
  --fd-ac: var(--blue, #3566e8);
  --fd-dk: var(--blue-dk, #2950c4);
  --fd-lt: var(--blue-lt, #edf2ff);
  --fd-ink: #0f2347;
  --fd-ink2: #4a6183;
  --fd-line: #dde5f0;
  --fd-soft: #f7f9fc;
  --fd-ok: #27994f;
  --fd-strich: #9fb0c8;
  --fd-rand: #c4d0e0;
  --fd-platz: #6b7f9c;
  --fd-disp: var(--display, 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif);
  --fd-body: var(--body, 'Instrument Sans', 'Segoe UI', system-ui, sans-serif);
  --fd-sh: 0 4px 5px rgba(71,103,136,.05), 0 8px 15px rgba(71,103,136,.06), 0 30px 50px rgba(13,26,54,.16);
  font-family: var(--fd-body);
  color: var(--fd-ink);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.fd *, .fd *::before, .fd *::after, .fdt *, .fdt *::before, .fdt *::after { box-sizing: border-box; margin: 0; }
.fd button, .fd input, .fd textarea, .fdt button { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
.fd button, .fdt button { cursor: pointer; background: none; border: 0; padding: 0; }
.fd svg, .fdt svg { width: 20px; height: 20px; flex: none; display: block; }
.fd [hidden], .fdt [hidden], .fdt[hidden] { display: none !important; }
.fd :focus-visible, .fdt :focus-visible { outline: 2px solid var(--fd-ac); outline-offset: 2px; }
.fd input:focus-visible, .fd textarea:focus-visible { outline: 0; }

/* ── Bild ───────────────────────────────────────────────────────────── */
.fd-bild { position: relative; width: 44px; height: 44px; flex: none; }
.fd-bild img, .fd-bild b {
  width: 44px; height: 44px; border-radius: 50%; display: block; object-fit: cover;
  border: 1.5px solid var(--fd-ac); background: var(--fd-lt);
}
.fd-bild b { display: flex; align-items: center; justify-content: center; color: var(--fd-dk); font: 700 20px var(--fd-disp); }
.fd-bild i { position: absolute; right: -1px; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--fd-ok); border: 2px solid #fff; }

/* ── Geschlossen ────────────────────────────────────────────────────── */
.fd .fd-zu {
  position: fixed; right: 24px; bottom: 24px; z-index: 65; width: 320px;
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: #fff !important; border: 1px solid var(--fd-line) !important; border-radius: 12px;
  padding: 10px 14px 10px 10px !important; box-shadow: 0 8px 28px rgba(13,26,54,.2);
  transition: transform .2s ease-out, box-shadow .2s ease-out;
}
.fd .fd-zu:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(13,26,54,.24); }
.fd-zu-text { flex: 1; line-height: 1.3; min-width: 0; }
.fd-zu-text b { display: block; font: 700 16px/1.3 var(--fd-disp); color: var(--fd-ink); }
.fd-zu-text span { font-size: 13.5px; color: var(--fd-ink2); }
.fd .fd-zu > svg { color: var(--fd-ac); }

/* ── Offen ──────────────────────────────────────────────────────────── */
.fd-dim { position: fixed; inset: 0; z-index: 89; background: rgba(13,26,54,.42); }
.fd-fenster {
  position: fixed; right: 24px; bottom: 24px; z-index: 90; width: 384px;
  height: min(752px, calc(100vh - 48px)); height: min(752px, calc(100dvh - 48px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--fd-line); border-radius: 16px; box-shadow: var(--fd-sh);
}
.fd-kopf { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--fd-line); flex: none; }
.fd-kopf-text { flex: 1; line-height: 1.3; }
.fd-kopf-text b { display: block; font: 700 18px/1.3 var(--fd-disp); }
.fd-kopf-text span, .fd-note { font-size: 13.5px; color: var(--fd-ink2); line-height: 1.45; }
.fd .fd-schliessen { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: var(--fd-ink2); border-radius: 8px; }
.fd .fd-schliessen:hover { background: var(--fd-soft); }

.fd-ansicht { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fd-rollen { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

/* Chat: ein Verlauf ohne Blasen */
.fd-verlauf { display: flex; flex-direction: column; gap: 14px; padding: 20px 20px 12px; font-size: 15.5px; line-height: 1.45; }
.fd-beitrag { white-space: pre-wrap; overflow-wrap: anywhere; }
.fd-wer { display: block; font-size: 12.5px; font-weight: 700; margin: 0 2px 3px 0; color: var(--fd-ink2); }
.fd-beitrag.team .fd-wer { color: var(--fd-dk); }
.fd-beitrag.du { border-left: 3px solid var(--fd-ac); padding-left: 11px; }
.fd-beitrag.wartet { opacity: .6; }

.fd-mail { border-top: 1px solid var(--fd-line); padding: 12px 16px; background: var(--fd-soft); flex: none; }
.fd-mail p { font-size: 13.5px; color: var(--fd-ink2); margin-bottom: 8px; line-height: 1.4; }
.fd-mailzeile { display: flex; align-items: center; gap: 8px; border: 1px solid var(--fd-rand); background: #fff; border-radius: 8px; height: 42px; padding: 0 10px; color: var(--fd-platz); }
.fd-mailzeile:focus-within { border-color: var(--fd-ac); }
.fd-mailzeile input { flex: 1; min-width: 0; border: 0 !important; outline: 0; background: none; height: 40px; font-size: 16px; color: var(--fd-ink); padding: 0; box-shadow: none !important; }
.fd input::placeholder, .fd textarea::placeholder { color: var(--fd-platz); opacity: 1; }

.fd-schreiben { display: flex; gap: 10px; align-items: flex-end; padding: 12px 20px; flex: none; }
.fd-schreiben textarea {
  flex: 1; resize: none; border: 0 !important; border-bottom: 1.5px solid var(--fd-strich) !important; border-radius: 0;
  background: none; padding: 10px 0; font-size: 16px; line-height: 1.4; max-height: 120px; min-height: 44px; outline: 0; box-shadow: none !important;
}
.fd-schreiben textarea:focus { border-bottom-color: var(--fd-ac) !important; }
.fd .fd-senden { color: var(--fd-ac); width: 40px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.fd .fd-senden svg { width: 24px; height: 24px; }
.fd .fd-senden:disabled { opacity: .4; cursor: default; }
.fd-fehler { color: #b3261e; font-size: 13.5px; padding: 0 20px 8px; flex: none; }
.fd-fehler:empty { display: none; }

/* Termin */
.fd-termin { padding: 18px 20px 16px; }
.fd-titel { font: 700 17px/1.25 var(--fd-disp); margin-bottom: 2px; }
.fd-woche { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 10px; font-size: 13.5px; color: var(--fd-ink2); }
:is(.fd, .fdt) .fd-woche button { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--fd-ac); }
:is(.fd, .fdt) .fd-woche button:disabled { color: var(--fd-line); cursor: default; }
:is(.fd, .fdt) .fd-woche button:not(:disabled):hover { background: var(--fd-soft); }
.fd-raster { display: flex; gap: 8px; margin-bottom: 14px; }
.fd-tag { flex: 1; min-width: 0; }
.fd-tag-kopf { text-align: center; margin-bottom: 8px; line-height: 1.2; }
.fd-tag-kopf b { display: block; font: 700 16px var(--fd-disp); }
:is(.fd, .fdt) .fd-slot {
  width: 100%; height: 38px; margin-bottom: 6px; border: 1px solid var(--fd-rand) !important; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14.5px; background: #fff !important; color: var(--fd-ink);
}
:is(.fd, .fdt) .fd-slot:not(:disabled):hover { border-color: var(--fd-ac) !important; }
:is(.fd, .fdt) .fd-slot.an { background: var(--fd-ac) !important; border-color: var(--fd-ac) !important; color: #fff; }
:is(.fd, .fdt) .fd-slot:disabled { color: #7b8da6; background: var(--fd-soft) !important; border-color: var(--fd-line) !important; text-decoration: line-through; font-weight: 400; cursor: default; }
.fd-leer { padding: 18px 0; color: var(--fd-ink2); }

.fd-feld { display: block; padding: 8px 0 0; border-bottom: 1.5px solid var(--fd-strich); margin-bottom: 12px; }
.fd-feld:focus-within { border-bottom-color: var(--fd-ac); }
.fd-feld span { display: block; font-size: 13px; color: var(--fd-ink2); margin-bottom: 2px; font-weight: 500; }
.fd-feld input { display: block; width: 100%; border: 0 !important; outline: 0; background: none; padding: 2px 0 6px; font-size: 16px; color: var(--fd-ink); box-shadow: none !important; }
.fd .fd-knopf {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin-top: 4px;
  border-radius: 8px; background: var(--fd-ac) !important; color: #fff; font: 700 16px/1 var(--fd-disp);
}
.fd .fd-knopf:disabled { opacity: .5; cursor: default; }
.fd .fd-knopf:not(:disabled):hover { background: var(--fd-dk) !important; }
.fd-gebucht { padding: 28px 20px; }
.fd-gebucht .fd-titel { margin-bottom: 8px; }

/* Fuß: Wechsel zwischen Chat und Termin */
.fd .fd-fuss {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 20px; flex: none; text-align: left;
  border-top: 1px solid var(--fd-line) !important; background: var(--fd-soft) !important; font-size: 15px;
}
.fd .fd-fuss > svg { color: var(--fd-ac); }
.fd .fd-fuss span { flex: 1; }
.fd .fd-fuss b { color: var(--fd-ac); font: 700 15px var(--fd-disp); }
.fd .fd-fuss:hover b { text-decoration: underline; }
/* ── Terminwahl im Anfrageformular ──────────────────────────────────── */
.fdt {
  font-size: 15px; line-height: 1.4;
  border: 1px solid var(--line, var(--fd-line)); border-radius: var(--r, 8px);
  background: #fff; padding: 16px; margin-top: 4px;
}
.fdt-kopf b { display: block; font: 700 16px/1.3 var(--fd-disp); margin-bottom: 2px; }
.fdt-wahl { display: flex; gap: 8px; margin: 12px 0 2px; }
.fdt .fdt-option {
  flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; border-radius: 8px; text-align: center;
  border: 1px solid var(--fd-rand); background: #fff; font-weight: 600; font-size: 14.5px; line-height: 1.25;
}
.fdt .fdt-option:hover { border-color: var(--fd-ac); }
.fdt .fdt-option.an { border-color: var(--fd-ac); background: var(--fd-lt); color: var(--fd-dk); box-shadow: inset 0 0 0 1px var(--fd-ac); }
.fdt .fd-raster { margin-bottom: 4px; }
.fdt-stand { font-size: 13.5px; color: var(--fd-ink2); margin-top: 10px; }
@media (max-width: 400px) {
  .fdt { padding: 14px 12px; }
  .fdt .fd-raster { gap: 5px; }
  .fdt .fd-slot { font-size: 13.5px; }
  .fdt .fd-tag-kopf b { font-size: 15px; }
}

/* Der Honigtopf: für Menschen unsichtbar */
.fd-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ── Handy ──────────────────────────────────────────────────────────── */
@media (max-width: 620px) {
  .fd .fd-zu { right: 12px; bottom: 12px; width: 306px; max-width: calc(100vw - 24px); }
  body.fd-da { padding-bottom: 80px; }

  .fd-fenster {
    left: 0; right: 0; bottom: 0; width: auto; border-radius: 16px 16px 0 0; border-width: 1px 0 0;
    height: min(756px, calc(100vh - 56px)); height: min(756px, calc(100dvh - 56px));
    padding-bottom: env(safe-area-inset-bottom);
  }
}
@media (min-width: 621px) { .fd-dim { display: none; } }
@media (prefers-reduced-motion: reduce) { .fd .fd-zu { transition: none; } }
