/* @intertours/design 1.3.1 – Bausteine
   Benötigt tokens.css (+ fonts.css). Alle Klassen tragen das Präfix .it-, damit bestehende Tool-Styles unberührt bleiben.
   Herkunft der Maße: intertours.de (siehe tokens/tokens.json). */

/* ---------- Grundlagen ---------- */
.it-root {
  margin: 0;
  font-family: var(--it-font);
  font-weight: var(--it-weight-light);
  font-size: var(--it-text-body);
  line-height: 1.5;
  color: var(--it-fg);
  background: var(--it-bg);
  -webkit-font-smoothing: antialiased;
}
.it-root :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
:where(.it-btn, .it-input, .it-select, .it-textarea, .it-header a, .it-footer a, .it-stepper a):focus-visible {
  outline: 2px solid var(--it-focus);
  outline-offset: 2px;
}
.it-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.it-skip-link { position: absolute; left: var(--it-space-4); top: -100px; z-index: calc(var(--it-z-header) + 1);
  background: var(--it-turquoise); color: var(--it-blue); padding: var(--it-space-2) var(--it-space-4); border-radius: var(--it-radius); font-weight: var(--it-weight-medium); }
.it-skip-link:focus { top: var(--it-space-4); }

/* ---------- Container ---------- */
.it-page { padding-inline: var(--it-inset); }
.it-container { width: 100%; }
.it-container--medium { max-width: var(--it-container-medium); }
.it-container--small { max-width: var(--it-container-small); }
.it-section { padding-block: var(--it-section-medium); }
.it-section--small { padding-block: var(--it-section-small); }
.it-section--large { padding-block: var(--it-section-large); }

/* ---------- Logo ----------
   Die SVG-Datei hat keinen transparenten Rand: Höhe der CSS-Box = sichtbare Höhe.
   Site-Kopf 56px (≤767px: 32px), Werkzeugkopf 32px – gemessen an .navbar_logo auf intertours.de. */
.it-logo { display: block; height: var(--it-logo-site); width: auto; aspect-ratio: 125 / 56; flex: none; }
.it-logo--app { height: var(--it-logo-app); }
.it-logo-link { display: inline-flex; flex: none; border-radius: 2px; }

/* ---------- Kopfzeile ----------
   .it-header--site: erklärende Landingpage-Navigation (wie intertours.de)
   .it-header--app : kompakte Werkzeugnavigation für Arbeitsansichten */
.it-header { position: relative; z-index: var(--it-z-header); padding-inline: var(--it-inset); background: var(--it-bg); color: var(--it-fg); }
.it-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--it-space-5);
  padding-block: var(--it-header-pad); }
