/* ==========================================================================
   Konfigurator – Styles
   Alle Farben/Radien/Abstände zentral als CSS-Variablen für einfache
   Anpassung an das jeweilige Partner-Theme.
   ========================================================================== */

:root {
  --cfg-color-primary: #1428A0;
  --cfg-color-primary-light: #4A6CF7;
  --cfg-color-bg: #FFFFFF;
  --cfg-color-bg-soft: #EEEEEE;
  --cfg-color-bg-subtle: #F7F7F7;
  --cfg-color-bar-empty: #BBBBBB;
  --cfg-color-bar-1: #68AEFF;
  --cfg-color-bar-2: #2189FF;
  --cfg-color-bar-3: #006BEA;
  --cfg-color-border: #E3E5EC;
  --cfg-color-text: #101114;
  --cfg-color-text-muted: #6B6F7B;
  --cfg-radius-lg: 20px;
  --cfg-radius-md: 14px;
  --cfg-radius-sm: 10px;
  --cfg-font-body: "SamsungSSBody", "SamsungOne", "Samsung Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --cfg-font-head: "SamsungSSHead", "Samsung Sharp Sans", "Samsung Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --cfg-font: var(--cfg-font-body);
  --cfg-shadow: 0 2px 8px rgba(16, 17, 20, 0.06), 0 1px 2px rgba(16, 17, 20, 0.06);
}

html, body {
  background: #FFFFFF;
}

.cfg-widget,
.cfg-widget *,
.cfg-widget *::before,
.cfg-widget *::after {
  box-sizing: border-box;
  font-family: var(--cfg-font-body) !important;
}

.cfg-widget h1,
.cfg-widget h2,
.cfg-widget h3,
.cfg-widget h4,
.cfg-widget h5,
.cfg-widget h6 {
  font-family: var(--cfg-font-head) !important;
}

.cfg-widget {
  font-family: var(--cfg-font);
  color: var(--cfg-color-text);
  max-width: 1240px;
  margin: 0 auto;
  line-height: 1.45;
}

.cfg-card {
  background: var(--cfg-color-bg);
  border-radius: var(--cfg-radius-lg);
  box-shadow: var(--cfg-shadow);
  padding: 32px;
}

/* -------------------------------------------------------------------- */
/* Stepper                                                               */
/* -------------------------------------------------------------------- */

.cfg-stepper {
  margin: 0 auto 32px;
  overflow-x: auto;
  padding-bottom: 4px;
  max-width: 1064px;
}

.cfg-stepper__track {
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.cfg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.cfg-step__circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--cfg-color-bg);
  border: 2px solid var(--cfg-color-border);
  color: var(--cfg-color-text-muted);
}

.cfg-step__label {
  font-size: 12px;
  color: var(--cfg-color-text-muted);
  white-space: nowrap;
}

.cfg-step.is-done .cfg-step__circle {
  background: var(--cfg-color-text);
  border-color: var(--cfg-color-text);
  color: #fff;
}

.cfg-step.is-done .cfg-step__label {
  color: var(--cfg-color-text);
}

.cfg-step.is-active .cfg-step__circle {
  background: var(--cfg-color-primary-light);
  border-color: var(--cfg-color-primary-light);
  color: #fff;
}

.cfg-step.is-active .cfg-step__label {
  color: var(--cfg-color-text);
  font-weight: 600;
}

.cfg-step__line {
  flex: 1 1 24px;
  min-width: 16px;
  height: 2px;
  background: var(--cfg-color-border);
  margin: 0 6px;
}

.cfg-step__line.is-done {
  background: var(--cfg-color-text);
}

/* -------------------------------------------------------------------- */
/* Intro screen                                                          */
/* -------------------------------------------------------------------- */

.cfg-intro {
  position: relative;
  border-radius: var(--cfg-radius-lg);
  overflow: hidden;
  background: var(--cfg-color-bg-soft);
  min-height: 420px;
  display: flex;
  align-items: stretch;

  @media (max-width: 601px) {
    flex-direction: column-reverse;
  }
}

.cfg-intro__image {
  position: absolute;
  /* inset: 0; */
  right: 0;
  z-index: 2;
  width: 57%;
  height: 100%;
  object-fit: contain;

  @media (max-width: 601px) {
    position: relative;
    width: 100%;
    /* height: 220px; */
  }
}

