/* ============================================================
   Platin-Profilseite: Direktanfrage an den Sachverständigen
   (partials/expert-direct-inquiry.php, js/expert-direct-inquiry.js)
   und die kurze Anfrage über uns als leiser Weg daneben
   (.xp-hero-aside im Kopf, .xp-contact-alt im Kontaktabschluss).
   Die Kacheln, Felder und der Fortschritt kommen aus den
   Anfragestrecken (.option-card, .field, .funnel-progress) und der
   kurzen Anfrage (.ei-chips, .ei-fields). Präfix xd-.
   ============================================================ */

/* ---------- Die Strecke im Text ---------- */
.xp-section-body > .xd { margin-top: 1.6rem; }
.xp-section-body > .xd:first-child { margin-top: 0; }
.xd {
  scroll-margin-top: 5.5rem;
  padding: clamp(1.1rem, 0.8rem + 1.2vw, 1.75rem);
  border-radius: 1.1rem;
  background: var(--color-sand);
  border-top: 4px solid var(--color-accent-500);
}
.xd-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-primary-700);
}
.xd-title {
  margin-top: 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.12rem + 0.7vw, 1.65rem);
  font-weight: 650;
  line-height: 1.2;
  color: var(--color-primary-950);
}
.xd-intro { margin-top: 0.4rem; max-width: 60ch; font-size: 1rem; line-height: 1.6; color: var(--color-primary-800); }
.xd-progress { margin: 1.1rem 0 1.25rem; }
.xd-progress[data-xd-progress="1"] .funnel-progress-bar { width: 25%; }
.xd-progress[data-xd-progress="2"] .funnel-progress-bar { width: 50%; }
.xd-progress[data-xd-progress="3"] .funnel-progress-bar { width: 75%; }
.xd-progress[data-xd-progress="4"] .funnel-progress-bar { width: 100%; }
.xd-flash { margin-top: 1rem; }

/* Ohne Skript stehen alle Fragen untereinander, mit Abstand und dem Gewerk im Titel. */
.xd-step { margin-top: 1.4rem; }
.xd--js .xd-step { margin-top: 0; }
.xd-group { min-inline-size: 0; }
.xd-group + .xd-group { margin-top: 1.4rem; }
.xd--js .xd-legend-note { display: none; }
.xd-legend-note { font-family: var(--font-sans); font-size: 0.85em; font-weight: 600; color: var(--color-primary-700); }
.xd .funnel-q { font-size: clamp(1.08rem, 1rem + 0.4vw, 1.3rem); margin-bottom: 0.8rem; }
.xd .option-grid { gap: 0.55rem; }
.xd .option-card { min-height: 3rem; padding: 0.7rem 0.9rem; background: #fff; }
.xd .option-label { font-size: 0.97rem; }
.xd-step > .field-error { margin-top: 0.7rem; }

.xd-topics { border: 0; padding: 0; margin: 0 0 1.1rem; min-inline-size: 0; }
.xd-topics-label {
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary-700);
}
.xd-chips .ei-chip span { background: #fff; }
.xd-chips .ei-chip input:checked + span { background: var(--color-primary-600); }

.xd-zip { margin-bottom: 1.4rem; }
.xd-zip-label { display: block; margin-bottom: 0.25rem; }
.xd-zip .ei-hint { margin: 0 0 0.6rem; }
.xd-zip-input { max-width: 10rem; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.xd .field { background: #fff; }
.xd-consent { margin-top: 1.1rem; }
.xd .fee-note { margin-top: 1rem; }

.xd-error { margin-top: 1rem; }
.xd-actions { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem; }
.xd-actions .btn { flex: 1 1 auto; min-width: 0; padding: 0.9rem 1.1rem; white-space: normal; line-height: 1.2; text-align: center; }
.xd-actions .btn:disabled { opacity: 0.7; cursor: progress; transform: none; }
.xd-promise {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.85rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--color-primary-800);
}
.xd-promise svg { flex: none; width: 1.05rem; height: 1.05rem; margin-top: 0.1rem; color: var(--color-primary-600); }
@media (min-width: 40rem) {
  .xd-actions { justify-content: flex-end; }
  .xd-actions .btn { flex: 0 0 auto; min-width: 14rem; }
  .xd-promise { justify-content: flex-end; text-align: right; }
}

/* ---------- Bestätigung ---------- */
.xd-success { display: grid; justify-items: start; gap: 0.6rem; }
.xd-success[hidden] { display: none; }
.xd-success-icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--color-primary-600);
  color: #fff;
}
.xd-success-icon svg { width: 1.4rem; height: 1.4rem; }
.xd-success-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.55rem);
  font-weight: 650;
  line-height: 1.25;
  color: var(--color-primary-950);
}
.xd-success-title:focus { outline: none; }
.xd-success-text { max-width: 60ch; font-size: 1rem; line-height: 1.6; color: var(--color-primary-900); }
.xd-success-call { font-size: 0.95rem; color: var(--color-primary-800); }
.xd-success-call a { font-weight: 700; color: var(--color-primary-800); text-decoration: underline; text-underline-offset: 3px; }
.xd-success-call a:focus-visible { outline: 3px solid var(--color-primary-700); outline-offset: 2px; border-radius: 2px; }