.it-header--app { border-bottom: 1px solid var(--it-border); }
.it-header--app .it-header__inner { padding-block: var(--it-space-4); gap: var(--it-space-4); }
.it-header__brand { display: flex; align-items: center; gap: var(--it-space-4); min-width: 0; }
.it-header__nav { display: flex; align-items: center; gap: var(--it-space-5); flex-wrap: wrap; justify-content: flex-end; }
.it-header__nav a:not(.it-btn) { color: inherit; text-decoration: none; font-weight: var(--it-weight-light); }
.it-header__nav a:not(.it-btn):hover { color: var(--it-link); }
.it-header__actions { display: flex; align-items: center; gap: var(--it-space-3); flex: none; }
/* Tool-Kontext: zurückhaltender Name des Werkzeugs neben dem Logo */
.it-tool-context { display: flex; flex-direction: column; min-width: 0; padding-left: var(--it-space-4); border-left: 1px solid var(--it-border); line-height: 1.25; }
.it-tool-context__name { font-weight: var(--it-weight-medium); font-size: var(--it-text-small); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it-tool-context__role { font-size: var(--it-text-tiny); color: var(--it-fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 767px) {
  .it-header__nav { display: none; }
  .it-header__nav[data-open="true"] { display: flex; flex-direction: column; align-items: flex-start; position: absolute; inset: 100% 0 auto; padding: var(--it-space-5) var(--it-gutter); background: var(--it-bg); border-bottom: 1px solid var(--it-border); }
  .it-tool-context__role { display: none; }
}

/* ---------- Typografie ---------- */
.it-h1, .it-h2, .it-h3, .it-h4 { font-family: var(--it-font); font-weight: var(--it-weight-thin); margin: 0; letter-spacing: 0; }
.it-h1 { font-size: var(--it-h1); line-height: 1.2; }
.it-h2 { font-size: var(--it-h2); line-height: 1.2; }
.it-h3 { font-size: var(--it-h3); line-height: 1.2; }
.it-h4 { font-size: var(--it-h4); line-height: 1.25; }
.it-h5 { font-size: var(--it-h5); line-height: 1.5; font-weight: var(--it-weight-light); margin: 0; }
.it-h6 { font-size: var(--it-h6); line-height: 1.4; font-weight: var(--it-weight-light); margin: 0; }
/* UI-Überschrift in Arbeitsansichten: Medium statt Bold */
.it-ui-title { font-size: var(--it-text-large); font-weight: var(--it-weight-medium); line-height: 1.3; margin: 0; }
.it-lead { font-size: var(--it-text-large); color: var(--it-fg-muted); }
.it-muted { color: var(--it-fg-muted); }
.it-small { font-size: var(--it-text-small); }
.it-strong { font-weight: var(--it-weight-medium); }
.it-link { color: var(--it-link); text-decoration: underline; text-underline-offset: 2px; }

/* Seitentitel-Block */
.it-page-title { display: grid; gap: var(--it-space-4); margin-bottom: var(--it-space-7); }
.it-page-title__lead { max-width: 42rem; font-size: var(--it-text-medium); color: var(--it-fg-muted); margin: 0; }
/* Tagline (intertours.de .text-style-tagline) */
.it-tag { display: inline-block; padding: var(--it-space-1) var(--it-space-4); border-radius: var(--it-radius);
  background: var(--it-tag-bg); color: var(--it-tag-fg); font-weight: var(--it-weight-medium); font-size: var(--it-text-small); line-height: 1.5; }

/* ---------- Buttons ---------- */
.it-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--it-space-3);
  min-height: 2.75rem; padding: 1rem 2rem; border: 1px solid var(--it-turquoise); border-radius: var(--it-radius);
  background: var(--it-turquoise); color: var(--it-blue); font: inherit; font-weight: var(--it-weight-medium); line-height: 1;
  text-decoration: none; text-align: center; cursor: pointer; transition: background-color var(--it-duration), border-color var(--it-duration), color var(--it-duration); }
.it-btn:hover { background: var(--it-turquoise-hover); border-color: var(--it-turquoise-hover); }
.it-btn--large { padding: 1.25rem 2rem; }
.it-btn--small { min-height: 2.25rem; padding: 0.5rem 1.25rem; }
.it-btn--secondary { background: transparent; color: var(--it-fg); border-color: var(--it-border-strong); }
.it-btn--secondary:hover { background: var(--it-tag-bg); border-color: var(--it-border-strong); }
[data-it-theme="dark"] .it-btn--secondary, .it-btn--secondary[data-it-theme="dark"] { background: rgba(247, 246, 242, 0.2); border-color: rgba(247, 246, 242, 0.2); color: var(--it-white); }
[data-it-theme="dark"] .it-btn--secondary:hover { background: rgba(247, 246, 242, 0.1); }
.it-btn--ghost { background: transparent; border-color: transparent; color: var(--it-fg); padding-inline: var(--it-space-2); }
.it-btn--ghost:hover { background: var(--it-tag-bg); border-color: transparent; }
.it-btn--danger { background: transparent; border-color: var(--it-red); color: var(--it-fg); }
.it-btn:disabled, .it-btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.it-btn__icon { width: 1.125rem; height: 1.125rem; flex: none; }
.it-btn-row { display: flex; flex-wrap: wrap; gap: var(--it-space-4); align-items: center; }

/* ---------- Formulare (.form_input: eckig, 1px, weiß) ---------- */
.it-field { display: grid; gap: var(--it-space-2); }
.it-label { font-weight: var(--it-weight-medium); font-size: var(--it-text-small); }
.it-help { font-size: var(--it-text-small); color: var(--it-fg-muted); }
.it-error-text { font-size: var(--it-text-small); color: var(--it-fg); display: flex; gap: var(--it-space-2); align-items: baseline; }
.it-error-text::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; background: var(--it-red); transform: translateY(-1px); }
.it-input, .it-select, .it-textarea { width: 100%; min-height: 2.75rem; padding: 0.5rem 0.75rem; border: 1px solid var(--it-blue); border-radius: var(--it-radius-none);
  background: var(--it-pure-white); color: var(--it-blue); font: inherit; font-weight: var(--it-weight-regular); line-height: 1.6; }
