/* Skin for the "Immobilienbewertung 2.0" form (plugin immo-rebellen-bewertung)
   in the Immo Rebellen dark/gold design. Purely visual: the form plugin itself,
   its sending, tracking and backend stay untouched. `:root` in front of every
   selector outranks the form's own `.irb-form …` rules without !important. */

/* own copy of the display face, in case the site header is switched off */
@font-face {
  font-family: "IR Bebas Neue";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../fonts/bebas-neue-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- the page around the form ---------- */

body:has(.irb-form) {
  background:
    radial-gradient(70% 45% at 85% 0%, rgba(227, 190, 79, 0.1), transparent 70%),
    radial-gradient(60% 40% at 0% 30%, rgba(227, 190, 79, 0.05), transparent 70%),
    #0d0f13 !important;
  background-attachment: fixed !important;
}

/* Elementor sections that hold the form: let the dark page show through */
body:has(.irb-form) .elementor-element:has(.irb-form) {
  background: transparent !important;
  --background-overlay: none;
}

/* the Elementor container around the form: drop its own top padding and
   centre the card in the space below the header (taller cards just grow) */
body:has(.irb-form) .e-con:has(.irb-form),
body:has(.irb-form) .e-con-inner:has(.irb-form) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body:has(.irb-form) .e-con.e-parent:has(.irb-form) {
  min-height: calc(100svh - var(--irh-h, 84px) - var(--wp-admin--admin-bar--height, 0px));
  justify-content: center;
}

body:has(.irb-form) .e-con.e-parent:has(.irb-form) > .e-con-inner {
  justify-content: center;
  flex-grow: 0;
}

body:has(.irb-form) .elementor-widget:has(.irb-form) {
  width: 100%;
}

/* ---------- design tokens ---------- */

:root .irb-form {
  --irb-accent: #e3be4f;
  --irb-ink: #f5f5f5;
  --irb-muted: #9a9ea6;
  --irb-line: #2a2d33;
  --irb-soft: #1c1f24;
  --irb-hover: rgba(227, 190, 79, 0.08);
  --irb-hover-edge: rgba(227, 190, 79, 0.6);
  --irb-hover-ink: #f5f5f5;
  --irb-error: #ef7a70;
  --irb-radius: 22px;
  --irb-display: "IR Bebas Neue", "Bebas Neue", "Oswald", sans-serif;
  color: var(--irb-ink);
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color-scheme: dark;
  margin: 40px auto;
}

:root .irb-form :is(button, input, select, textarea, a, summary):focus-visible {
  outline: 2px solid var(--irb-accent);
  outline-offset: 3px;
}

:root .irb-form .irb-loading {
  color: var(--irb-muted);
}

/* ---------- card ---------- */

:root .irb-form .irb-shell {
  position: relative;
  background: linear-gradient(180deg, #17191e 0%, #131519 100%);
  border: 1px solid var(--irb-line);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

/* faint gold light across the top edge of the card */
:root .irb-form .irb-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(227, 190, 79, 0.6), transparent);
  pointer-events: none;
}

:root .irb-form .irb-eyebrow {
  color: var(--irb-accent);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.22em;
  font-weight: 700;
}

:root .irb-form h2 {
  font-family: var(--irb-display);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--irb-ink);
}

:root .irb-form .irb-step {
  color: var(--irb-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border: 1px solid var(--irb-line);
  border-radius: 999px;
}

:root .irb-form .irb-subtitle {
  color: var(--irb-muted);
  font-size: 15px;
}

:root .irb-form .irb-progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
}

:root .irb-form .irb-progress > span {
  background: linear-gradient(90deg, #c9a23e, #f0cd63);
  box-shadow: 0 0 14px rgba(227, 190, 79, 0.65);
}

:root .irb-form .irb-footer {
  border-top-color: var(--irb-line);
}

:root .irb-form .irb-footer-note {
  color: var(--irb-muted);
}

/* ---------- buttons ---------- */

:root .irb-form .irb-primary {
  background: var(--irb-accent);
  border-color: var(--irb-accent);
  color: #0d0f13;
  border-radius: 999px;
  font-weight: 700;
  padding: 13px 26px;
  box-shadow: 0 10px 28px -12px rgba(227, 190, 79, 0.8);
}

:root .irb-form .irb-primary:disabled {
  background: #2a2d33;
  border-color: #2a2d33;
  color: #7c8088;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  :root .irb-form .irb-primary:not(:disabled):hover {
    background: #f0cd63;
    border-color: #f0cd63;
    color: #0d0f13;
    box-shadow: 0 14px 32px -12px rgba(227, 190, 79, 0.95);
  }
}

:root .irb-form.irb-thanks .irb-primary,
:root .irb-form.irb-thanks .irb-primary:hover {
  color: #0d0f13;
}