.cfg-intro__overlay {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  height: 490px;
  padding: 36px;
  background-color: #f5f5f5;

  @media (max-width: 601px) {
    height: 100%;
  }
}

.cfg-intro__panel {
  max-width: 460px;
  width: 41%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.97) 55%, rgba(255, 255, 255, 0.75) 100%);
  padding: 32px;
  border-radius: var(--cfg-radius-md);

  @media (max-width: 601px) {
    max-width: none;
    width: 100%;
    text-align: center;
  }
}

.cfg-intro__panel h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 16px;
}

.cfg-intro__panel p {
  margin: 0 0 24px;
  color: var(--cfg-color-text-muted);
  font-size: 15px;
}

/* -------------------------------------------------------------------- */
/* Buttons                                                               */
/* -------------------------------------------------------------------- */

.cfg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: var(--cfg-font);
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  padding: 13px 28px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}

.cfg-btn--primary {
  background: var(--cfg-color-text);
  color: #fff;
  width: 100%;
  height: 40px;
}

.cfg-btn--primary:hover {
  background: var(--cfg-color-bg);
  color: var(--cfg-color-text);
  border: 1px solid var(--cfg-color-text);
}

.cfg-btn--outline {
  background: transparent;
  color: var(--cfg-color-text);
  border: 1px solid var(--cfg-color-border);
}

.cfg-btn--outline:hover {
  border-color: var(--cfg-color-text);
}

.cfg-btn--link {
  background: none;
  border: none;
  color: var(--cfg-color-text);
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 1px;
  font-weight: 500;
  padding: 8px 4px;
  cursor: pointer;
}

/* -------------------------------------------------------------------- */
/* Question screen                                                       */
/* -------------------------------------------------------------------- */

.cfg-question h2 {
  font-size: 48px;
  max-width: 1200px;
  margin: 0 0 8px;
  line-height: 1.25;
}

.cfg-question__subtext {
  margin: 0 0 24px;
  color: var(--cfg-color-text-muted);
  font-size: 18px;
}

.cfg-question__body {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

.cfg-answers {
  display: flex;
  flex: 1 1 372px;
  min-width: 240px;
  max-width: 745px;
  flex-direction: column;
  gap: 12px;
  background: var(--cfg-color-bg-soft);
  border-radius: var(--cfg-radius-md);
  padding: 32px;
  @media (max-width: 480px) {
    min-width: 100%;
  }
}

.cfg-answer {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  background: var(--cfg-color-bg);
  border: 1px solid var(--cfg-color-border);
  border-radius: var(--cfg-radius-sm);
  padding: 18px 20px;
  font-family: var(--cfg-font);
  font-size: 15px;
  font-weight: 600;
  color: var(--cfg-color-text);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.cfg-answer:hover {
  border-color: var(--cfg-color-primary-light);
}

.cfg-answer:focus-visible {
  outline: 2px solid var(--cfg-color-primary-light);
  outline-offset: 2px;
}

.cfg-answer.is-selected {
  border-color: var(--cfg-color-primary);
  background: #EEF1FD;
  box-shadow: inset 0 0 0 1px var(--cfg-color-primary);
}

.cfg-question__media {
  flex: 0 1 auto;
  min-width: 0;
  border-radius: var(--cfg-radius-md);
  overflow: hidden;
  background: var(--cfg-color-bg-soft);
  @media (max-width: 480px) {
    background: transparent;
  }
}

.cfg-question__media--wide {
  width: 65%;
  min-width: 280px;
  max-width: 764px;
  aspect-ratio: 764 / 382;
}

.cfg-question__media--small {
  width: 32%;
  min-width: 240px;
  max-width: 372px;
  aspect-ratio: 372 / 382;
}

.cfg-question__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  @media (max-width: 480px) {
    object-fit: cover;
  }
}

.cfg-question__footer {
  margin-top: 24px;
}

.cfg-result__footer {
  display: flex;
  justify-content: center;
}

/* -------------------------------------------------------------------- */
/* Result screen                                                         */
/* -------------------------------------------------------------------- */

.cfg-result h2 {
  font-size: 48px;
  text-align: center;
  margin: 0 0 40px;
}

/* -------------------------------------------------------------------- */
/* Product cards — all 3 always shown, winner(s) highlighted + first     */
/* -------------------------------------------------------------------- */

.cfg-product-row {
  position: relative;
  margin-bottom: 24px;
}

.cfg-product-track {
  display: flex;
  align-items: stretch;
  gap: 24px;
  transition: transform 0.3s ease;
}

.cfg-product-card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--cfg-color-bg);
  border: none;
  border-radius: var(--cfg-radius-lg);
  overflow: hidden;
}

