/* easyTraktor Konfigurator — Webflow-Version (in-flow)
 * =====================================================
 * Unterschiede zur Standalone-view/style.css:
 *  - Reset + Layout sind auf den Wrapper .et-konfigurator GESCOPT
 *    (kein globales body/html/*-Styling -> zerschießt die Webflow-Seite NICHT).
 *  - Kein Viewport-Höhen-/Crop-Verhalten: die Karte nimmt ihre natürliche
 *    Höhe im normalen Seitenfluss.
 * Auf das CDN legen und in Webflow einmal per <link> einbinden (Page Head).
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');

/* Reset NUR innerhalb des Wrappers */
.et-konfigurator,
.et-konfigurator *,
.et-konfigurator *::before,
.et-konfigurator *::after {
  box-sizing: border-box;
}

.et-konfigurator * {
  margin: 0;
  padding: 0;
}

/* Wrapper statt body: nur Layout, kein Hintergrund/keine Viewport-Höhe */
.et-konfigurator {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Manrope', sans-serif;
}

/* ─── Calculator ────────────────────────────────────────────────── */

.calc {
  width: 100%;
  max-width: 555px;
  display: flex;
  flex-direction: column;
  background: rgba(64, 64, 64, 0.4);
  border-radius: 20px;
  box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.2);
  overflow: visible;
  position: relative;
  backdrop-filter: blur(8px);
}

/* clip background to border-radius without clipping dropdowns */
.calc::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: rgba(64, 64, 64, 0.4);
  pointer-events: none;
}

.calc__header {
  flex: 0 0 auto;
  background: #1b1b1b;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  z-index: 1;
}

.calc__title {
  font-weight: 600;
  font-size: 20px;
  line-height: 27px;
  letter-spacing: -0.54px;
  color: #ffffff;
}

