/*
  Gerüstpreis-Rechner – Markenkonformes Styling
  Farben/Typografie 1:1 aus Design-Stilrichtlinien.txt (Elementor-Kit von
  mettler-bau.de): Dark-Theme, Gold-Akzent, Sora (Headlines) + DM Sans (Rest),
  konsequent eckige Kanten, kein Border-Radius.
*/

.gpr-rechner {
  --bg: #1D1D1D;
  --bg-card: #282828;
  --bg-field: #232323;
  --gold: #FABC07;
  --gold-dunkel: #C99604;
  --text: #D8D8D8;
  --text-hell: #FFFFFF;
  --text-dim: #8A8A8A;
  --border: #3A3A3A;
  --border-hell: #5E5E5E;
  --fehler: #E5484D;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 56px 24px 80px;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, legend, .gpr-schritt-label, .gpr-btn {
  font-family: 'Sora', sans-serif;
}

.gpr-rechner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* --- Kopfbereich ----------------------------------------------------- */

.gpr-rechner-kopf {
  text-align: center;
}

.gpr-rechner-kopf h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--text-hell);
  text-wrap: balance;
}

.gpr-rechner-kopf p {
  margin: 0;
  color: var(--text-dim);
  font-size: 17px;
}

/* --- Fortschrittsanzeige ---------------------------------------------- */

.gpr-fortschritt-liste {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.gpr-fortschritt-schritt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: 100px;
}

.gpr-fortschritt-kreis {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-hell);
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.gpr-fortschritt-linie {
  flex: 1;
  height: 2px;
  background: var(--border-hell);
  margin-top: 18px;
}

.gpr-fortschritt-label-text {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-dim);
  text-align: center;
}

.gpr-fortschritt-schritt.gpr-ist-aktiv .gpr-fortschritt-kreis {
  border-color: var(--gold);
  color: var(--gold);
}

.gpr-fortschritt-schritt.gpr-ist-aktiv .gpr-fortschritt-label-text {
  color: var(--gold);
}

.gpr-fortschritt-schritt.gpr-ist-erledigt .gpr-fortschritt-kreis {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
}

.gpr-fortschritt-linie.gpr-ist-erledigt {
  background: var(--gold);
}

.gpr-fortschritt-schritt.gpr-ist-erledigt {
  cursor: pointer;
}

/* --- Fehlermeldung ------------------------------------------------------ */

.gpr-fehlermeldung {
  background: rgba(229, 72, 77, 0.12);
  border: 1px solid var(--fehler);
  color: #FF8A8E;
  padding: 12px 16px;
  margin: 0;
  font-size: 14px;
}

/* --- Schritte ------------------------------------------------------------ */

.gpr-schritt {
  display: none;
  flex-direction: column;
  gap: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 44px 48px;
  animation: schritt-einblenden 0.35s ease;
}

@media (max-width: 560px) {
  .gpr-schritt {
    padding: 28px 20px;
  }
}

.gpr-schritt.gpr-is-active {
  display: flex;
}

@media (prefers-reduced-motion: reduce) {
  .gpr-schritt {
    animation: none;
  }
}

@keyframes schritt-einblenden {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.gpr-schritt-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.gpr-schritt h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--text-hell);
  text-wrap: balance;
}

.gpr-schritt-text {
  margin: -14px 0 0;
  color: var(--text-dim);
  font-size: 16px;
}

.gpr-hinweis-text {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
}

/* --- Auswahl-Kacheln (Radio/Checkbox als Karten) --------------------------- */

.gpr-auswahl-kacheln {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.gpr-auswahl-kacheln--klein {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.gpr-auswahl-kacheln legend,
.gpr-wochen-auswahl legend,
.gpr-anrede-auswahl legend {
  padding: 0;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-hell);
  grid-column: 1 / -1;
}

.gpr-kachel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 14px;
  background: var(--bg-field);
  border: 1px solid var(--border);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gpr-kachel:hover {
  border-color: var(--border-hell);
}

.gpr-kachel span {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.gpr-kachel input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.gpr-kachel svg {
  width: 44px;
  height: 44px;
}

.gpr-kachel:has(input:checked) {
  border-color: var(--gold);
  background: rgba(250, 188, 7, 0.08);
}

.gpr-kachel:has(input:checked) span {
  color: var(--gold);
}

.gpr-kachel:has(input:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.gpr-kachel--klein {
  padding: 16px 10px;
  flex-direction: row;
  justify-content: center;
}

/* --- Gebäudeseiten-Grafik --------------------------------------------------- */

.gpr-seiten-grafik-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.gpr-seiten-grafik {
  max-width: 340px;
  width: 100%;
  height: auto;
}

.gpr-seiten-zone {
  cursor: pointer;
}

.gpr-seiten-zone rect {
  transition: fill 0.15s ease, stroke 0.15s ease;
}

.gpr-seiten-zone.gpr-ist-ausgewaehlt rect {
  fill: var(--gold);
}

.gpr-seiten-zone.gpr-ist-ausgewaehlt text {
  fill: var(--bg);
}

.gpr-seiten-zone:focus-visible rect {
  stroke-width: 3;
}

.gpr-seiten-checkboxen {
  border: 0;
  margin: 0;
  padding: 0;
}

.gpr-seiten-aktionen {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-dim);
}

.gpr-seiten-anzahl {
  font-weight: 600;
  color: var(--text);
}

/* --- Fläche -------------------------------------------------------------- */

.gpr-flaeche-eingabe {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gpr-flaeche-eingabe input[type="range"] {
  width: 100%;
  height: 4px;
  background: var(--border);
  appearance: none;
  cursor: pointer;
}

.gpr-flaeche-eingabe input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--gold);
  cursor: pointer;
  border: 3px solid var(--bg-card);
}

.gpr-flaeche-eingabe input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--gold);
  border: 3px solid var(--bg-card);
  cursor: pointer;
}

