/* Callback block „Rufen Sie mich zurück“ (21h-callback-request.php, wp/js/callback-request.js).
   Loaded only on pages that carry the block (21h- wp_head 1011, after ruhe.css). „Ruhe“ look: opaque
   ivory card, one thin line, flat copper primary, no gradient/glass. Klarheit sizes: reading text
   20 px desktop / 19 px phone, nothing under 16 px, every control ≥ 56 px, 3 px rust focus ring.
   Prefix `html body #main .dw-cb` + !important where the glass/autumn sheets set !important colours. */

.dw-cb {
  --cb-card: var(--ru-card, #fffdf8);
  --cb-sand: var(--ru-sand, #f3e8d6);
  --cb-line: var(--ru-line-strong, rgba(60, 30, 10, .28));
  --cb-ink: var(--ru-ink, #22180f);
  --cb-meta: var(--ru-meta, #5a4634);
  --cb-rust: var(--ru-rust, #6e2810);
  --cb-sea: var(--ru-sea, #17546d);
  --cb-red: var(--ru-red, #9c2a1e);
  margin: 0 0 36px;
  padding: 28px;
  background: var(--cb-card) !important;
  color: var(--cb-ink) !important;
  border: 1px solid var(--cb-line);
  border-radius: 18px;
  font-size: 20px;
  line-height: 1.5;
  scroll-margin-top: 110px;
}
/* A blanket descendant colour rule is safe HERE (unlike `#main .hentry :is(p,span,label)`, the
   2026-10-25 phone-wizard incident): .dw-cb paints its own opaque card background above, so every
   descendant sits on that one ivory surface; the rule only overrides the autumn sheets' light text.
   Chips, buttons and links set their own colours below. */
html body #main .dw-cb :is(p, span, label, strong, li) { color: var(--cb-ink) !important; -webkit-text-fill-color: currentColor; }
html body #main .dw-cb .dw-cb-h {
  font-family: Fraunces, Georgia, serif !important;
  font-size: 32px !important; line-height: 1.2; margin: 0 0 12px;
  color: var(--cb-rust) !important; -webkit-text-fill-color: var(--cb-rust);
  background: none !important; padding: 0 !important; border: 0 !important; hyphens: manual;
}
html body #main .dw-cb .dw-cb-lead { margin: 0 0 24px; max-width: 65ch; font-size: inherit !important; }
.dw-cb .dw-cb-lead-line { display: block; }
.dw-cb .dw-cb-lead-line + .dw-cb-lead-line { margin-top: 6px; }
html body #main .dw-cb a {
  color: var(--cb-sea) !important; -webkit-text-fill-color: var(--cb-sea);
  text-decoration: underline !important; text-decoration-thickness: 2px; text-underline-offset: 3px; font-weight: 700;
}

html body #main .dw-cb .dw-cb-none {
  margin: 0; padding: 14px 18px; border: 2px solid var(--cb-line); border-radius: 12px; background: var(--cb-sand) !important; font-weight: 700;
}

/* Fields: label above, one column. */
.dw-cb .dw-cb-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; max-width: 760px; margin: 0; min-width: 0; }
/* 320 px phones (iPhone SE): inputs and chips must not keep their intrinsic width, or the block runs 12 px past the edge. */
.dw-cb .dw-cb-form > *, .dw-cb .dw-cb-input, .dw-cb .dw-cb-chips, .dw-cb .dw-cb-phone-row { min-width: 0; max-width: 100%; }
.dw-cb .dw-cb-field { margin: 0; padding: 0; border: 0; min-width: 0; }
html body #main .dw-cb .dw-cb-label {
  display: block; margin: 0 0 8px; font-weight: 700; font-size: inherit !important;
  text-transform: none !important; letter-spacing: 0 !important;
}
html body #main .dw-cb .dw-cb-help { margin: -2px 0 8px; font-size: 18px !important; color: var(--cb-meta) !important; }
html body #main .dw-cb :is(.dw-cb-input, select.dw-cb-input) {
  display: block; width: 100%; box-sizing: border-box;
  min-height: 56px; padding: 10px 14px; margin: 0;
  font: inherit; font-size: 20px !important; color: var(--cb-ink) !important; -webkit-text-fill-color: var(--cb-ink);
  background: #fff !important; border: 2px solid var(--cb-line) !important; border-radius: 12px; box-shadow: none !important;
}
html body #main .dw-cb .dw-cb-input::placeholder { color: var(--cb-meta); -webkit-text-fill-color: var(--cb-meta); opacity: 1; }
html body #main .dw-cb .dw-cb-input[aria-invalid="true"] { border-color: var(--cb-red) !important; border-width: 3px !important; }
.dw-cb .dw-cb-phone-row { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 10px; }
.dw-cb .dw-cb-time { max-width: 12em; }

/* Chips: ivory with ink text, selected copper with white text. */
.dw-cb .dw-cb-chips { display: flex; flex-wrap: wrap; gap: 10px; }
html body #main .dw-cb .dw-cb-chip {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
  min-height: 56px; min-width: 64px; padding: 8px 18px; margin: 0;
  font: inherit; font-size: 20px !important; font-weight: 700; line-height: 1.2; text-align: center;
  color: var(--cb-ink) !important; -webkit-text-fill-color: var(--cb-ink);
  background: var(--cb-sand) !important; border: 2px solid var(--cb-line) !important; border-radius: 14px;
  box-shadow: none !important; text-transform: none !important; letter-spacing: 0 !important; cursor: pointer;
}
html body #main .dw-cb .dw-cb-chip .dw-cb-chip-main { color: inherit !important; }
html body #main .dw-cb .dw-cb-chip .dw-cb-chip-sub { font-size: 16px !important; font-weight: 400; color: inherit !important; }
html body #main .dw-cb .dw-cb-chip:hover:not([disabled]) { border-color: var(--cb-rust) !important; }
html body #main .dw-cb .dw-cb-chip[aria-pressed="true"] {
  background: var(--dw-terracotta-cta, #bf501c) !important; border-color: var(--dw-terracotta-cta, #bf501c) !important;
  color: #fff !important; -webkit-text-fill-color: #fff;
}
html body #main .dw-cb .dw-cb-chip[aria-pressed="true"] .dw-cb-chip-main::before { content: "✓ "; }
html body #main .dw-cb .dw-cb-chip[disabled] {
  cursor: not-allowed; background: transparent !important; border-style: dashed !important;
  color: var(--cb-meta) !important; -webkit-text-fill-color: var(--cb-meta); text-decoration: line-through;
}

