/* Black Friday floating bar - Upskilling Academy. Design: floting bar/upa/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.
 */
.upa-bar {
  --bfbar-accent: #ffffff;
  --u: min(1px, calc(100vw / 1440));
  --red: #d21934;
  --red-dark: #c61a34;
  --navy: #000a1a;

  position: relative;
  overflow: hidden;
  width: 100%;
  height: calc(135 * var(--u));
  display: flex;
  align-items: center;
  background: #0b0b0b url("upa-bg.webp") center / cover no-repeat;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

.upa-bar:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: -3px;
}

/* ===== Absolute decorations ===== */
.upa-bar__deco {
  position: absolute;
  z-index: 0;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* Left: spotlight, balloons, red shards, BLACK FRIDAY + "Big Sale" (one image) */
.upa-bar__deco--left {
  left: calc(-34 * var(--u));
  top: calc(-45 * var(--u));
  width: calc(469.5 * var(--u));
}

/* Right: spotlight, balloons + gifts */
.upa-bar__deco--right {
  right: calc(-24 * var(--u));
  top: 0;
  width: calc(207 * var(--u));
  height: auto;
}

/* ===== Content ===== */
.upa-bar__inner {
  position: relative;
  z-index: 1;
  width: calc(1440 * var(--u));
  margin: 0 auto;
  padding-left: calc(454 * var(--u));
  /* design content sits ~4u above the vertical centre */
  padding-bottom: calc(7 * var(--u));
  display: flex;
  align-items: center;
}

.upa-bar__offer {
  display: flex;
  align-items: center;
  gap: calc(42 * var(--u));
}

.upa-bar__text {
  font-family: "Hammersmith One", "Poppins", sans-serif;
  font-size: calc(37.1 * var(--u));
  line-height: 1;
  color: #e8e0e0;
  text-shadow: calc(1 * var(--u)) calc(2 * var(--u)) 0 #000;
  white-space: nowrap;
}

/* Ribbon-shaped price box (notched both sides) */
.upa-bar__pricebox {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(266 * var(--u));
  height: calc(98 * var(--u));
  flex-shrink: 0;
}

.upa-bar__ribbon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.upa-bar__ribbon polygon {
  fill: var(--navy);
  stroke: var(--red);
  stroke-width: 9;
  stroke-linejoin: miter;
}

.upa-bar__price {
  position: relative;
  font-family: "Intro Rust", "Montserrat", sans-serif;
  font-weight: 800;
  font-size: calc(52.9 * var(--u));
  line-height: 1;
  color: #fff;
  text-shadow:
    calc(2 * var(--u)) calc(2 * var(--u)) 0 var(--red-dark),
    calc(5 * var(--u)) calc(4 * var(--u)) 0 var(--red-dark);
  white-space: nowrap;
}

.upa-bar__timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: calc(45 * var(--u));
  width: calc(172 * var(--u));
  line-height: 1;
  white-space: nowrap;
}

.upa-bar__label {
  font-family: "Canva Sans", "Poppins", sans-serif;
  font-weight: 400;
  font-size: calc(21.9 * var(--u));
}

.upa-bar__clock {
  margin-top: calc(6 * var(--u));
  font-family: "Bryndan Write", "Patrick Hand", cursive;
  font-size: calc(38 * var(--u));
  letter-spacing: 0.06em;
}

/* fixed width per unit so the clock doesn't jiggle every second */
.upa-bar__clock span {
  display: inline-block;
  min-width: 1.05em;
  text-align: center;
}

/* ===== Tablet: crop the left art, tighten spacing, scale up a little ===== */
@media (max-width: 991px) {
  .upa-bar {
    --u: calc(100vw / 1240);
  }

  /* keep BLACK FRIDAY + left balloons + "Big Sale", fade out the rest */
  .upa-bar__deco--left {
    -webkit-mask-image: linear-gradient(to right, #000 62%, transparent 72%);
    mask-image: linear-gradient(to right, #000 62%, transparent 72%);
  }

  .upa-bar__inner {
    width: 100%;
    padding-left: calc(318 * var(--u));
  }

  .upa-bar__offer {
    gap: calc(26 * var(--u));
  }

  .upa-bar__timer {
    margin-left: calc(28 * var(--u));
  }
}

/* ===== Mobile: offer on top, timer below ===== */
@media (max-width: 767px) {
  .upa-bar {
    height: auto;
    min-height: 112px;
  }

  .upa-bar__deco--left {
    display: none;
  }

  .upa-bar__deco--right {
    top: auto;
    bottom: -26px;
    right: -18px;
    width: 104px;
    opacity: 0.9;
  }

  .upa-bar__inner {
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
  }

  .upa-bar__offer {
    justify-content: center;
    gap: 12px;
  }

  .upa-bar__text {
    font-size: 20px;
    text-shadow: 1px 1px 0 #000;
  }

  .upa-bar__pricebox {
    width: 128px;
    height: 48px;
  }

  .upa-bar__ribbon polygon {
    stroke-width: 7;
  }

  .upa-bar__price {
    font-size: 26px;
    text-shadow: 1px 1px 0 var(--red-dark), 2.5px 2px 0 var(--red-dark);
  }

  .upa-bar__timer {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    width: auto;
    margin-left: 0;
  }

  .upa-bar__label {
    font-size: 14px;
  }

  .upa-bar__clock {
    margin-top: 0;
    font-size: 26px;
  }
}

@media (max-width: 380px) {
  .upa-bar__deco--right {
    width: 88px;
  }

  .upa-bar__offer {
    gap: 8px;
  }

  .upa-bar__text {
    font-size: 17px;
  }

  .upa-bar__pricebox {
    width: 112px;
    height: 44px;
  }

  .upa-bar__price {
    font-size: 23px;
  }

  .upa-bar__label {
    font-size: 13px;
  }

  .upa-bar__clock {
    font-size: 23px;
  }
}

/* ===== Mobile: timer label reads "BLACK FRIDAY ends in" (same height, no extra row) ===== */
.upa-bar__label-mob {
  display: none;
}

@media (max-width: 767px) {
  .upa-bar__label-desk {
    display: none;
  }

  .upa-bar__label-mob {
    display: inline;
  }

  /* timer row ("BLACK FRIDAY offers end in …") goes on top, offer row below */
  .upa-bar__timer {
    order: -1;
  }

  .upa-bar__bf {
    display: inline-block;
    margin-right: 2px;
    font-family: "Montserrat", sans-serif;
    font-weight: 800;
    font-style: normal;
    font-size: 13px;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    vertical-align: 1px;
    color: #ffc223;
  }
}

@media (max-width: 380px) {
  .upa-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; }
}
