/* Black Friday floating bar - Learning Facility. Design: floting bar/lf/style.css (image paths are relative to this file). */

/*
 * Everything on desktop is sized in "design units" (--u) taken from the
 * 1440 x 135 artboard, so the bar scales as one piece and never reflows.
 * 1u = 1px at 1440px wide and above, and shrinks proportionally below that.
 */
.lf-bar {
  --bfbar-accent: #f0ba53;
  --u: min(1px, calc(100vw / 1440));
  --red: #d80000;
  --price-red: #ee1924;
  --gold: #f0ba53;
  --soft-white: #e8e0e0;

  position: relative;
  overflow: hidden;
  width: 100%;
  height: calc(135 * var(--u));
  display: flex;
  align-items: center;
  background: #212121 url("lf-bg.webp") center / cover no-repeat;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.lf-bar:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

/* ===== Left scene (one image) ===== */
.lf-bar__deco {
  position: absolute;
  z-index: 0;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.lf-bar__deco--left {
  left: calc(-240.5 * var(--u));
  top: calc(-193 * var(--u));
  width: calc(628.4 * var(--u));
}

/* Right: crossed "BLACK FRIDAY SALE" tape.
   Position from Canva (element at 1374.9 / 97.6, 704.7 wide, -12.56deg on the
   1920 page) converted to the 1440 artboard; it runs off the right edge. */
.lf-bar__deco--strip {
  right: calc(-123.3 * var(--u));
  top: calc(16.8 * var(--u));
  width: calc(535.7 * var(--u));
}

/* ===== Content ===== */
.lf-bar__inner {
  position: relative;
  z-index: 1;
  width: calc(1440 * var(--u));
  margin: 0 auto;
  padding-left: calc(408 * var(--u));
  display: flex;
  align-items: center;
}

.lf-bar__text {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: calc(34.7 * var(--u));
  line-height: 1;
  color: var(--soft-white);
  white-space: nowrap;
  /* design text sits a little above centre */
  margin-bottom: calc(6 * var(--u));
}

/* Octagon price box */
.lf-bar__pricebox {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(293.3 * var(--u));
  height: calc(98.7 * var(--u));
  margin-left: calc(39 * var(--u));
  flex-shrink: 0;
}

.lf-bar__pricebox-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.lf-bar__pricebox-shape polygon {
  fill: #000;
  stroke: var(--red);
  stroke-width: 1.5;
}

.lf-bar__price {
  position: relative;
  font-family: "Noto Serif", Georgia, serif;
  font-weight: 700;
  font-size: calc(67.3 * var(--u));
  line-height: 1;
  color: var(--price-red);
  -webkit-text-stroke: max(1px, calc(1.2 * var(--u))) #fff;
  paint-order: stroke fill;
  text-shadow: calc(2 * var(--u)) calc(1.5 * var(--u)) 0 #000;
  white-space: nowrap;
}

.lf-bar__timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(263 * var(--u));
  margin-left: calc(41 * var(--u));
  line-height: 1;
  white-space: nowrap;
  font-family: "Gotham", "Montserrat", sans-serif;
  font-weight: 700;
}

.lf-bar__label {
  font-size: calc(31.7 * var(--u));
  color: var(--soft-white);
}

.lf-bar__clock {
  margin-top: calc(10 * var(--u));
  font-size: calc(50.1 * var(--u));
  letter-spacing: 0.03em;
  color: var(--gold);
  /* equal-width digits so the clock doesn't jiggle every second */
  font-variant-numeric: tabular-nums;
}

/* ===== Tablet: scale up a little, tighten spacing ===== */
@media (max-width: 991px) {
  .lf-bar {
    --u: calc(100vw / 1300);
  }

  .lf-bar__inner {
    width: 100%;
    padding-left: calc(392 * var(--u));
  }

  .lf-bar__pricebox {
    margin-left: calc(24 * var(--u));
  }

  .lf-bar__timer {
    margin-left: calc(22 * var(--u));
  }

  /* the tape sits right behind the timer here, so soften it */
  .lf-bar__deco--strip {
    opacity: 0.7;
  }
}

/* ===== Mobile: offer on top, timer below ===== */
@media (max-width: 767px) {
  .lf-bar {
    height: auto;
    min-height: 116px;
  }

  .lf-bar__deco--left {
    display: none;
  }

  /* tape tucked into the bottom-right corner */
  .lf-bar__deco--strip {
    top: auto;
    bottom: -38px;
    right: -60px;
    width: 250px;
    opacity: 0.8;
  }

  .lf-bar__inner {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    column-gap: 12px;
    row-gap: 6px;
    padding: 10px 12px 12px;
  }

  .lf-bar__text {
    margin-bottom: 0;
    font-size: 19px;
  }

  .lf-bar__pricebox {
    width: 128px;
    height: 50px;
    margin-left: 0;
  }

  .lf-bar__price {
    font-size: 31px;
    -webkit-text-stroke-width: 0.8px;
    text-shadow: 1px 1px 0 #000;
  }

  .lf-bar__timer {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
    width: auto;
    margin-left: 0;
  }

  .lf-bar__label {
    font-size: 15px;
  }

  .lf-bar__clock {
    margin-top: 0;
    font-size: 25px;
  }
}

@media (max-width: 380px) {
  .lf-bar__inner {
    column-gap: 8px;
  }

  .lf-bar__text {
    font-size: 16px;
  }

  .lf-bar__pricebox {
    width: 112px;
    height: 46px;
  }

  .lf-bar__price {
    font-size: 27px;
  }

  .lf-bar__label {
    font-size: 13px;
  }

  .lf-bar__clock {
    font-size: 22px;
  }
}

/* ===== Mobile: timer label reads "BLACK FRIDAY ends in" (same height, no extra row) ===== */
.lf-bar__label-mob {
  display: none;
}

@media (max-width: 767px) {
  .lf-bar__label-desk {
    display: none;
  }

  .lf-bar__label-mob {
    display: inline;
  }

  /* timer row ("BLACK FRIDAY offers end in …") goes on top, offer row below */
  .lf-bar__timer {
    order: -1;
  }

  .lf-bar__bf {
    display: inline-block;
    margin-right: 2px;
    font-family: "Poppins", sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: 13px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    vertical-align: 1px;
    color: #fff;
    background: #d80000;
    padding: 2px 6px 1px;
    border-radius: 3px;
  }
}

@media (max-width: 380px) {
  .lf-bar__bf {
    font-size: 11.5px;
  }
}

/* ==========================================================================
   Floating wrapper, close button and coupon chip (shared by all brands)
   ========================================================================== */
.bfbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  display: none;
  transform: translateY(110%);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), bottom .2s ease;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .35);
  line-height: normal;
}
.bfbar.is-on { display: block; }
.bfbar.is-in { transform: translateY(0); }
.bfbar, .bfbar *, .bfbar *::before, .bfbar *::after { box-sizing: border-box; }
.bfbar a, .bfbar a:hover, .bfbar a:focus, .bfbar a:visited { text-decoration: none; }
.bfbar img { max-width: none; border: 0; box-shadow: none; }
.bfbar-spacer { display: none; }
.bfbar-spacer.is-on { display: block; }

