/* Flippique — Black Friday 2026 promo banner (17–30 Nov 2026).
   Sits directly below <nav class="nav">. Uses the live site's tokens from
   assets/site.css (--accent, --violet-on-card, --card-text …) with fallbacks,
   so it also works on a page without site.css. Mobile-first.
   Remove after 30 Nov: delete the <aside class="bf-banner"> markup and this file
   (bf-banner.js also hides it automatically from 1 Dec 2026, Malta time). */

.bf-banner {
  --bf-ink: #13111d;              /* the dark ink of the Flippique logo */
  --bf-text: var(--card-text, #f4f4f7);
  --bf-text-2: var(--card-text-2, #a8a8ba);
  --bf-violet: var(--violet-on-card, #a58cff);
  --bf-accent: var(--accent, #6257f5);
  --bf-accent-hover: var(--accent-hover, #7167ff);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: var(--bf-text);
  background:
    radial-gradient(60% 140% at 0% 0%, rgba(98, 87, 245, .38), transparent 60%),
    radial-gradient(50% 160% at 100% 100%, rgba(165, 140, 255, .26), transparent 62%),
    var(--bf-ink);
  border-bottom: 1px solid rgba(165, 140, 255, .28);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* Fun layer: little flipbook pages and sparkles scattered over the dark band. */
.bf-banner::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='120' viewBox='0 0 220 120'%3E%3Cg fill='none' stroke='%23a58cff' stroke-width='1.4' stroke-linejoin='round'%3E%3Cpath d='M18 22l14-4 3 18-14 4z' opacity='.55'/%3E%3Cpath d='M150 78l12 3-3 16-12-3z' opacity='.4'/%3E%3Cpath d='M96 14h11v15H96z' transform='rotate(14 101 21)' opacity='.35'/%3E%3C/g%3E%3Cg fill='%23c9bfff'%3E%3Cpath d='M70 70l2 6 6 2-6 2-2 6-2-6-6-2 6-2z' opacity='.55'/%3E%3Cpath d='M190 30l1.5 4 4 1.5-4 1.5-1.5 4-1.5-4-4-1.5 4-1.5z' opacity='.6'/%3E%3Ccircle cx='120' cy='100' r='1.6' opacity='.6'/%3E%3Ccircle cx='40' cy='96' r='1.2' opacity='.5'/%3E%3Ccircle cx='205' cy='96' r='1.4' opacity='.45'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 220px 120px;
  opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, #000, rgba(0,0,0,.35) 45%, rgba(0,0,0,.35) 55%, #000);
          mask-image: linear-gradient(90deg, #000, rgba(0,0,0,.35) 45%, rgba(0,0,0,.35) 55%, #000);
}

.bf-banner__inner {
  width: min(var(--max, 1160px), 100% - 40px);
  margin: 0 auto;
  padding: 18px 0;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: start;
  gap: 10px;
  position: relative;
}
/* Leave room for the × beside the first row only, so the rows below can use the full width. */
.bf-banner__meta { padding-right: 40px; }

.bf-banner__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.bf-banner__flag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  background: var(--bf-text); color: var(--bf-ink);
  font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}
.bf-banner__flag svg { width: 13px; height: 13px; fill: var(--bf-accent); }
.bf-banner__until {
  padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(165, 140, 255, .45);
  color: var(--bf-violet); font-size: 12.5px; font-weight: 650;
}

.bf-banner__offer { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.01em; line-height: 1.2; }
.bf-banner__pct {
  font-weight: 800; font-size: 1.15em; letter-spacing: -.02em;
  color: #c9bfff;
  background: linear-gradient(100deg, #ffffff 0%, #c9bfff 45%, var(--bf-violet) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bf-banner__price { display: block; margin-top: 4px; font-size: 14.5px; font-weight: 500; color: var(--bf-text-2); }
.bf-banner__price strong { color: var(--bf-text); font-weight: 700; }
.bf-banner__price s { text-decoration-color: var(--bf-violet); text-decoration-thickness: 1.5px; }

/* The code chip: dashed like a coupon, monospace so every letter is unambiguous. */
.bf-banner__code {
  display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 2px 0 0; padding: 5px 5px 5px 12px;
  border: 1.5px dashed rgba(165, 140, 255, .75);
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  max-width: 100%;
}
.bf-banner__label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bf-text-2); }
.bf-code {
  font: 700 16px/1 ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  letter-spacing: .06em; color: #fff;
  user-select: all; -webkit-user-select: all;
}
.bf-copy {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px; border: 0; border-radius: 7px;
  background: rgba(165, 140, 255, .2); color: #fff;
  font: inherit; font-size: 13px; font-weight: 650; cursor: pointer;
  transition: background .17s;
}
.bf-copy:hover { background: rgba(165, 140, 255, .34); }
.bf-copy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bf-copy.is-copied { background: var(--bf-accent); }

.bf-banner__cta.btn { height: 42px; padding: 0 18px; font-size: 15px; white-space: nowrap; }
.bf-banner__cta svg { width: 16px; height: 16px; }

.bf-banner__close {
  position: absolute; top: 14px; right: -8px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 9px; background: transparent; color: var(--bf-text-2);
  cursor: pointer; transition: background .17s, color .17s;
}
.bf-banner__close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.bf-banner__close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.bf-banner__close[hidden], .bf-copy[hidden] { display: none; }

.bf-banner :focus-visible { outline: 2px solid var(--bf-violet); outline-offset: 3px; }
.bf-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Mobile: the CTA spans the width so it is an easy tap. */
@media (max-width: 599px) {
  .bf-banner__extra { display: none; }
  .bf-banner__cta.btn { width: 100%; }
  .bf-banner__code { width: 100%; justify-content: space-between; }
}

/* Tablet: offer on the left, code + CTA on the right. */
@media (min-width: 600px) {
  .bf-banner__inner {
    grid-template-columns: 1fr auto;
    grid-template-areas: "meta meta" "offer offer" "code cta";
    align-items: center; column-gap: 20px;
  }
  .bf-banner__meta { grid-area: meta; }
  .bf-banner__offer { grid-area: offer; }
  .bf-banner__code { grid-area: code; justify-self: start; }
  .bf-banner__cta { grid-area: cta; }
}

/* Desktop: one row. */
@media (min-width: 1040px) {
  .bf-banner__inner {
    grid-template-columns: auto 1fr auto auto;
    grid-template-areas: "meta offer code cta";
    column-gap: 28px;
    padding-top: 14px; padding-bottom: 14px; padding-right: 44px;
  }
  .bf-banner__meta { flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 0; }
  .bf-banner__offer { font-size: 22px; }
  .bf-banner__close { top: 50%; translate: 0 -50%; }
}

/* Motion: one slow sheen over the code chip, only if the visitor is fine with motion. */
@media (prefers-reduced-motion: no-preference) {
  .bf-banner__code { position: relative; overflow: hidden; }
  .bf-banner__code::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .14) 50%, transparent 70%);
    translate: -120% 0;
    animation: bf-sheen 6s ease-in-out 1.2s infinite;
  }
  @keyframes bf-sheen { 0% { translate: -120% 0; } 30%, 100% { translate: 120% 0; } }
}
