/* Black Friday campaign, shared by the homepage and car selection. */
.bf-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #090909;
  color: #fff;
  font-family: Montserrat, Arial, sans-serif;
}

.bf-banner::before,
.bf-banner::after {
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  width: 140px;
  background: repeating-linear-gradient(130deg, transparent 0 23px, #202020 24px 44px, transparent 45px 65px);
  content: '';
  opacity: .65;
}

.bf-banner::before { left: -35px; }
.bf-banner::after { right: -35px; }

.bf-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  max-width: 1140px;
  min-height: 86px;
  margin: 0 auto;
  padding: 10px 20px;
  box-sizing: border-box;
}

.bf-banner__campaign {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.bf-banner__icon {
  flex: 0 0 auto;
  width: 47px;
  height: 47px;
  color: #ff8000;
}

.bf-banner__title {
  margin: 0;
  padding-left: 20px;
  border-left: 1px solid #ddd;
  color: #fff;
  font: 800 clamp(24px, 3vw, 38px)/1.08 Montserrat, Arial, sans-serif;
  letter-spacing: -.5px;
}

.bf-banner__offer {
  flex: 0 0 auto;
  padding-left: 34px;
  border-left: 5px dotted #ff8000;
  text-align: center;
}

.bf-banner__discount {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  min-width: 220px;
  margin: 0;
  padding: 2px 25px 4px;
  border-radius: 999px;
  background: #fff;
  color: #090909;
  font: 800 38px/1.1 Montserrat, Arial, sans-serif;
}

/* Keep the percentage and each translated label intact when space is tight. */
.bf-banner__discount [data-bf-percent],
.bf-banner__off {
  flex-shrink: 0;
  white-space: nowrap;
}

.bf-banner__off { font-size: .5em; }

.bf-banner .bf-banner__discount { row-gap: 2px; }

.bf-banner__condition {
  margin: 4px 0 0;
  color: #ddd;
  font: 400 12px/1.3 Arial, sans-serif;
}

/* A verified code adds a third group without increasing the desktop banner. */
.bf-banner--with-code .bf-banner__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, .9fr);
  gap: 26px;
}

.bf-banner--with-code .bf-banner__offer {
  min-width: 0;
  padding-left: 26px;
}

.bf-banner--with-code .bf-banner__discount {
  min-width: 0;
  max-width: 100%;
  padding-inline: 18px;
  box-sizing: border-box;
}

.bf-banner__client {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  min-width: 0;
  padding-left: 26px;
  border-left: 5px dotted #ff8000;
  text-align: center;
}

.bf-banner[hidden],
.bf-banner__client[hidden] { display: none !important; }

.bf-banner__client-label {
  margin: 0 0 4px;
  color: #ccc;
  font: 700 12px/1.2 Montserrat, Arial, sans-serif;
  text-transform: uppercase;
}

.bf-banner__code {
  --bf-code-inset: 55px; /* Horizontal padding, icon and gap. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  max-width: 100%;
  margin: 0;
  padding: 4px 14px;
  border-radius: 24px;
  background: #fff;
  color: #090909;
  box-sizing: border-box;
  font: 800 24px/1.15 Montserrat, Arial, sans-serif;
}

.bf-banner__code [data-bf-code] {
  --bf-code-size: 1em;
  min-width: 0;
  font-size: var(--bf-code-size);
  overflow-wrap: anywhere;
}

.bf-banner__code [data-bf-code-compact] {
  --bf-code-size: max(.75em, .6875rem);
}

@supports (font-size: 1cqw) {
  .bf-banner__code [data-bf-code] {
    /* Estimate a single line from the actual column width, with wrap as a legible fallback. */
    font-size: clamp(.6875rem, calc((100cqw - var(--bf-code-inset)) / var(--bf-code-length, 1) * 1.333), var(--bf-code-size));
  }
}

.bf-banner__check {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #ff8000;
}

@media (min-width: 768px) and (max-width: 999.98px) {
  .bf-banner--with-code .bf-banner__inner { gap: 18px; }
  .bf-banner--with-code .bf-banner__campaign { gap: 12px; }
  .bf-banner--with-code .bf-banner__icon { width: 34px; height: 38px; }
  .bf-banner--with-code .bf-banner__title { padding-left: 12px; }
  .bf-banner--with-code .bf-banner__offer,
  .bf-banner--with-code .bf-banner__client { padding-left: 18px; border-left-width: 3px; }
  .bf-banner--with-code .bf-banner__discount { gap: 5px; padding-inline: 12px; font-size: 32px; }
  .bf-banner__code { --bf-code-inset: 42px; gap: 5px; padding-inline: 10px; font-size: 20px; }
  .bf-banner__client-label { font-size: 10px; }
  .bf-banner__check { width: 17px; height: 17px; }
}

@media (max-width: 767.98px) {
  .bf-banner__inner {
    gap: 14px;
    min-height: 88px;
    padding: 12px 15px;
  }

  .bf-banner__campaign { flex: 1 1 0; gap: 10px; }
  .bf-banner__icon { width: 29px; height: 33px; }
  .bf-banner__title { padding-left: 10px; font-size: clamp(20px, 5.5vw, 28px); letter-spacing: -.4px; }
  .bf-banner__offer { flex: 1 1 0; min-width: 0; padding-left: 14px; border-left-width: 3px; }
  .bf-banner__discount { min-width: 0; max-width: 100%; gap: 5px; padding: 4px 13px; font-size: 28px; box-sizing: border-box; }
  .bf-banner__off { font-size: 12px; }
  .bf-banner__condition { max-width: 185px; margin: 5px auto 0; font-size: 11px; }
  .bf-banner::before, .bf-banner::after { width: 65px; opacity: .4; }

  /* The code gets the full banner width below the campaign and discount. */
  .bf-banner--with-code .bf-banner__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 14px;
    row-gap: 7px;
  }
  .bf-banner--with-code .bf-banner__campaign { grid-column: 1; grid-row: 1; }
  .bf-banner--with-code .bf-banner__offer {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-left: 14px;
  }
  .bf-banner--with-code .bf-banner__discount { padding-inline: 10px; }
  .bf-banner__client {
    grid-column: 1 / -1;
    grid-row: 2;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px 7px;
    padding-left: 0;
    border-left: 0;
  }
  .bf-banner__client-label { margin: 0; font-size: 10px; }
  .bf-banner__code { --bf-code-inset: 39px; gap: 5px; padding: 3px 10px; font-size: 16px; }
  .bf-banner__check { width: 14px; height: 14px; }
}

@media (max-width: 359.98px) {
  .bf-banner__inner { gap: 9px; padding-inline: 10px; }
  .bf-banner__campaign { gap: 7px; }
  .bf-banner__icon { width: 22px; }
  .bf-banner__title { padding-left: 7px; font-size: 20px; }
  .bf-banner__offer { padding-left: 9px; }
  .bf-banner__discount { gap: 4px; padding-inline: 9px; font-size: 25px; }
  .bf-banner__off { font-size: 10px; }
  .bf-banner--with-code .bf-banner__inner { column-gap: 9px; }
  .bf-banner--with-code .bf-banner__offer { padding-left: 9px; }
  .bf-banner--with-code .bf-banner__discount { padding-inline: 8px; }
  .bf-banner__code { --bf-code-inset: 35px; padding-inline: 8px; font-size: 14px; }
}