.bfbar-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 5;
  width: 26px;
  height: 26px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  background: rgba(0, 0, 0, .7);
  color: #fff;
  font: 400 18px/1 Arial, sans-serif;
  cursor: pointer;
  box-shadow: none;
  min-height: 0;
}
.bfbar-close:hover, .bfbar-close:focus-visible { background: #000; border-color: #fff; color: #fff; }

.bfbar-textcol {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: calc(9 * var(--u));
}
.bfbar-code {
  display: inline-block;
  padding: calc(4 * var(--u)) calc(14 * var(--u));
  border: max(1px, calc(1.6 * var(--u))) dashed var(--bfbar-accent);
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  font-family: "Poppins", Arial, sans-serif;
  font-weight: 700;
  font-size: calc(15 * var(--u));
  line-height: 1.25;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
}
.bfbar-code b { color: var(--bfbar-accent); font-weight: 700; }

@media (max-width: 767px) {
  .bfbar-close { top: 4px; right: 4px; width: 22px; height: 22px; font-size: 15px; }
  .bfbar-textcol { gap: 4px; }
  .bfbar-code { padding: 2px 8px; font-size: 10.5px; border-width: 1px; letter-spacing: .05em; }
}
@media (max-width: 380px) {
  .bfbar-code { font-size: 9.5px; padding: 2px 6px; }
}
