@charset "UTF-8";
/*
 * Terrassenplaner (EXT:an_terrassenplaner), alle Klassen mit Präfix atp-.
 * Eingebunden per <f:asset.css> im Partial Planer/Form.html.
 * Farben wie im Theme (_variables.scss): --atp-white = $white, --atp-gray = $gray,
 * --atp-dark = $black-light, --atp-black = $black.
 */
.atp-planer {
  --atp-white: #fff;
  --atp-gray: #3f4e51;
  --atp-dark: #1c2022;
  --atp-border: var(--atp-gray);
  --atp-muted: #8a9294;
  --atp-error: #c0392b;
  /* aus der XD-Vorlage: dünner dunkler Rand, helles Feld */
  --atp-line: #707070;
  --atp-field-bg: #fcfcfc;
  --atp-black: #000;
  /* Auswahl (Kacheln Schritt 1/3, Pills Schritt 5): schwarzer Rand für mehr Kontrast */
  --atp-selected: var(--atp-black);
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px 80px;
}

/* Zurück-Link im TRIAS-Stil: Schrift wie .trias-btn, TRIAS-Pfeil nach links */
.atp-planer .atp-back {
  margin-bottom: 30px;
}
.atp-planer .atp-back-link {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  color: var(--atp-dark);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 2.25px;
  text-transform: uppercase;
  text-decoration: none;
}
.atp-planer .atp-back-arrow {
  display: block;
  width: 57px;
  height: auto;
  transform: scaleX(-1);
  transition: transform 0.2s ease-out;
}
.atp-planer .atp-back-link:hover,
.atp-planer .atp-back-link:focus-visible {
  color: var(--atp-dark);
  text-decoration: none;
}
.atp-planer .atp-back-link:hover .atp-back-arrow,
.atp-planer .atp-back-link:focus-visible .atp-back-arrow {
  transform: scaleX(-1) translateX(8px);
}
.atp-planer .atp-back-link:focus-visible {
  outline: 2px solid var(--atp-dark);
  outline-offset: 4px;
}

.atp-planer .atp-step {
  border-top: 1px solid var(--atp-border);
  padding-top: 40px;
  margin-top: 40px;
}
.atp-planer .atp-step-head {
  display: flex;
  align-items: flex-start;
  margin-bottom: 30px;
}
.atp-planer .atp-step-head .atp-step-number {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: 20px;
  background-color: var(--atp-gray);
  color: var(--atp-white);
  font-size: 22px;
  font-weight: 700;
}
.atp-planer .atp-step-head .atp-step-title {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.2;
}
.atp-planer .atp-step-head .atp-step-sub {
  margin: 0;
  font-size: 14px;
  color: var(--atp-muted);
}
/* Auswahlkacheln (Schritt 1 Terrassenform, Schritt 3 Terrassenbelag) */
.atp-planer .atp-tiles-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.atp-planer .atp-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.atp-planer .atp-tile {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
}
.atp-planer .atp-tile-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.atp-planer .atp-tile-box {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px 24px 12px;
  border: 1px solid var(--atp-line);
  border-radius: 4px;
  background-color: transparent;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.atp-planer .atp-tile-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2 / 1;
  overflow: hidden;
}
.atp-planer .atp-tile-media-image {
  border-radius: 2px;
}
.atp-planer .atp-tile-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.atp-planer .atp-tile-media-shape img {
  width: 85%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}
.atp-planer .atp-tile-label {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.3;
  text-align: center;
}
.atp-planer .atp-tile:hover .atp-tile-box {
  border-color: var(--atp-dark);
}
.atp-planer .atp-tile-input:checked + .atp-tile-box {
  border-color: var(--atp-selected);
  background-color: var(--atp-field-bg);
  box-shadow: 0 0 0 1px var(--atp-selected);
}
.atp-planer .atp-tile-input:focus-visible + .atp-tile-box {
  outline: 2px solid var(--atp-dark);
  outline-offset: 3px;
}
.atp-planer .atp-tiles-fieldset.is-invalid .atp-tile-box {
  border-color: var(--atp-error);
}