.cfg-product-card--winner {
  border-color: transparent;
  background: linear-gradient(180deg, #2189FF 0%, #DCE9FF 42%, #FFFFFF 100%);
}
.cfg-product-card--winner2 {
  border-color: transparent;
  background: linear-gradient(0deg, #D6E9FF 0%, #68AEFF 100%), #F7F7F7;

}

.cfg-product-card__ribbon {
  background: #2189FF;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-family: "Samsung Sharp Sans", sans-serif;
  padding: 12px 20px 0 20px ;
}
.cfg-product-card__ribbon2 {
  background: #68AEFF;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  font-family: "Samsung Sharp Sans", sans-serif;
  padding: 12px 20px 0 20px ;
}

/* Rendered (empty) on non-winner cards too, so every card reserves the
   same header height and all 3 images/text line up on the same rows —
   only the winner's card grows taller at the top for its visible ribbon. */
.cfg-product-card__ribbon--placeholder {
  visibility: hidden;
}

.cfg-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  padding: 20px;
  border-radius: 20px;
  background: var(--cfg-color-bg-subtle);
}
.cfg-product-card__body--winner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  padding: 20px;
  border-radius: 0;
  background: linear-gradient(0deg, #D6E9FF 0%, #2189FF 100%), #F7F7F7;
}
.cfg-product-card__body--winner2 {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  padding: 20px;
  border-radius: 0;
  background: linear-gradient(0deg, #D6E9FF 0%, #68AEFF 100%), #F7F7F7;
}

.cfg-product-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--cfg-radius-md);
  overflow: hidden;
  background: white;
  display: flex;
  align-items: flex-end;
}

.cfg-product-card__media img {
  width: 100%;
  height: 90%;
  object-fit: cover;
  /* display: none; */
}

.cfg-product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #000000;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
}

.cfg-product-card__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cfg-product-card__info h3 {
  margin: 0;
  font-size: 24px;
}

.cfg-product-card__info p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--cfg-color-text);
  flex: 1;
}

.cfg-product-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.cfg-product-card__meta-label {
  font-size: 13px;
  font-weight: 700;
  margin-right: 4px;
}

.cfg-rating-badge {
  height: 20px;
  width: auto;
  display: block;
}

.cfg-product-card__meta img {
  height: 24px;
  width: auto;
  display: block;
}

.cfg-product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cfg-product-card__actions .cfg-btn {
  align-self: flex-start;
}

/* Slide-position dots; hidden on desktop, shown as a mobile carousel
   indicator (see the responsive block below). */
.cfg-carousel-dots {
  display: none;
}

.cfg-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: var(--cfg-color-border);
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.cfg-carousel-dot.is-active {
  width: 8px;
  background: var(--cfg-color-text);
}

/* -------------------------------------------------------------------- */
/* Requirements — separate box, collapsible, open by default             */
/* -------------------------------------------------------------------- */

.cfg-requirements {
  border-radius: var(--cfg-radius-lg);
  overflow: hidden;
  margin: 0 0 32px;
}

.cfg-requirements__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--cfg-color-bg-soft);
  padding: 16px 24px;
}

.cfg-requirements__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--cfg-font);
  font-weight: 700;
  font-size: 16px;
  color: var(--cfg-color-text);
  cursor: pointer;
  width: 100%;
  justify-content: space-between;
}

.cfg-requirements__chevron {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url("../visuals/icons/arrow-down.svg") center / contain no-repeat;
  flex-shrink: 0;
}

.cfg-requirements__chevron--open {
  background-image: url("../visuals/icons/arrow-up.svg");
}

.cfg-requirements__body {
  background: var(--cfg-color-bg-subtle);
  padding: 24px;
}

/* -------------------------------------------------------------------- */
/* Requirements bars                                                     */
/* -------------------------------------------------------------------- */

