/* Offerte wizard (/offerte DE/EN/FR/IT). Uses the site's tokens (Inter, --title-color, --theme-color,
   --smoke-color, --border-color) and buttons (.global-btn). Loaded on the Offerte pages only. */

.offerte { padding-top: 60px; padding-bottom: 80px; max-width: 1040px; scroll-margin-top: 40px; } /* keeps the progress bar clear of the fixed header after a step change */
.offerte .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.offerte [hidden] { display: none !important; }

/* The theme hides native checkboxes/radios with display:none. Inside the wizard they stay focusable
   (keyboard, screen readers) but invisible; the pill/tile shows the state. */
.offerte .of-pill input, .offerte .of-tile__input {
  display: block; visibility: visible; position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}

/* ---------- progress */
.of-progress { display: flex; gap: 8px; list-style: none; margin: 0 0 40px; padding: 0; counter-reset: none; }
.of-progress__item { flex: 1 1 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding-top: 12px; border-top: 3px solid var(--border-color); color: var(--body-color); }
.of-progress__num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--border-color); font-size: 13px; font-weight: 600; color: var(--body-color); background: var(--white-color); }
.of-progress__label { font-size: 14px; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.of-progress__item.is-done { border-top-color: var(--theme-color); }
.of-progress__item.is-done .of-progress__num { background: var(--theme-color); border-color: var(--theme-color); color: transparent; position: relative; }
.of-progress__item.is-done .of-progress__num::after { content: ""; position: absolute; width: 10px; height: 6px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.of-progress__item.is-current { border-top-color: var(--title-color); color: var(--title-color); }
.of-progress__item.is-current .of-progress__num { background: var(--title-color); border-color: var(--title-color); color: var(--white-color); }
.of-progress__item.is-current .of-progress__label { font-weight: 700; }
.of-progress__item[data-step="danke"] .of-progress__num { border-style: dashed; }

/* ---------- steps */
.of-js .of-step { display: none; }
.of-js .of-step.is-current { display: block; }
.of-step + .of-step { margin-top: 48px; }
.of-js .of-step + .of-step { margin-top: 0; }
.of-h2 { font-size: 32px; line-height: 1.25; margin: 0 0 12px; outline: none; }
.of-h3 { font-size: 20px; margin: 28px 0 14px; }
.of-h4 { font-size: 17px; font-weight: 700; margin: 0 0 12px; color: var(--title-color); padding: 0; }
.of-lead { color: var(--body-color); font-size: 16px; line-height: 1.7; margin: 0 0 8px; max-width: 720px; }
.of-note { background: var(--smoke-color); border-radius: 12px; padding: 14px 18px; color: var(--title-color); font-size: 15px; line-height: 1.6; margin: 0 0 18px; }

/* ---------- tiles */
.of-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .of-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1200px) { .of-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.of-tiles--type { grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 576px) { .of-tiles--type { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .of-tiles--type { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; } }

.of-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; min-height: 112px;
  padding: 18px 16px; margin: 0; text-align: left; cursor: pointer; background: var(--white-color);
  border: 1.5px solid var(--border-color); border-radius: 14px; color: var(--title-color); font: inherit;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.of-tile:hover { border-color: var(--theme-color); }
.of-tile__icon { font-size: 28px; color: var(--theme-color); line-height: 1; }
.of-tile__title { font-weight: 600; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; hyphens: auto; }
.of-tile__sub { font-size: 14px; color: var(--body-color); line-height: 1.5; }
.of-tile--type { min-height: 150px; padding: 24px 22px; }
.of-tile--type .of-tile__icon { font-size: 34px; }
.of-tile--type .of-tile__title { font-size: 19px; font-weight: 700; }
.of-tile__check { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; color: transparent; border: 1.5px solid var(--border-color); background: var(--white-color); }
.of-tile.is-selected, .of-tile--type[aria-pressed="true"] { border: 2px solid var(--title-color); box-shadow: 0 6px 18px rgba(0, 0, 0, .06); }
.of-tile.is-selected .of-tile__icon, .of-tile--type[aria-pressed="true"] .of-tile__icon { color: var(--title-color); }
.of-tile.is-selected .of-tile__check { background: var(--title-color); border-color: var(--title-color); color: var(--white-color); }
.of-tile:focus-visible, .of-tile:focus-within:has(input:focus-visible) { outline: 3px solid var(--title-color); outline-offset: 3px; }
@supports not selector(:has(*)) { .of-tile:focus-within { outline: 3px solid var(--title-color); outline-offset: 3px; } }

/* ---------- form fields */
.of-grid { display: grid; grid-template-columns: 1fr; gap: 6px 24px; }
@media (min-width: 768px) {
  .of-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .of-wide, .of-grid > .of-field--radio, .of-grid > .of-field--checks, .of-grid > .of-field--textarea,
  .of-grid > .of-cond:has(.of-field--radio), .of-grid > .of-cell:has(.of-field--radio), .of-grid > .of-cell:has(.of-field--checks) { grid-column: 1 / -1; }
}
.of-field { margin-bottom: 14px; min-width: 0; }
.of-label { display: block; font-weight: 600; font-size: 15px; color: var(--title-color); margin: 0 0 8px; padding: 0; line-height: 1.4; }
.of-req { color: var(--theme-color); }
.offerte .of-input { width: 100%; margin-bottom: 0; min-height: 52px; font-size: 16px; }
.offerte textarea.of-input { min-height: 120px; }
.of-hint { font-size: 14px; color: var(--body-color); margin: 6px 0 0; line-height: 1.5; }
.of-error { font-size: 14px; color: #b42318; margin: 6px 0 0; font-weight: 500; }
.has-error .of-input { border-color: #b42318 !important; }
.has-error .of-pill span { border-color: #e5a7a1; }
.offerte .of-input:focus-visible { outline: 2px solid var(--title-color); outline-offset: 2px; }

fieldset.of-choice, .of-areas, .of-person { border: 0; margin: 0; padding: 0; min-width: 0; }
.of-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.of-pill { position: relative; margin: 0; cursor: pointer; }
.of-pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 16px; border: 1.5px solid var(--border-color); border-radius: 10px; background: var(--white-color); color: var(--title-color); font-size: 15px; line-height: 1.3; transition: border-color .2s ease, background-color .2s ease; }
.of-pill:hover span { border-color: var(--theme-color); }
.of-pill input:checked + span { background: var(--title-color); border-color: var(--title-color); color: var(--white-color); }
.of-pill input:focus-visible + span { outline: 3px solid var(--title-color); outline-offset: 2px; }

.of-block { padding: 24px; margin-bottom: 20px; border: 1px solid var(--border-color); border-radius: 16px; background: var(--white-color); }
.of-block > .of-h3:first-child { margin-top: 0; }
.of-person { margin-top: 10px; padding: 18px 18px 6px; border-radius: 12px; background: var(--smoke-color); }
.of-person + .of-person { margin-top: 12px; }
.of-person legend { float: left; width: 100%; }
.of-person legend + * { clear: both; }
.of-sub { padding-top: 6px; }
.of-sub + .of-sub, .of-sub + .of-grid { border-top: 1px solid var(--border-color); padding-top: 18px; margin-top: 6px; }

/* uploads */
.of-file { display: block; width: 100%; margin-top: 8px; padding: 14px; border: 1.5px dashed var(--border-color); border-radius: 12px; background: var(--smoke-color); font-size: 15px; cursor: pointer; }
.of-file:focus-visible { outline: 3px solid var(--title-color); outline-offset: 2px; }
.of-files { list-style: none; margin: 10px 0 0; padding: 0; }
.of-files li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-radius: 10px; background: var(--smoke-color); margin-top: 6px; font-size: 14px; overflow-wrap: anywhere; }
.of-file-remove { flex: none; border: 0; background: transparent; color: var(--title-color); text-decoration: underline; font-size: 14px; padding: 6px; min-height: 36px; cursor: pointer; }

/* consent */
.of-field--consent { margin-top: 8px; }
.of-field--consent label { font-size: 15px; line-height: 1.6; color: var(--title-color); }

/* honeypot: never visible, never reachable */
.of-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* summary */
.of-summary { margin: 0 0 24px; padding: 14px 18px; border-radius: 12px; background: #fdf1f0; color: #8c1d14; font-weight: 600; font-size: 15px; outline: none; }

/* ---------- navigation */
.of-nav { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.offerte .global-btn { min-height: 52px; }
.offerte .global-btn.is-disabled { opacity: .55; cursor: not-allowed; }
.offerte .global-btn:focus-visible { outline: 3px solid var(--title-color); outline-offset: 3px; }
.of-submit { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.of-below { margin: 0; font-size: 14px; color: var(--body-color); }
@media (max-width: 575px) {
  .of-nav { flex-direction: column-reverse; align-items: stretch; }
  .of-nav .global-btn { width: 100%; }
  .of-submit { align-items: stretch; text-align: center; }
  .of-h2 { font-size: 26px; }
  .of-block { padding: 18px 16px; }
  .of-tile { min-height: 104px; padding: 16px 14px; }
}

/* ---------- small screens: numbers only, current step label */
@media (max-width: 575px) {
  .of-progress { gap: 4px; margin-bottom: 28px; }
  .of-progress__label { display: none; }
  .of-progress__item.is-current .of-progress__label { display: block; font-size: 13px; white-space: nowrap; overflow-wrap: normal; }
  .of-progress__item:last-child .of-progress__label { align-self: flex-end; }
}

/* ---------- thank-you */
.offerte--danke { padding-top: 50px; }
.of-danke { max-width: 720px; }
.of-danke__icon { font-size: 48px; color: var(--title-color); }
.of-danke__text { font-size: 18px; line-height: 1.7; color: var(--title-color); margin: 12px 0 28px; }

@media (prefers-reduced-motion: reduce) {
  .of-tile, .of-pill span { transition: none; }
}

/* Banner intro on /offerte */
.of-hero-intro { color: var(--body-color); font-size: 17px; line-height: 1.75; margin: 20px 0 0; max-width: 560px; }