/* Consent: a big box, the whole sentence is the hit area. */
html body #main .dw-cb .dw-cb-consent { display: flex; gap: 14px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.dw-cb .dw-cb-consent input { flex: 0 0 auto; width: 30px; height: 30px; margin: 2px 0 0; accent-color: var(--dw-terracotta-cta, #bf501c); }

/* Honeypot: off-screen, never display:none (some bots skip hidden inputs). */
.dw-cb .dw-cb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

html body #main .dw-cb .dw-cb-error {
  margin: 0; padding: 14px 18px; border: 2px solid var(--cb-red); border-left-width: 8px; border-radius: 12px;
  background: #fbeceb !important; color: var(--cb-ink) !important; font-weight: 700;
}
.dw-cb .dw-cb-error[hidden], .dw-cb .dw-cb-form[hidden], .dw-cb [hidden] { display: none !important; }

/* Primary: white on copper (CTA contrast rule). */
html body #main .dw-cb :is(.dw-cb-submit, .dw-cb-print) {
  justify-self: start; min-height: 60px; padding: 12px 32px; margin: 0;
  font: inherit; font-size: 21px !important; font-weight: 700;
  background: var(--dw-terracotta-cta, #bf501c) !important; color: #fff !important; -webkit-text-fill-color: #fff;
  border: 0 !important; border-radius: 14px; box-shadow: none !important; cursor: pointer; text-transform: none !important;
}
html body #main .dw-cb :is(.dw-cb-submit, .dw-cb-print):is(:hover, :focus-visible, :active) {
  background: var(--dw-terracotta-cta-hover, #a3431a) !important; color: #fff !important;
}
html body #main .dw-cb .dw-cb-submit[aria-busy="true"] { opacity: .75; cursor: progress; }