.calc__body {
  flex: 1 1 auto;
  padding: 0rem 25px 2rem;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

/* ─── Labels ────────────────────────────────────────────────────── */

.calc__label {
  font-weight: 400;
  font-size: 15px;
  line-height: 27px;
  color: #d4d4d4;
  display: block;
  margin-top: 10px;
}

.calc__label--section {
  font-weight: 700;
  color: #bcbcbc;
  margin-top: 22px;
}

/* ─── Manufacturer Buttons ──────────────────────────────────────── */

.calc__manufacturers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.calc__manufacturer {
  height: 52px;
  border-radius: 64px;
  border: 2px solid transparent;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px 12px;
  transition: border-color 0.15s;
}

.calc__manufacturer--active {
  border-color: #ee7500;
}

.calc__manufacturer--inactive {
  border-color: #ddd;
  opacity: 0.3;
}

.calc__manufacturer img {
  max-width: 100%;
  max-height: 38px;
  object-fit: contain;
}

/* CMS: ganze Marke gesperrt (Hersteller „Aktiv" = aus): ausgegraut + entsättigt
   + nicht klickbar. Opacity/Graustufe dürfen hier am ganzen Button liegen, weil
   der Tooltip NICHT im Button hängt (siehe unten), sondern am <body>. */
.calc__manufacturer--gesperrt {
  cursor: not-allowed;
  opacity: 0.3;
  filter: grayscale(1);
}

.calc__manufacturer--gesperrt:hover {
  border-color: #ddd;
}

/* Marken-Tooltip „Aktuell nicht verfügbar": der Controller hängt ihn ans <body>
   (nicht in den gesperrten Button), damit er dessen reduzierte Opacity NICHT erbt.
   Position + Ein-/Ausblenden steuert das JS per mouseenter/mouseleave; das
   dunkle Sprechblasen-Styling kommt von der Basisklasse .calc__tooltip.
   Pfeil aus, da frei am Cursor/Button positioniert. */
.calc__tooltip--brand::after {
  display: none;
}

/* ─── Dropdowns ─────────────────────────────────────────────────── */

.calc__dropdown {
  position: relative;
  margin-top: 6px;
}

.calc__dropdown-trigger {
  height: 38px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 64px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.calc__dropdown-trigger:hover {
  background: rgba(255, 255, 255, 0.5);
}

.calc__dropdown-value {
  font-weight: 400;
  font-size: 15px;
  color: #ffffff;
}

.calc__dropdown-arrow {
  color: #ffffff;
  font-size: 11px;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.calc__dropdown.is-open .calc__dropdown-arrow {
  transform: rotate(180deg);
}

.calc__dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  z-index: 100;
  list-style: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.calc__dropdown.is-open .calc__dropdown-list {
  display: block;
}

.calc__dropdown-item {
  padding: 10px 18px;
  font-size: 15px;
  color: #d4d4d4;
  cursor: pointer;
  transition: background 0.1s;
}

.calc__dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.calc__dropdown-item--selected {
  color: #ee7500;
  font-weight: 600;
}

/* Pill variant (Mietstart/Mietende) */
.calc__dropdown--pill {
  margin-top: 4px;
}

.calc__dropdown--pill .calc__dropdown-trigger {
  height: 40.5px;
}

/* ─── Date grid ─────────────────────────────────────────────────── */

.calc__dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.calc__date-group {
  display: flex;
  flex-direction: column;
}

.calc__date-group .calc__label {
  margin-top: 8px;
}

/* ─── Sliders ───────────────────────────────────────────────────── */

.calc__slider-group {
  margin-top: 22px;
}

.calc__slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.calc__slider-header .calc__label {
  margin-top: 0;
}

/* Label + Info-Icon links gruppieren */
.calc__slider-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.calc__slider-value {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 15px;
  line-height: 27px;
  color: #ffffff;
}

.calc__slider-track {
  position: relative;
  height: 10px;
}

/* Native range input styled to match */
.calc__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 12px;
  border-radius: 10px;
  background: linear-gradient(to right,
      #ee7500 0%,
      #ee7500 var(--pct, 50%),
      rgba(255, 255, 255, 0.4) var(--pct, 50%),
      rgba(255, 255, 255, 0.4) 100%);
  outline: none;
  cursor: pointer;
}

.calc__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ee7500;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.calc__range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ee7500;
  border: 2px solid #ffffff;
  cursor: pointer;
}

/* ─── Checkboxes ────────────────────────────────────────────────── */

.calc__checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin-top: 4px;
  min-height: 54px;
}

.calc__checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 15px;
  line-height: 25px;
  color: #d4d4d4;
  cursor: pointer;
}

/* Serienmäßig enthalten: vorausgewählt + gesperrt (nicht abwählbar) */
.calc__checkbox-label--serie {
  cursor: default;
}

.calc__checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.calc__checkbox-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid #b8c1c9;
  border-radius: 4.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.calc__checkbox-box::after {
  content: '';
  display: none;
  width: 5px;
  height: 9px;
  border: 2px solid #ffffff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.calc__checkbox-input:checked+.calc__checkbox-box {
  background: #ee7500;
  border-color: #ee7500;
}

.calc__checkbox-input:checked+.calc__checkbox-box::after {
  display: block;
}

/* ─── Info Tooltip ──────────────────────────────────────────────── */

.calc__info-tip {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1px solid #ee7500;
  border-radius: 11px;
  color: #ee7500;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-style: italic;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: default;
  user-select: none;
}

.calc__tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  background: #1b1b1b;
  border: 1px solid rgba(238, 117, 0, 0.3);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.5;
  color: #d4d4d4;
  white-space: normal;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  padding-left: 1rem;
}

.calc__tooltip p{
  color: #d4d4d4 !important;
}

.calc__tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1b1b1b;
}

.calc__info-tip:hover .calc__tooltip {
  display: block;
}

/* ─── Modell-Zeile + Datenblatt-Button ──────────────────────────── */

.calc__model-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