.it-textarea { min-height: 8rem; }
.it-input::placeholder, .it-textarea::placeholder { color: rgba(0, 0, 0, 0.6); }
.it-input[aria-invalid="true"], .it-select[aria-invalid="true"], .it-textarea[aria-invalid="true"] { border-color: var(--it-red); box-shadow: inset 3px 0 0 var(--it-red); }
[data-it-theme="dark"] :is(.it-input, .it-select, .it-textarea) { background: transparent; border-color: var(--it-white); color: var(--it-white); }

/* ---------- Karten und Hinweise ---------- */
.it-card { background: var(--it-surface); border: 1px solid var(--it-border); border-radius: var(--it-radius); padding: var(--it-space-6); }
.it-card--flat { border-radius: var(--it-radius-none); }
.it-card__title { margin: 0 0 var(--it-space-2); font-size: var(--it-text-large); font-weight: var(--it-weight-medium); line-height: 1.3; }
.it-callout { display: flex; gap: var(--it-space-3); padding: var(--it-space-4) var(--it-space-5); border-left: 3px solid var(--it-turquoise); background: var(--it-tag-bg); color: var(--it-fg); }
.it-callout--warning { border-left-color: var(--it-amber); background: rgba(232, 173, 41, 0.12); }
.it-callout--error { border-left-color: var(--it-red); background: rgba(232, 64, 70, 0.08); }
.it-callout--success { border-left-color: var(--it-green); background: rgba(24, 173, 58, 0.08); }
.it-status { display: inline-flex; align-items: center; gap: var(--it-space-2); font-size: var(--it-text-small); font-weight: var(--it-weight-medium); }
.it-status::before { content: ""; width: 0.5rem; height: 0.5rem; background: var(--it-fg-subtle); }
.it-status--ok::before { background: var(--it-green); }
.it-status--warn::before { background: var(--it-amber); }
.it-status--error::before { background: var(--it-red); }
.it-status--info::before { background: var(--it-turquoise); }

/* ---------- Tabelle ---------- */
.it-table-wrap { overflow-x: auto; border: 1px solid var(--it-border); border-radius: var(--it-radius); background: var(--it-surface); }
.it-table { width: 100%; border-collapse: collapse; font-size: var(--it-text-small); }
.it-table th { text-align: left; font-weight: var(--it-weight-medium); padding: var(--it-space-3) var(--it-space-4); border-bottom: 1px solid var(--it-border-strong); white-space: nowrap; }
.it-table td { padding: var(--it-space-3) var(--it-space-4); border-bottom: 1px solid var(--it-border); vertical-align: top; }
.it-table tr:last-child td { border-bottom: 0; }
.it-table .it-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Stepper ---------- */
.it-stepper { display: flex; gap: var(--it-space-2); list-style: none; margin: 0; padding: 0; counter-reset: it-step; overflow-x: auto; }
.it-stepper__item { counter-increment: it-step; flex: 1 1 0; min-width: 7rem; padding-top: var(--it-space-3); border-top: 2px solid var(--it-border); font-size: var(--it-text-small); color: var(--it-fg-muted); }
.it-stepper__item::before { content: counter(it-step, decimal-leading-zero); display: block; font-weight: var(--it-weight-medium); }
.it-stepper__item[aria-current="step"] { border-top-color: var(--it-turquoise); color: var(--it-fg); font-weight: var(--it-weight-medium); }
.it-stepper__item[data-done="true"] { border-top-color: var(--it-fg); color: var(--it-fg); }

/* ---------- Dialog und Toast ---------- */
.it-dialog { border: 1px solid var(--it-border); border-radius: var(--it-radius); padding: 0; max-width: min(36rem, calc(100vw - 2rem)); background: var(--it-surface); color: var(--it-fg); box-shadow: var(--it-shadow-overlay); }
.it-dialog::backdrop { background: rgba(10, 31, 47, 0.6); }
.it-dialog__body { padding: var(--it-space-6); display: grid; gap: var(--it-space-4); }
.it-dialog__actions { display: flex; justify-content: flex-end; gap: var(--it-space-3); padding: var(--it-space-4) var(--it-space-6); border-top: 1px solid var(--it-border); flex-wrap: wrap; }
.it-toast { position: fixed; z-index: var(--it-z-toast); right: var(--it-space-5); bottom: var(--it-space-5); max-width: min(24rem, calc(100vw - 2.5rem));
  padding: var(--it-space-4) var(--it-space-5); background: var(--it-blue); color: var(--it-white); border-left: 3px solid var(--it-turquoise); border-radius: var(--it-radius); box-shadow: var(--it-shadow-overlay); }