/* Regler + Zahlenfeld (Schritt 2 Terrassengröße, Schritt 4 Aufbauhöhe) */
.atp-planer .atp-range {
  display: flex;
  align-items: flex-start;
  gap: 30px;
}
.atp-planer .atp-range-slider {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 18px;
}
.atp-planer .atp-range-slider[hidden] {
  display: none;
}
.atp-planer .atp-range-input {
  --atp-fill: 50%;
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 4px;
  margin: 0;
  border-radius: 2px;
  background: linear-gradient(to right, var(--atp-dark) 0, var(--atp-dark) var(--atp-fill), #c9cdce var(--atp-fill), #c9cdce 100%);
  cursor: pointer;
}
.atp-planer .atp-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background-color: var(--atp-dark);
  transition: box-shadow 0.2s;
}
.atp-planer .atp-range-input::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background-color: var(--atp-dark);
  transition: box-shadow 0.2s;
}
.atp-planer .atp-range-input::-moz-range-track {
  background: transparent;
}
.atp-planer .atp-range-input:focus {
  outline: none;
}
.atp-planer .atp-range-input:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--atp-white), 0 0 0 6px var(--atp-dark);
}
.atp-planer .atp-range-input:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px var(--atp-white), 0 0 0 6px var(--atp-dark);
}
.atp-planer .atp-range-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  font-size: 13px;
  color: var(--atp-muted);
}
.atp-planer .atp-range-value {
  display: flex;
  flex: 0 0 150px;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  height: 64px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid var(--atp-line);
  border-radius: 4px;
  background-color: var(--atp-field-bg);
  cursor: text;
}
.atp-planer .atp-range-value:focus-within {
  border-color: var(--atp-dark);
  box-shadow: 0 0 0 1px var(--atp-dark);
}
.atp-planer .atp-range-number {
  width: 3.2ch;
  height: 62px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--atp-dark);
  font-size: 26px;
  font-weight: 500;
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
}
.atp-planer .atp-range-number::-webkit-outer-spin-button,
.atp-planer .atp-range-number::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.atp-planer .atp-range-number:focus {
  outline: none;
}
.atp-planer .atp-range-unit {
  font-size: 14px;
  color: var(--atp-muted);
}
.atp-planer .atp-range.is-invalid .atp-range-value {
  border-color: var(--atp-error);
}