/* Dropdown füllt die Zeile, Button bleibt fix daneben */
.calc__model-row .calc__dropdown {
  flex: 1 1 auto;
  min-width: 0;
  margin-top: 0;
}

.calc__datasheet {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ee7500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.calc__datasheet:hover {
  background: #d96a00;
}

.calc__datasheet-icon {
  width: 20px;
  height: 20px;
  display: block;
}

/* Tooltip am rechten Kartenrand: rechtsbündig statt zentriert (überschreibt .calc__tooltip) */
.calc__tooltip--datasheet {
  left: auto;
  right: 0;
  transform: none;
}

.calc__tooltip--datasheet::after {
  left: auto;
  right: 16px;
  transform: none;
}

.calc__datasheet:hover .calc__tooltip {
  display: block;
}

/* ─── Price ─────────────────────────────────────────────────────── */

.calc__price-section {
  /* In-flow: fester Abstand (kein flexibler Viewport-Gap wie in der Standalone-View) */
  margin-top: 32px;
  margin-bottom: 12px;
}

.calc__price-label {
  font-weight: 600;
  font-size: 15px;
  line-height: 27px;
  color: #ffffff;
}

.calc__price-value {
  font-weight: 400;
  font-size: 26px;
  line-height: 40px;
  color: #ffffff;
}

.calc__price-sub {
  font-weight: 400;
  font-size: 14px;
  line-height: 27px;
  color: #d4d4d4;
}

.calc__price-note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -30px;
  text-align: center;
  font-size: 11px;
  line-height: 1.4;
  color: #5d5d5d;
}

/* ─── CTA Button ────────────────────────────────────────────────── */

.calc__cta {
  position: relative;
  width: 100%;
  height: 48px;
  margin-top: 10px;
  background: #ee7500;
  border: 1px solid #ee7500;
  border-radius: 40px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.calc__cta:hover {
  background: #d96a00;
  border-color: #d96a00;
}

.calc__cta-arrow {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 50%;
  pointer-events: none;
}


@media (max-width: 1440px) {
  .calc__price-value {
    font-size: 28px;
    line-height: 44px;
  }
}

@media (max-width: 1280px) {
    .calc__price-section {
    /* In-flow: fester Abstand (kein flexibler Viewport-Gap wie in der Standalone-View) */
    margin-top: 20px;
    margin-bottom: 4px;
  }
}

@media (max-width: 767px) {

}


/* ─── Schmale Screens: Checkboxen einspaltig ────────────────────── */
@media (max-width: 479px) {
  .calc__checkboxes {
    grid-template-columns: 1fr;
  }

  .calc__price-section {
    /* In-flow: fester Abstand (kein flexibler Viewport-Gap wie in der Standalone-View) */
    margin-top: 30px;
    margin-bottom: 10px;
  }

  .calc__price-value {
    font-size: 26px;
    line-height: 34px;
  }
}

/* ─────────────────────────────────────────────────────────────────────
 * Angebot-Popup (Modal-Overlay mit Typeform-iframe)
 * ---------------------------------------------------------------------
 * Liegt BEWUSST nicht unter .et-konfigurator — das Modal wird vom Controller
 * an <body> gehängt. Höhe/Breite hier anpassen (siehe Markierung unten).
 * ──────────────────────────────────────────────────────────────────── */
.et-tf-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(0, 0, 0, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  animation: et-tf-fade .15s ease;
}

.et-tf-modal {
  position: relative;
  width: 100%;
  max-width: 840px;             /* << BREITE hier anpassen */
  height: 80svh;   /* << HÖHE hier anpassen (z. B. 900px oder 95vh) */
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .35);
}

.et-tf-frame {
  width: 100%;
  height: 100%;                 /* iframe füllt das Modal — folgt der Höhe oben */
  border: 0;
  display: block;
}

.et-tf-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.et-tf-close:hover {
  background: rgba(0, 0, 0, .85);
}

@keyframes et-tf-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}