/* ---------- Zustände ---------- */
.it-state { display: grid; justify-items: start; gap: var(--it-space-3); padding: var(--it-space-7) var(--it-space-6); border: 1px dashed var(--it-border); border-radius: var(--it-radius); color: var(--it-fg-muted); }
.it-state__title { color: var(--it-fg); font-weight: var(--it-weight-medium); font-size: var(--it-text-medium); margin: 0; }
.it-spinner { width: 1.25rem; height: 1.25rem; border: 2px solid var(--it-border); border-top-color: var(--it-turquoise); border-radius: 50%; animation: it-spin 0.8s linear infinite; }
@keyframes it-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .it-spinner { animation-duration: 2.4s; } .it-btn { transition: none; } }

/* ---------- Nächster Schritt (Journey) ---------- */
.it-next-step { display: grid; gap: var(--it-space-4); padding: var(--it-space-6); border-top: 2px solid var(--it-turquoise); background: var(--it-surface); }
.it-next-step__label { font-size: var(--it-text-tiny); font-weight: var(--it-weight-medium); text-transform: uppercase; letter-spacing: 0.08em; color: var(--it-fg-muted); margin: 0; }
.it-next-step__title { margin: 0; font-size: var(--it-h4); font-weight: var(--it-weight-thin); line-height: 1.25; }

/* ---------- Footer (1.3.0) ----------
   Einheitlicher Werkzeug-Footer nach dem unteren Footer-Raster von intertours.de (.footer_bottom):
   4 Spalten, Abstand 2.25rem – Karte „Werkzeug“ (Weiß 5 %), Karte „Kontakt“ (Türkis 40 %, 2 Spalten), Spalte „Rechtliches“.
   Darunter eine Zeile mit Copyright und werkzeugspezifischem Hinweis. Inhalte kommen aus legal/tools/<werkzeug>.json. */
.it-footer { background: var(--it-blue); color: var(--it-white); padding: var(--it-section-small) var(--it-inset) var(--it-space-6); font-size: var(--it-text-small); line-height: 1.6; }
/* Links mit erhöhter Spezifität (0,2,1): Tool-Styles wie `body.site a` dürfen den Footer nicht umfärben */
.it-footer .it-footer__card a, .it-footer .it-footer__links a, .it-footer .it-footer__meta a { color: var(--it-white); text-decoration: none; font-weight: inherit; transition: opacity var(--it-duration); }
.it-footer .it-footer__card a:hover, .it-footer .it-footer__links a:hover, .it-footer .it-footer__meta a:hover { color: var(--it-white); opacity: 0.75; text-decoration: underline; text-underline-offset: 3px; }
.it-footer .it-footer__links a { font-weight: var(--it-weight-medium); }
.it-footer .it-footer__card .it-footer__big { font-weight: var(--it-weight-medium); }
.it-footer :focus-visible { outline: 2px solid var(--it-turquoise); outline-offset: 2px; }
.it-footer__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.25rem; align-items: stretch; }
.it-footer__card { border-radius: var(--it-radius); padding: var(--it-space-6); display: flex; flex-direction: column; gap: var(--it-space-4); }
.it-footer__card--tool { background: rgba(247, 246, 242, 0.05); }
.it-footer__card--contact { grid-column: span 2; background: rgba(0, 201, 217, 0.4); justify-content: space-between; padding: var(--it-space-5) var(--it-space-6) var(--it-space-6); }
.it-footer__logo { width: var(--it-logo-footer); height: auto; display: block; }
.it-footer__title { margin: 0; font-size: var(--it-h4); font-weight: var(--it-weight-medium); line-height: 1.25; color: var(--it-white); }
.it-footer__headline { margin: 0 0 var(--it-space-3); font-size: var(--it-h4); font-weight: var(--it-weight-medium); line-height: 1.25; color: var(--it-turquoise); }
.it-footer__text { margin: 0; color: var(--it-white); font-size: var(--it-text-body); font-weight: var(--it-weight-light); }
.it-footer__address { font-style: normal; font-size: var(--it-text-body); }
.it-footer__big { display: block; font-size: var(--it-text-large); font-weight: var(--it-weight-medium); }
.it-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--it-space-3); font-size: var(--it-text-body); font-weight: var(--it-weight-medium); }
.it-footer__meta { margin-top: var(--it-space-7); padding-top: var(--it-space-4); border-top: 1px solid rgba(215, 215, 213, 0.2); display: flex; flex-wrap: wrap; gap: var(--it-space-2) var(--it-space-6); justify-content: space-between; color: var(--it-grey); font-size: var(--it-text-small); }
.it-footer__meta p { margin: 0; max-width: 60rem; }
.it-footer .it-brand__tag { font-size: var(--it-text-small); padding: 0.125rem 0.75rem; align-self: flex-start; }
@media (max-width: 991px) {
  .it-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .it-footer__card--contact { grid-column: span 1; }
}
@media (max-width: 767px) {
  .it-footer__grid { grid-template-columns: minmax(0, 1fr); gap: var(--it-space-4); }
  .it-footer__card, .it-footer__card--contact { padding: var(--it-space-5); }
  .it-footer__meta { margin-top: var(--it-space-6); }
}