.atp-planer .atp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Auswahl-Pills (Checkbox/Radio) */
.atp-planer .atp-choice-row {
  min-width: 0;
  margin: 0 0 30px;
  padding: 0;
  border: 0;
}
.atp-planer .atp-choice-row .atp-choice-legend {
  width: 100%;
  margin: 0;
  padding: 0 0 12px;
  font-size: 15px;
  line-height: 1.3;
}
.atp-planer .atp-choice-row .atp-choice-title {
  display: block;
  font-weight: 500;
}
.atp-planer .atp-choice-row .atp-choice-hint {
  display: block;
  font-size: 12px;
  color: var(--atp-muted);
}
.atp-planer .atp-choices {
  display: flex;
  margin: 0 -8px;
}
.atp-planer .atp-choice {
  position: relative;
  flex: 1 1 0;
  margin: 0 8px;
  cursor: pointer;
}
.atp-planer .atp-choice-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.atp-planer .atp-choice-label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid var(--atp-line);
  border-radius: 999px;
  background-color: transparent;
  font-size: 15px;
  text-align: center;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.atp-planer .atp-choice-label::before {
  content: "\f00c";
  display: none;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border-radius: 50%;
  background-color: var(--atp-dark);
  color: var(--atp-white);
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 10px;
}
.atp-planer .atp-choice:hover .atp-choice-label {
  border-color: var(--atp-dark);
}
.atp-planer .atp-choice-input:checked + .atp-choice-label {
  border-color: var(--atp-selected);
  background-color: var(--atp-field-bg);
  box-shadow: 0 0 0 1px var(--atp-selected);
}
.atp-planer .atp-choice-input:checked + .atp-choice-label::before {
  display: flex;
}
.atp-planer .atp-choice-input:focus-visible + .atp-choice-label {
  outline: 2px solid var(--atp-dark);
  outline-offset: 2px;
}
.atp-planer .atp-choice-row.is-invalid .atp-choice-label {
  border-color: var(--atp-error);
}
/* Textfelder */
.atp-planer .atp-fields {
  display: flex;
  flex-wrap: wrap;
  margin: 20px -8px 0;
}
.atp-planer .atp-field {
  width: 50%;
  padding: 0 8px;
  margin-bottom: 20px;
}
.atp-planer .atp-field.atp-field-wide {
  width: 100%;
}
.atp-planer .atp-label {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 500;
}
.atp-planer .atp-input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--atp-line);
  border-radius: 4px;
  background-color: var(--atp-field-bg);
  font-family: inherit;
  font-size: 16px;
  color: var(--atp-dark);
}
.atp-planer .atp-input:focus {
  outline: none;
  border-color: var(--atp-dark);
  box-shadow: 0 0 0 1px var(--atp-dark);
}
.atp-planer .atp-input.is-invalid {
  border-color: var(--atp-error);
}
.atp-planer .atp-input::placeholder {
  color: var(--atp-muted);
  opacity: 1;
}
.atp-planer .atp-textarea {
  height: 200px;
  resize: vertical;
}
.atp-planer .atp-error {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--atp-error);
}
.atp-planer .atp-error-form {
  margin: 0 0 20px;
  padding: 12px 15px;
  border: 1px solid var(--atp-error);
  border-radius: 4px;
  background-color: var(--atp-field-bg);
}
/* Honeypot */
.atp-planer .atp-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.atp-planer .atp-privacy {
  margin: 0 0 20px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--atp-muted);
}
.atp-planer .atp-privacy a {
  color: inherit;
  text-decoration: underline;
}
.atp-planer .atp-submit {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border: 1px solid var(--atp-dark);
  border-radius: 0;
  background-color: var(--atp-dark);
  color: var(--atp-white);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.atp-planer .atp-submit:hover, .atp-planer .atp-submit:focus-visible {
  background-color: var(--atp-white);
  color: var(--atp-dark);
}
/* Während des Absendens gesperrt (siehe planer.js) */
.atp-planer .atp-submit.is-busy, .atp-planer .atp-submit.is-busy:hover, .atp-planer .atp-submit.is-busy:focus-visible {
  background-color: var(--atp-dark);
  color: var(--atp-white);
  opacity: 0.6;
  cursor: progress;
}
/* Mobil (< md) – der Planer wird überwiegend am Handy genutzt */
@media (max-width: 767.98px) {
  /* Überschrift: Theme-h1 (52px) bricht „Terrassenplaner“ sonst mit Trennstrich um */
  .atp-planer .atp-headline {
    font-size: clamp(28px, 8vw, 40px);
    hyphens: manual;
  }
  /* Kacheln untereinander, Grafik/Foto links, Beschriftung rechts */
  .atp-planer .atp-tiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }
  .atp-planer .atp-tile-box {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 10px 16px 10px 10px;
  }
  .atp-planer .atp-tile-media {
    flex: 0 0 110px;
  }
  .atp-planer .atp-tile-label {
    margin-top: 0;
    text-align: left;
  }
  /* Zahlenfeld unter dem Regler */
  .atp-planer .atp-range {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .atp-planer .atp-range-slider {
    padding-top: 12px;
  }
  .atp-planer .atp-range-value {
    flex: 0 0 auto;
    align-self: flex-start;
    width: 150px;
    height: 56px;
    padding: 0 10px;
  }
  .atp-planer .atp-range-number {
    height: 54px;
    font-size: 22px;
  }
  .atp-planer .atp-step-head .atp-step-title {
    font-size: 22px;
  }
  .atp-planer .atp-choices {
    flex-wrap: wrap;
  }
  .atp-planer .atp-choice {
    margin-bottom: 10px;
  }
  .atp-planer .atp-choices-3 .atp-choice {
    flex: 1 1 100%;
  }
  .atp-planer .atp-field {
    width: 100%;
  }
}