/* ---------- Die kurze Anfrage über uns: im Kopf leise daneben ---------- */
.xp-hero-aside {
  max-width: 24rem;
  padding: 0.95rem 1.1rem 1.05rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in oklch, #fff 18%, transparent);
  background: color-mix(in oklch, #fff 5%, transparent);
}
.xp-hero-aside-title { font-size: 0.95rem; font-weight: 700; color: #fff; }
.xp-hero-aside-text { margin-top: 0.25rem; font-size: 0.86rem; line-height: 1.5; color: color-mix(in oklch, #fff 80%, var(--color-primary-200)); }
.xp-hero-aside .btn { margin-top: 0.75rem; }
.xp-hero-aside .btn svg { width: 1.05rem; height: 1.05rem; }

@media (max-width: 63.99rem) {
  .xp-hero--direct .xp-hero-aside { grid-column: 1 / -1; margin-top: 1.5rem; }
}
/* Desktop mit Bild: rechts unter dem Bild, Text und Hauptaktion links über die volle Höhe. */
@media (min-width: 64rem) {
  .xp-hero--direct.xp-hero--portrait .xp-hero-grid,
  .xp-hero--direct.xp-hero--image .xp-hero-grid { row-gap: 1.25rem; }
  .xp-hero--direct.xp-hero--portrait .xp-hero-main,
  .xp-hero--direct.xp-hero--image .xp-hero-main { grid-column: 1; grid-row: 1 / span 2; }
  .xp-hero--direct.xp-hero--portrait .xp-hero-figure,
  .xp-hero--direct.xp-hero--image .xp-hero-figure { grid-column: 2; grid-row: 1; align-self: end; }
  .xp-hero--direct.xp-hero--portrait .xp-hero-aside,
  .xp-hero--direct.xp-hero--image .xp-hero-aside { grid-column: 2; grid-row: 2; align-self: start; justify-self: end; width: 100%; }
  .xp-hero--direct:not(.xp-hero--portrait):not(.xp-hero--image) .xp-hero-aside { margin-top: 0.5rem; }
}

/* ---------- Kontaktabschluss (Petrol): der zweite Weg als Textlink ---------- */
.xp-contact-alt { margin-top: 0.9rem; max-width: 52ch; font-size: 0.92rem; line-height: 1.5; color: color-mix(in oklch, #fff 80%, var(--color-primary-200)); }
.xp-contact-alt-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.xp-contact-alt-btn:hover { color: var(--color-accent-300); }
.xp-contact-alt-btn:focus-visible { outline: 3px solid var(--color-accent-300); outline-offset: 2px; border-radius: 2px; }

@media (prefers-reduced-motion: reduce) {
  .xd .option-card { transition: none; }
}
