/* Black Friday floating bar - Tyne Academy. Design: floting bar/ta/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.
 */
.ta-bar {
  --bfbar-accent: #ffc223;
  --u: min(1px, calc(100vw / 1440));
  --gold: #ffc223;
  --timer-gold: #f0ba53;
  --soft-white: #e8e0e0;
  --red-line: #b61c1c;

  position: relative;
  overflow: hidden;
  width: 100%;
  height: calc(135 * var(--u));
  display: flex;
  align-items: center;
  background: #000;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

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

/* ===== Absolute decorations ===== */
.ta-bar__deco {
  position: absolute;
  z-index: 0;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* Left: ribbons, BLACK FRIDAY, gifts, confetti + balloons (one image) */
.ta-bar__deco--left {
  left: calc(-131 * var(--u));
  top: calc(-101 * var(--u));
  width: calc(638 * var(--u));
}

/* Right: gift boxes */
.ta-bar__deco--right {
  right: calc(-83 * var(--u));
  top: calc(7 * var(--u));
  width: calc(193 * var(--u));
}

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

/* BLACK FRIDAY lettering on its own: mobile only */
.ta-bar__bf {
  display: none;
}

/* Rounded pill price box */
.ta-bar__pricebox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(295 * var(--u));
  height: calc(108.6 * var(--u));
  flex-shrink: 0;
  background: #000;
  border: max(1px, calc(4.5 * var(--u))) solid var(--red-line);
  border-radius: calc(53 * var(--u));
}

.ta-bar__price {
  font-family: "Magnolia Script", "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 900;
  font-size: calc(70 * var(--u));
  font-variant-numeric: lining-nums;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--gold);
  -webkit-text-stroke: max(1px, calc(1.2 * var(--u))) #000;
  paint-order: stroke fill;
  text-shadow:
    calc(-1.2 * var(--u)) calc(-1.2 * var(--u)) 0 #fff,
    calc(2 * var(--u)) calc(2 * var(--u)) 0 #000;
  white-space: nowrap;
}

/* Shopping cart between price and timer */
.ta-bar__cart {
  position: relative;
  top: calc(7 * var(--u));
  display: block;
  width: calc(147 * var(--u));
  height: auto;
  margin-left: calc(38 * var(--u));
  flex-shrink: 0;
  pointer-events: none;
}

.ta-bar__timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: calc(238 * var(--u));
  line-height: 1;
  white-space: nowrap;
  font-family: "Hammersmith One", sans-serif;
}

.ta-bar__label {
  font-size: calc(31.7 * var(--u));
  letter-spacing: 0.015em;
  color: var(--soft-white);
}

.ta-bar__clock {
  margin-top: calc(10 * var(--u));
  font-size: calc(50.1 * var(--u));
  letter-spacing: 0.06em;
  color: var(--timer-gold);
}

/* fixed width per unit so the clock doesn't jiggle every second */
.ta-bar__clock span {
  display: inline-block;
  min-width: 1.18em;
  text-align: center;
}

/* ===== Tablet: crop the left scene, scale up a little ===== */
@media (max-width: 991px) {
  .ta-bar {
    --u: calc(100vw / 1300);
  }

  /* keep the ribbons + BLACK FRIDAY + first gifts, fade out the balloons side */
  .ta-bar__deco--left {
    -webkit-mask-image: linear-gradient(to right, #000 66%, transparent 78%);
    mask-image: linear-gradient(to right, #000 66%, transparent 78%);
  }

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

  .ta-bar__cart {
    margin-left: calc(16 * var(--u));
    width: calc(130 * var(--u));
  }

  .ta-bar__deco--right {
    right: calc(-120 * var(--u));
  }
}

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

  .ta-bar__deco--left,
  .ta-bar__cart {
    display: none;
  }

  .ta-bar__deco--right {
    top: auto;
    bottom: -10px;
    right: -56px;
    width: 104px;
    opacity: 0.75;
  }

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

  .ta-bar__bf {
    display: block;
    width: 116px;
    height: auto;
  }

  .ta-bar__pricebox {
    width: 128px;
    height: 50px;
    border-width: 2.5px;
    border-radius: 25px;
  }

  .ta-bar__price {
    font-size: 32px;
    -webkit-text-stroke-width: 0.8px;
    text-shadow: -0.6px -0.6px 0 #fff, 1px 1px 0 #000;
  }

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

  .ta-bar__label {
    font-size: 16px;
  }

  .ta-bar__clock {
    margin-top: 0;
    font-size: 26px;
  }
}

@media (max-width: 380px) {
  .ta-bar__deco--right {
    width: 88px;
    right: -54px;
  }

  .ta-bar__inner {
    column-gap: 10px;
  }

  .ta-bar__bf {
    width: 100px;
  }

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

  .ta-bar__price {
    font-size: 28px;
  }

  .ta-bar__label {
    font-size: 14px;
  }

  .ta-bar__clock {
    font-size: 23px;
  }
}

/* Tyne: the BLACK FRIDAY lettering column is mobile-only, so on desktop the code sits under the clock */
.ta-bar .bfbar-textcol { display: none; }
.ta-bar .bfbar-code--timer { margin-top: calc(8 * var(--u)); font-size: calc(13 * var(--u)); font-family: "Poppins", Arial, sans-serif; }
@media (min-width: 768px) {
  .ta-bar .ta-bar__label { font-size: calc(26 * var(--u)); }
  .ta-bar .ta-bar__clock { margin-top: calc(6 * var(--u)); font-size: calc(42 * var(--u)); }
}
@media (max-width: 767px) {
  .ta-bar .bfbar-textcol { display: inline-flex; }
  .ta-bar .bfbar-code--timer { display: none; }
}

/* ==========================================================================
   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; }
}
