/* ==========================================================================
   searchit Preisrechner — reines CSS, kein Build.
   Brand-Tokens identisch zur Haupt-Website (sites/sales-presentation/css/styles.css),
   Quelle: ui-fat/src/sass/_variables.scss.
   ========================================================================== */

:root {
  --accent:        #338CFF;
  --accent-soft:   #DCEBFF;
  --grey:          #61686c;
  --grey-muted:    #868B8E;
  --bg:            #f5f5f5;
  --border:        #e9e9e9;
  --line:          #dbe3ea;
  --success:       #7CB945;
  --success-dark:  #5f8b3c;
  --warning:       #e8a43d;
  --dsgvo:         #A332FF;
  --ink:           #2b3033;
  --white:         #ffffff;

  --maxw: 1180px;
  --radius: 16px;
  --shadow: 0 18px 48px rgba(43, 48, 51, 0.12);
  --shadow-sm: 0 6px 18px rgba(43, 48, 51, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Source Sans Pro', 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 1.06rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Kopf ---------- */
.head { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.head__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
/* Wortmarke ohne Bean — freigestellt, deshalb traegt sie die volle Hoehe der
   Kopfzeile, ohne dass Weissraum sie klein aussehen laesst. */
.head__brand img { height: 44px; width: auto; display: block; }
.head__nav a { color: var(--grey); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.head__nav a:hover { color: var(--accent); }

/* ---------- Intro ---------- */
.intro { padding: 56px 0 28px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: 0.84rem;
  font-weight: 700; color: var(--accent); margin-bottom: 10px;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.14; letter-spacing: -0.5px; }
.lead { margin-top: 14px; max-width: 780px; color: var(--grey); font-size: 1.12rem; }

/* ---------- Rechner ---------- */
.rx-loading { padding: 40px 0; color: var(--grey-muted); }

.rx { margin: 28px 0 56px; }
/* Nur die beiden Spalten bilden das Raster. Die Anfrage steht darunter über die
   volle Breite — stünde sie in der rechten Spalte, wäre diese höher als das
   Fenster und könnte nicht mehr mitlaufen. */
.rx-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start;
}
.rx-form, .rx-out {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 26px 28px;
}
/* Die Kostenspalte läuft mit, solange links noch etwas einzustellen ist — sonst
   ändert man unten die Agent-Einstellungen, ohne die Preiswirkung zu sehen. */
.rx-out {
  position: sticky; top: 74px; align-self: start;
  /* Auf niedrigen Fenstern ist die Spalte höher als der Sichtbereich. Lieber
     innen scrollen als unten abschneiden — die Summen stehen sonst im Nichts. */
  max-height: calc(100vh - 90px); overflow-y: auto;
}
.rx-h {
  font-size: 0.86rem; text-transform: uppercase; letter-spacing: 1.6px;
  color: var(--grey-muted); font-weight: 700; margin-bottom: 18px;
}

.rx-field { margin-bottom: 20px; }
.rx-field:last-child { margin-bottom: 0; }
.rx-label { display: block; font-weight: 700; font-size: 0.98rem; }
.rx-hint { font-size: 0.85rem; color: var(--grey-muted); margin: 2px 0 8px; }

.rx-num input {
  width: 100%; font: inherit; font-weight: 600;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfd; color: var(--ink);
}
.rx-num input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.rx-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.rx-opt {
  display: flex; flex-direction: column; gap: 2px; cursor: pointer;
  padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfd; transition: border-color .15s ease, background .15s ease;
}
.rx-opt:hover { border-color: var(--accent); }
.rx-opt.is-on { border-color: var(--accent); border-width: 2px; padding: 9px 10px; background: var(--accent-soft); }
.rx-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rx-opt__t { font-weight: 700; font-size: 0.92rem; }
.rx-opt__s { font-size: 0.79rem; color: var(--grey-muted); line-height: 1.35; }
/* Zweite Unterzeile der Stufenauswahl: Modell und Preis je 1.000 Objekte. Etwas
   dunkler als die Beschreibung darueber, weil hier die Zahl steht, die die Stufen
   unterscheidet — tabellarische Ziffern, damit die drei Karten untereinander
   vergleichbar bleiben. */
.rx-opt__m { margin-top: 2px; color: var(--grey); font-variant-numeric: tabular-nums; }

.rx-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.rx-switch input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Ergebnis ---------- */
.rx-block { border-top: 1px solid var(--border); padding: 14px 0; }
.rx-block:first-of-type { border-top: 0; padding-top: 0; }
.rx-block__h {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.4px;
  font-weight: 700; color: var(--accent); margin-bottom: 8px;
}
.rx-row { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-size: 0.97rem; }
.rx-row__l { color: var(--grey); }
.rx-row__v { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.rx-row.is-sum { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 8px; font-weight: 700; }
.rx-row.is-sum .rx-row__l { color: var(--ink); }
.rx-row.is-free .rx-row__v { color: var(--success-dark); font-weight: 800; }

.rx-big {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 18px; padding: 16px 18px;
  background: var(--ink); border-radius: 12px; color: var(--white);
}
.rx-big__item { display: flex; flex-direction: column; gap: 2px; }
.rx-big__l { font-size: 0.79rem; text-transform: uppercase; letter-spacing: 1.2px; color: #a9b6c2; }
.rx-big__v { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.rx-warn {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: #fdf4e6; color: #8a5d12; font-size: 0.88rem;
  border: 1px solid #f0dcb8;
}

.rx-note { margin-top: 14px; font-size: 0.83rem; color: var(--grey-muted); line-height: 1.5; }
.rx-note__claim { font-weight: 700; color: var(--grey); margin-bottom: 3px; }

.rx-cta { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.rx-btn {
  display: inline-block; text-align: center; text-decoration: none;
  background: var(--accent); color: var(--white); font-weight: 700;
  padding: 13px 22px; border-radius: 999px; box-shadow: var(--shadow-sm);
  transition: transform .15s ease, background .15s ease;
}
.rx-btn:hover { background: #1f6fe0; transform: translateY(-2px); }
.rx-cta__note { font-size: 0.83rem; color: var(--grey-muted); text-align: center; }

/* ---------- Erklärung ---------- */
.explain { padding-bottom: 56px; }
.explain h2 { font-size: 1.5rem; margin-bottom: 18px; }
.explain__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.explain__grid h3 { font-size: 1.03rem; margin-bottom: 5px; }
.explain__grid p { color: var(--grey); font-size: 0.97rem; }

/* ---------- Fuß ---------- */
.foot { background: var(--white); border-top: 1px solid var(--border); padding: 22px 0; }
.foot p { font-size: 0.86rem; color: var(--grey-muted); }

/* ---------- Sprachumschalter (identisch zur Haupt-Website) ---------- */
.lang-switch { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: flex; gap: 6px; }
.lang-switch__btn {
  display: flex; align-items: center; gap: 5px; cursor: pointer;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 11px; font: inherit; font-size: 0.8rem; font-weight: 700;
  color: var(--grey); box-shadow: var(--shadow-sm);
}
.lang-switch__btn.is-active { border-color: var(--accent); color: var(--accent); }
.lang-switch__flag svg { width: 18px; height: 12px; display: block; border-radius: 2px; }

@media (max-width: 880px) {
  .rx-cols { grid-template-columns: 1fr; }
  .rx-out { position: static; max-height: none; overflow: visible; }
  .explain__grid { grid-template-columns: 1fr; }
  .rx-opts { grid-template-columns: 1fr; }
  .rx-big { grid-template-columns: 1fr; }
}

.rx-echo { margin-top: 5px; font-size: 0.85rem; color: var(--grey-muted); font-variant-numeric: tabular-nums; }

.rx-select select {
  width: 100%; font: inherit; font-weight: 600;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfd; color: var(--ink); appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2361686c' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
  padding-right: 34px;
}
.rx-select select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.rx-sublabel { display: block; margin-top: 12px; margin-bottom: 5px; font-size: 0.85rem; font-weight: 600; color: var(--grey); }

/* --- Abschnitte im Formular ------------------------------------------------
   Stufe 1 ist Pflicht, Stufe 3 und der Agent sind es nicht. Der Unterschied muss
   sichtbar sein, sonst liest man die Summe als Fixpreis. */
.rx-group { margin: 0 0 26px; }
.rx-group__h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 4px; }
.rx-group__t { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.rx-group__badge {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: #338CFF; border: 1px solid rgba(51, 140, 255, 0.45);
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
.rx-group__s { margin: 0 0 14px; font-size: 0.85rem; line-height: 1.45; opacity: 0.7; }
.rx-group--opt {
  border-left: 3px solid rgba(51, 140, 255, 0.3);
  background: rgba(51, 140, 255, 0.04);
  border-radius: 0 10px 10px 0;
  padding: 16px 18px 4px;
  margin-top: 30px;
}
.rx-group--opt > .rx-switch { margin-bottom: 6px; }

/* Nebenzeile unter den grossen Zahlen: Vergleichsgroessen, keine Schlagzahl. */
.rx-side { margin: 10px 0 0; font-size: 0.85rem; opacity: 0.68; }

/* Zeile, die bewusst NICHT in die Summe eingeht (Verbrauchsabrechnung). */
.rx-row.is-open .rx-row__v { font-style: italic; opacity: 0.85; }

/* Annahme direkt unter der Zeile, die sie erzeugt. */
.rx-block__note {
  margin: 2px 0 10px; font-size: 0.78rem; line-height: 1.4; opacity: 0.62;
}

/* --- Anfrage per E-Mail --------------------------------------------------- */
.rx-anfrage {
  max-width: 720px; margin-top: 26px; padding: 20px 20px 16px;
  border: 1px solid rgba(51, 140, 255, 0.35);
  border-radius: 12px; background: rgba(51, 140, 255, 0.05);
}
.rx-anfrage__h { margin: 0 0 4px; font-size: 1.05rem; font-weight: 700; }
.rx-anfrage__s { margin: 0 0 14px; font-size: 0.85rem; line-height: 1.45; opacity: 0.75; }
.rx-anfrage__grid {
  display: grid; gap: 10px; margin-bottom: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.rx-field2 { display: flex; flex-direction: column; gap: 4px; }
.rx-field2__l { font-size: 0.78rem; font-weight: 600; opacity: 0.8; }
.rx-field2 input {
  font: inherit; padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.18); background: #fff; color: inherit;
}
.rx-field2 input:focus-visible { outline: 2px solid #338CFF; outline-offset: 1px; }
.rx-anfrage__err { margin: 0 0 10px; font-size: 0.85rem; color: #b3261e; font-weight: 600; }
.rx-anfrage button.rx-btn { border: 0; cursor: pointer; font: inherit; }