.cfg-requirement-list {
  display: flex;
  flex-direction: column;
  @media (max-width: 480px) {
    gap: 18px;
  }
}

.cfg-requirement-row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 44px;

  @media (max-width: 480px) {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    height: auto;
  }
}

.cfg-requirement-row__label {
  flex: 0 0 90px;
  font-size: 14px;
  font-weight: 700;
  @media (max-width: 480px) {
    flex-basis: 20px;
  }
}

.cfg-bar {
  flex: 1;
  display: flex;
  gap: 4px;
  @media (max-width: 480px) {
    width: 100%;
  }
}

.cfg-bar__segment {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--cfg-color-bar-empty);
}

.cfg-bar__segment.is-filled-1 {
  background: var(--cfg-color-bar-1);
}

.cfg-bar__segment.is-filled-2 {
  background: var(--cfg-color-bar-2);
}

.cfg-bar__segment.is-filled-3 {
  background: var(--cfg-color-bar-3);
}

/* -------------------------------------------------------------------- */
/* Responsive                                                            */
/* -------------------------------------------------------------------- */

@media (max-width: 680px) {
  .cfg-card {
    padding: 20px;
    border-radius: var(--cfg-radius-md);
  }

  .cfg-intro {
    min-height: 360px;
  }

  .cfg-intro__overlay {
    padding: 20px;
    align-items: flex-end;
  }

  .cfg-intro__panel {
    max-width: 100%;
    background: rgba(255, 255, 255, 0.97);
  }

  .cfg-intro__panel h1 {
    font-size: 22px;
  }

  .cfg-question__body {
    flex-direction: column-reverse;
  }

  .cfg-question__media--wide,
  .cfg-question__media--small {
    width: 100%;
    height: 220px;
    @media (max-width: 480px) {
      height: 246px;
    }
  }

  .cfg-question h2 {
    font-size: 20px;
  }

  /* Windowed stepper: show only the active step at full size, with a
     peek of the previous/next step on either side, instead of the full
     scrollable list used on desktop. The container spans the same
     responsive full width as the rest of the layout (image, answers);
     the track is centered on the active step via left:50% (relative to
     that responsive container width) plus a fixed pixel pull-back to
     that step's center, so it works at any container width without
     needing to know it in px. --cfg-active (set inline per render)
     drives which step the track centers on. */
  .cfg-stepper {
    position: relative;
    overflow: hidden;
    max-width: none;
    width: 100%;
    height: 52px;
    margin: 0 auto 32px;
    padding-bottom: 0;
  }

  .cfg-stepper__track {
    position: absolute;
    top: 0;
    left: 50%;
    justify-content: flex-start;
    transition: transform 0.25s ease;
    transform: translateX(calc(-32px - 96px * var(--cfg-active, 0)));
  }

  .cfg-step {
    flex: 0 0 64px;
    width: 64px;
  }

  .cfg-step__line {
    flex: 0 0 32px;
    width: 32px;
    margin: 0;
  }

  .cfg-result h2 {
    font-size: 26px;
    margin-bottom: 24px;
  }

  .cfg-requirements__header,
  .cfg-requirements__body {
    padding: 16px;
  }

  /* Product carousel: one card per "page", swipe/drag or tap a dot to
     move between them. --cfg-slide (set inline per render) drives which
     card the track is on; attachCarouselSwipe() in app.js handles drag. */
  .cfg-product-row {
    overflow: visible;

  }

  .cfg-product-track {
    gap: 0;
    /* Claim horizontal drags for the swipe JS; leave vertical scroll to
       the browser so the page can still scroll normally while dragging. */
    touch-action: pan-y;
    transform: translateX(calc(-100% * var(--cfg-slide, 0)));
  }

  .cfg-product-card {
    flex: 0 0 100%;
    @media (max-width: 480px) {
        margin-right: 10px;
    }
  }

  .cfg-product-card__info h3 {
    font-size: 24px;
  }

  .cfg-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 16px auto;
    border: 1px solid var(--cfg-color-border);
    border-radius: var(--cfg-radius-md);
    padding: 4px 8px;
    width: fit-content;
    
  }

  .cfg-requirement-row__label {
    flex-basis: 70px;
    @media (max-width: 480px) {
        flex-basis: 20px;
    }
  }
}