/* Rechtsseiten (generiert aus legal/): ruhiger Lesesatz, 48rem Lesebreite */
.it-legal { padding: var(--it-section-small) var(--it-inset) var(--it-section-medium); background: var(--it-white); color: var(--it-blue); }
.it-legal__inner { max-width: var(--it-container-small); }
.it-legal h1 { font-size: var(--it-h2); font-weight: var(--it-weight-thin); line-height: 1.2; margin: 0 0 var(--it-space-6); }
.it-legal h2 { font-size: var(--it-h4); font-weight: var(--it-weight-thin); line-height: 1.25; margin: var(--it-space-7) 0 var(--it-space-3); }
.it-legal h3 { font-size: var(--it-text-large); font-weight: var(--it-weight-medium); margin: var(--it-space-6) 0 var(--it-space-2); }
.it-legal p, .it-legal li { line-height: 1.6; }
.it-legal a { color: var(--it-blue); text-decoration: underline; text-underline-offset: 2px; }
.it-legal__nav { display: flex; flex-wrap: wrap; gap: var(--it-space-2); margin: 0 0 var(--it-space-6); padding: 0; list-style: none; }
.it-legal__nav a { display: inline-block; padding: var(--it-space-1) var(--it-space-4); border-radius: var(--it-radius); background: rgba(0, 201, 217, 0.1); text-decoration: none; font-weight: var(--it-weight-medium); font-size: var(--it-text-small); }
.it-legal__nav a[aria-current="page"] { background: var(--it-blue); color: var(--it-white); }
.it-legal__stand { color: var(--it-neutral-dark); font-size: var(--it-text-small); }
.it-legal__open { border-left: 3px solid var(--it-amber); background: rgba(232, 173, 41, 0.12); padding: var(--it-space-3) var(--it-space-4); }

/* ---------- Werkzeug-Kennung (1.2.0) ----------
   Jede Seite trägt dieselbe Kennung: Intertours-Logo + Werkzeugname als Tag (Tagline-Baustein von intertours.de)
   rechts daneben, vertikal mittig, 1.5rem Abstand. Steht im Kopf – auf Landing-, Arbeits- und Rechtsseiten.
   Schmale Seitenleisten (< 320 px): .it-brand--stacked setzt den Tag direkt unter das Logo.
   Farben: Standard für dunkle Flächen (Türkis-Text auf Weiß 5 %), .it-brand__tag--on-light für helle Köpfe. */
.it-brand { display: flex; align-items: center; gap: var(--it-space-5); min-width: 0; }
/* Link um das Logo nicht als Textzeile ausrichten (sonst sitzt der Tag 4 px aus der Mitte) */
.it-brand > a { display: inline-flex; flex: none; }
.it-brand--stacked { flex-direction: column; align-items: flex-start; gap: var(--it-space-2); }
.it-brand__tag { display: inline-block; flex: none; max-width: 100%; padding: var(--it-space-1) var(--it-space-4); border-radius: var(--it-radius);
  background: rgba(247, 246, 242, 0.05); color: var(--it-turquoise); font-family: var(--it-font); font-weight: var(--it-weight-medium);
  font-size: var(--it-text-body); line-height: 1.5; white-space: nowrap; text-decoration: none; letter-spacing: 0; text-transform: none; }
.it-brand__tag--on-light, [data-it-theme="light"] .it-brand__tag { background: rgba(0, 201, 217, 0.1); color: var(--it-blue); }
/* Neben dem 32-px-Logo (Werkzeugkopf, Mobil) kleiner */
.it-brand--app .it-brand__tag, .it-brand--stacked .it-brand__tag { font-size: var(--it-text-small); padding: 0.125rem 0.75rem; }
.it-brand--app { gap: var(--it-space-4); }
@media (max-width: 767px) {
  .it-brand { gap: var(--it-space-3); }
  .it-brand__tag { font-size: var(--it-text-small); padding: 0.125rem 0.75rem; }
}