:root .irb-form .irb-back,
:root .irb-form .irb-skip,
:root .irb-form .irb-secondary {
  color: var(--irb-muted);
}

:root .irb-form .irb-back:hover,
:root .irb-form .irb-skip:hover {
  color: var(--irb-ink);
}

/* ---------- choices ---------- */

:root .irb-form .irb-choice {
  background: #1a1d22;
  border-color: var(--irb-line);
  color: var(--irb-ink);
}

:root .irb-form .irb-choice-mark {
  border-color: #5a5f68;
}

:root .irb-form .is-selected .irb-choice-mark {
  background: var(--irb-accent);
  border-color: var(--irb-accent);
  box-shadow: inset 0 0 0 3px #1a1d22;
}

:root .irb-form .irb-multi .is-selected .irb-choice-mark {
  box-shadow: none;
  background: var(--irb-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%230d0f13' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

:root .irb-form .irb-choice-arrow {
  color: #6b707a;
}

:root .irb-form .irb-choice.is-selected {
  background: var(--irb-hover);
  border-color: var(--irb-hover-edge);
  color: var(--irb-ink);
  box-shadow: 0 0 0 1px rgba(227, 190, 79, 0.25), 0 14px 34px -16px rgba(227, 190, 79, 0.45);
}

/* property-type cards with illustrations */
:root .irb-form .irb-types .irb-choice {
  background:
    radial-gradient(80% 60% at 50% 35%, rgba(255, 255, 255, 0.05), transparent 70%),
    linear-gradient(180deg, #1c1f24 0%, #15171b 100%);
  border-color: var(--irb-line);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* the illustrations stay monochrome; hover/selection only lifts them and
   adds a soft gold glow underneath, the card's gold edge carries the state */
:root .irb-form .irb-art svg {
  filter: grayscale(1) brightness(0.92) contrast(1.05);
  transition: filter 0.45s ease;
}

:root .irb-form .irb-choice.is-selected .irb-art svg {
  filter: grayscale(1) brightness(1.1) contrast(1.05) drop-shadow(0 12px 18px rgba(227, 190, 79, 0.16));
}

:root .irb-form .irb-art-shadow {
  fill: #000;
  opacity: 0.35;
}

:root .irb-form .irb-types .irb-choice-arrow {
  background: rgba(255, 255, 255, 0.06);
  color: #8a8f98;
}

:root .irb-form .irb-types .irb-choice.is-selected .irb-choice-arrow {
  background: var(--irb-accent);
  color: #0d0f13;
}

@media (hover: hover) and (pointer: fine) {
  :root .irb-form .irb-choice:hover {
    background: var(--irb-hover);
    border-color: var(--irb-hover-edge);
    color: var(--irb-ink);
    box-shadow: 0 18px 40px -18px rgba(227, 190, 79, 0.5);
  }

  :root .irb-form .irb-choice:hover .irb-choice-arrow {
    color: var(--irb-accent);
  }

  :root .irb-form .irb-types .irb-choice:hover .irb-art svg {
    filter: grayscale(1) brightness(1.1) contrast(1.05) drop-shadow(0 12px 18px rgba(227, 190, 79, 0.16));
  }

  :root .irb-form .irb-types .irb-choice:hover .irb-choice-arrow {
    background: var(--irb-accent);
    color: #0d0f13;
  }

  :root .irb-form .irb-chip:hover,
  :root .irb-form .irb-counter:hover {
    border-color: var(--irb-hover-edge);
    background: var(--irb-hover);
  }
}

@media (hover: none) {
  :root .irb-form .irb-choice:active {
    background: var(--irb-hover);
  }
}

/* ---------- numbers, slider, chips ---------- */

:root .irb-form input.irb-number {
  font-family: var(--irb-display);
  font-size: 56px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--irb-ink);
  border-bottom-color: #3a3f47;
}

:root .irb-form input.irb-number:focus {
  border-bottom-color: var(--irb-accent);
}

:root .irb-form .irb-number::placeholder {
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  font-size: 20px;
  color: #5d626b;
}

:root .irb-form .irb-unit {
  color: var(--irb-muted);
}

:root .irb-form .irb-counter {
  background: var(--irb-soft);
  border-color: var(--irb-line);
  color: var(--irb-ink);
}

:root .irb-form .irb-range {
  accent-color: var(--irb-accent);
}

:root .irb-form .irb-chip {
  background: #1a1d22;
  border-color: var(--irb-line);
  color: var(--irb-ink);
}

:root .irb-form .irb-chip.is-selected {
  background: var(--irb-accent);
  border-color: var(--irb-accent);
  color: #0d0f13;
  font-weight: 700;
}

:root .irb-form .irb-divider::before,
:root .irb-form .irb-divider::after {
  background: var(--irb-line);
}

/* ---------- fields ---------- */

:root .irb-form .irb-field {
  color: var(--irb-ink);
}

:root .irb-form .irb-field input,
:root .irb-form .irb-field select,
:root .irb-form .irb-field textarea {
  background: #0f1115;
  color: var(--irb-ink);
  border-color: #33373e;
  border-radius: 10px;
  color-scheme: dark;
}

:root .irb-form .irb-field :is(input, select, textarea)::placeholder {
  color: #5d626b;
}

:root .irb-form .irb-field :is(input, select, textarea):focus {
  border-color: var(--irb-accent);
  box-shadow: 0 0 0 3px rgba(227, 190, 79, 0.16);
}

:root .irb-form .irb-field input[aria-invalid="true"] {
  border-color: var(--irb-error);
  background: rgba(239, 122, 112, 0.06);
}

:root .irb-form .irb-required {
  color: var(--irb-accent);
}

:root .irb-form .irb-error {
  background: rgba(239, 122, 112, 0.1);
  color: var(--irb-error);
}

:root .irb-form .irb-consent input {
  accent-color: var(--irb-accent);
}

:root .irb-form a {
  color: var(--irb-accent);
}

/* ---------- contact step ---------- */

:root .irb-form .irb-message summary,
:root .irb-form .irb-review summary,
:root .irb-form .irb-edit,
:root .irb-form .irb-restored button {
  color: var(--irb-accent);
}

:root .irb-form .irb-review {
  background: #1a1d22;
  border-color: var(--irb-line);
}

:root .irb-form .irb-review li {
  border-top-color: var(--irb-line);
}

:root .irb-form .irb-person {
  background: linear-gradient(180deg, #1c1f24, #17191e);
  border: 1px solid var(--irb-line);
}

:root .irb-form .irb-person h3 {
  font-family: var(--irb-display);
  font-weight: 400;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--irb-ink);
}

:root .irb-form .irb-person p,
:root .irb-form .irb-trust {
  color: #b9bcc2;
}

:root .irb-form .irb-trust li::before {
  border-color: var(--irb-accent);
}

:root .irb-form .irb-restored {
  background: var(--irb-soft);
  color: var(--irb-muted);
}

/* ---------- thank-you page ---------- */

:root .irb-form.irb-thanks h1 {
  font-family: var(--irb-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 60px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--irb-ink);
}

:root .irb-form .irb-check {
  background: rgba(227, 190, 79, 0.12);
  color: var(--irb-accent);
  box-shadow: 0 0 0 8px rgba(227, 190, 79, 0.05);
}

:root .irb-form .irb-lead {
  color: #c7c7c7;
}

:root .irb-form .irb-timeline li::before {
  background: var(--irb-accent);
  color: #0d0f13;
  font-weight: 700;
}

:root .irb-form .irb-timeline li:not(:last-child)::after {
  background: var(--irb-line);
}

:root .irb-form .irb-timeline span {
  color: var(--irb-muted);
}

@container irb (max-width: 700px) {
  :root .irb-form h2 {
    font-size: 34px;
  }

  :root .irb-form input.irb-number {
    font-size: 44px;
  }

  :root .irb-form .irb-step {
    display: inline-block;
  }
}

@container irb (max-width: 440px) {
  /* "Gewerbeimmobilie" must fit one line in the half-width card */
  :root .irb-form .irb-types .irb-choice-label {
    font-size: 13px;
    letter-spacing: -0.01em;
    overflow-wrap: normal;
    hyphens: manual;
  }
}

@media (max-width: 760px) {
  :root .irb-form {
    margin: 20px auto 32px;
  }
}

/* ---------- own icon set (module form, .ira-bw) ----------
   Drawn for the dark card: no filter; hover/selection lifts the building
   and the lit windows glow a little warmer. */
:root .irb-form.ira-bw .irb-art svg,
:root .irb-form.ira-bw .irb-choice.is-selected .irb-art svg {
  filter: none;
}

:root .irb-form.ira-bw .ira-lit {
  transition: filter 0.45s ease, opacity 0.45s ease;
  opacity: 0.85;
}

:root .irb-form.ira-bw .irb-choice.is-selected .ira-lit {
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(227, 190, 79, 0.9));
}

@media (hover: hover) and (pointer: fine) {
  :root .irb-form.ira-bw .irb-types .irb-choice:hover .irb-art svg {
    filter: none;
  }

  :root .irb-form.ira-bw .irb-types .irb-choice:hover .ira-lit {
    opacity: 1;
    filter: drop-shadow(0 0 3px rgba(227, 190, 79, 0.9));
  }
}

:root .irb-form .irb-thanks-actions .irb-secondary {
  color: var(--irb-muted);
  text-decoration: none;
}