.gpr-flaeche-wert {
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: center;
}

.gpr-flaeche-wert input {
  width: 110px;
  padding: 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  background: var(--bg-field);
  border: 1px solid var(--border);
}

.gpr-flaeche-wert span {
  color: var(--text-dim);
}

.gpr-flaeche-skala {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
}

.gpr-flaeche-eingabe.gpr-ist-deaktiviert {
  opacity: 0.35;
  pointer-events: none;
}

.gpr-flaeche-alternative {
  text-align: center;
  margin: 0;
  font-size: 14px;
  color: var(--text-dim);
}

/* --- Generische Felder ----------------------------------------------------- */

.gpr-feld {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gpr-feld span {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-hell);
}

.gpr-feld input,
.gpr-feld textarea {
  padding: 14px 16px;
  background: var(--bg-field);
  border: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.gpr-standzeit-daten {
  display: flex;
  gap: 16px;
}

@media (max-width: 480px) {
  .gpr-standzeit-daten,
  .gpr-standort-adresse {
    flex-direction: column;
  }
}

.gpr-feld input:focus,
.gpr-feld textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.gpr-feld--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.gpr-feld--inline input {
  width: 80px;
}

.gpr-standzeit-felder,
.gpr-formular-gewerbe,
.gpr-formular-privat {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gpr-wochen-auswahl,
.gpr-anrede-auswahl {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
}

.gpr-standort-adresse {
  display: flex;
  gap: 12px;
}

.gpr-feld--breit {
  flex: 2;
}

.gpr-feld--schmal {
  flex: 1;
}

.gpr-checkbox-feld {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.gpr-checkbox-feld input {
  margin-top: 3px;
  accent-color: var(--gold);
}

.gpr-checkbox-feld a {
  color: var(--gold);
}

/* --- Upload ------------------------------------------------------------ */

.gpr-upload-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gpr-upload-feld {
  position: relative;
  border: 2px dashed var(--border-hell);
  padding: 40px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gpr-upload-feld:hover,
.gpr-upload-feld:has(input:focus-visible) {
  border-color: var(--gold);
  background: rgba(250, 188, 7, 0.05);
}

.gpr-upload-feld svg {
  width: 36px;
  height: 36px;
}

.gpr-upload-text {
  font-weight: 600;
  color: var(--text-hell);
}

.gpr-upload-hinweis {
  font-size: 12px;
  color: var(--text-dim);
}

.gpr-upload-dateien {
  font-size: 13px;
  color: var(--gold);
}

.gpr-upload-feld input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* --- Erfolgsmeldung (Absenden) --------------------------------------------- */

.gpr-erfolg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 24px 0;
}

.gpr-erfolg svg {
  width: 48px;
  height: 48px;
}

.gpr-erfolg h2 {
  margin: 0;
}

.gpr-erfolg p {
  margin: 0;
  color: var(--text-dim);
  max-width: 42ch;
}

/* --- Navigation & Buttons ------------------------------------------------ */

.gpr-schritt-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.gpr-btn {
  padding: 16px 32px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.gpr-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gpr-btn-primary {
  background: var(--gold);
  color: var(--bg);
}

.gpr-btn-primary:hover:not(:disabled) {
  background: var(--gold-dunkel);
}

.gpr-btn-sekundaer {
  background: var(--gold);
  border-color: transparent;
  color: #000;
}

.gpr-btn-sekundaer:hover {
  background: var(--gold-dunkel);
}

.gpr-btn-text {
  display: inline-block;
  background: var(--gold);
  border: 1px solid transparent;
  padding: 10px 20px;
  color: #000;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
}

.gpr-btn-text:hover {
  background: var(--gold-dunkel);
}

/* --- Hilfsklassen ------------------------------------------------------- */

.gpr-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}