html body #main .dw-cb :is(.dw-cb-chip, .dw-cb-input, .dw-cb-submit, .dw-cb-print, a, input[type=checkbox]):focus-visible {
  outline: 3px solid var(--cb-rust) !important; outline-offset: 3px;
}

/* Thank-you state. */
.dw-cb .dw-cb-done:empty { display: none; }
.dw-cb .dw-cb-done { display: grid; gap: 14px; outline: 0; }
html body #main .dw-cb .dw-cb-done p { margin: 0; max-width: 60ch; }
html body #main .dw-cb .dw-cb-done .dw-cb-done-main {
  font-family: Fraunces, Georgia, serif; font-size: 28px !important; line-height: 1.3; font-weight: 600;
  color: var(--cb-rust) !important; -webkit-text-fill-color: var(--cb-rust);
}
.dw-cb.is-done .dw-cb-lead { display: none; }

/* Kontakt: five channel cards read better as 3 + 2 than 4 + 1. */
@media (min-width: 1100px) {
  .kontakt-page-2026 .kp-channel-grid:has(.kp-channel-callback) { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 959px) {
  .dw-cb { padding: 20px 16px; font-size: 19px; border-radius: 14px; }
  html body #main .dw-cb .dw-cb-h { font-size: 28px !important; }
  html body #main .dw-cb :is(.dw-cb-input, .dw-cb-chip) { font-size: 19px !important; }
  html body #main .dw-cb .dw-cb-help { font-size: 17px !important; }
  html body #main .dw-cb .dw-cb-done .dw-cb-done-main { font-size: 24px !important; }
  .dw-cb .dw-cb-phone-row { grid-template-columns: 1fr; }
  .dw-cb [data-dw-cb-chips="for"] .dw-cb-chip,
  .dw-cb [data-dw-cb-chips="slot"] .dw-cb-chip { flex: 1 1 100%; }
  html body #main .dw-cb :is(.dw-cb-submit, .dw-cb-print) { justify-self: stretch; width: 100%; }
}

/* Print after a confirmed wish: only the block (JS marks the block's ancestors .dw-cb-print-root). */
@media print {
  /* :not(#…) adds id weight: the header sheets show their fixed buttons with #id !important rules. */
  html.dw-cb-printing body > :not(.dw-cb-print-root):not(#dw-cb-x):not(#dw-cb-y),
  html.dw-cb-printing .dw-cb-print-root > :not(.dw-cb-print-root):not(.dw-cb):not(#dw-cb-x):not(#dw-cb-y) { display: none !important; }
  html.dw-cb-printing .dw-cb-print-root { display: block !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: #fff !important; box-shadow: none !important; position: static !important; }
  html.dw-cb-printing .dw-cb { border: 0 !important; padding: 0 !important; }
  html.dw-cb-printing .dw-cb .dw-cb-done p { margin: 0 0 12pt; color: #000 !important; -webkit-text-fill-color: #000; }
  html.dw-cb-printing .dw-cb .dw-cb-print { display: none !important; }
}

/* Turnstile renders a fixed 300 px iframe: never let it widen the page on 320 px phones. */
.dw-cb .dw-cb-ts, .dw-cb .dw-cb-ts > div { max-width: 100%; overflow: hidden; }
@media (max-width: 359px) {
  .dw-cb .dw-cb-ts { margin-left: -16px; margin-right: -16px; max-width: calc(100% + 32px); }
}
