/* ============================================================
   XaJa — Black Friday 2026 (bjælke, tæller og formularfelt)
   Vises kun 1.–30. november 2026 (styres af js/bf.js).
   ============================================================ */

:root {
  --bf-ink: #08090d;
  --bf-ink-2: #15171f;
  --bf-line: rgba(255, 255, 255, 0.12);
  --bf-soft: rgba(255, 255, 255, 0.68);
  --bf-warm: #ffc35a;
  --bf-h: 0px;
}

/* ---------- Plads til bjælken ---------- */
html.bf-on { scroll-padding-top: calc(var(--bf-h) + 76px); }
html.bf-on .nav { top: var(--bf-h); }
html.bf-on .hero { padding-top: calc(140px + var(--bf-h)); }
html.bf-on .page-hero { padding-top: calc(150px + var(--bf-h)); }
@media (max-width: 960px) {
  html.bf-on .hero { padding-top: calc(120px + var(--bf-h)); }
}

/* ---------- Bjælken ---------- */
.bf-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 101;
  display: block;
  color: #fff;
  background:
    radial-gradient(120% 220% at 0% 0%, rgba(33, 201, 154, 0.16), transparent 45%),
    linear-gradient(90deg, var(--bf-ink), var(--bf-ink-2) 50%, var(--bf-ink));
  border-bottom: 1px solid var(--bf-line);
  font-family: var(--font-body);
  transform: translateY(-100%);
  transition: transform 0.45s cubic-bezier(.2, .8, .2, 1);
  overflow: hidden;
}
.bf-bar.vis { transform: none; }
.bf-bar::after {               /* et stille lysglimt, ligesom glas */
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -40%;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  animation: bf-glimt 7s ease-in-out 1.2s infinite;
  pointer-events: none;
}
@keyframes bf-glimt { 0%, 70% { left: -40%; } 100% { left: 130%; } }

.bf-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 9px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.88rem;
  line-height: 1.3;
}
.bf-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.bf-label {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
}
.bf-pct {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--bf-ink);
  background: linear-gradient(135deg, var(--mint), #7ff0cf);
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.bf-tekst { color: var(--bf-soft); white-space: nowrap; }
.bf-tekst strong { color: #fff; font-weight: 600; }

.bf-taeller {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  white-space: nowrap;
}
.bf-meter {
  position: relative;
  width: 120px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  flex-shrink: 0;
}
.bf-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), #8af3d4);
  transition: width 1s cubic-bezier(.2, .8, .2, 1);
}
.bf-count { font-variant-numeric: tabular-nums; color: var(--bf-soft); }
.bf-count b { color: #fff; font-weight: 700; font-family: var(--font-head); }
.bf-slut { color: var(--bf-soft); white-space: nowrap; }

.bf-pil {
  display: inline-flex;
  width: 26px; height: 26px;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.bf-pil svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bf-bar:hover .bf-pil { background: var(--mint); transform: translateX(2px); }
.bf-bar:hover .bf-pil svg { stroke: var(--bf-ink); }
.bf-bar:focus-visible { outline: 2px solid var(--mint); outline-offset: -3px; }

/* Få pladser tilbage: varm farve. Udsolgt: dæmpet. */
.bf-faa .bf-meter-fill, .bf-form.bf-faa .bf-meter-fill { background: linear-gradient(90deg, var(--bf-warm), #ffdf9e); }
.bf-faa .bf-count b { color: var(--bf-warm); }
.bf-udsolgt .bf-meter-fill { background: rgba(255, 255, 255, 0.45); }

.bf-puls { animation: bf-puls 0.9s ease; }
@keyframes bf-puls { 0% { opacity: .4; } 100% { opacity: 1; } }

/* Mellemstore skærme: skjul det mindst vigtige først */
@media (max-width: 1120px) { .bf-slut { display: none; } }
@media (max-width: 900px)  { .bf-tekst { display: none; } }

/* Mobil: én kompakt linje, hele bjælken er knappen */
@media (max-width: 640px) {
  .bf-inner { padding: 9px 16px; gap: 10px; font-size: 0.82rem; }
  .bf-label { font-size: 0.68rem; letter-spacing: 0.12em; }
  .bf-pct { font-size: 0.74rem; padding: 2px 7px; }
  .bf-meter { width: 46px; height: 5px; }
  .bf-taeller { gap: 8px; }
  .bf-pil { width: 22px; height: 22px; }
  .bf-pil svg { width: 12px; height: 12px; }
}
@media (max-width: 370px) { .bf-meter { display: none; } }

/* ---------- Kampagneboks i kontaktformularen ---------- */
.bf-form {
  position: relative;
  margin: 0 0 24px;
  padding: 20px 20px 16px;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(33, 201, 154, 0.22), transparent 55%),
    linear-gradient(160deg, var(--bf-ink-2), var(--bf-ink));
  box-shadow: 0 14px 34px rgba(8, 9, 13, 0.22);
  overflow: hidden;
}
.bf-form-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bf-form-titel {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 12px;
}
.bf-form .bf-taeller { margin: 0 0 14px; }
.bf-form .bf-meter { flex: 1; width: auto; height: 7px; }
.bf-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--bf-line);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.bf-check:hover { background: rgba(255, 255, 255, 0.11); }
.bf-check input { width: 19px; height: 19px; accent-color: var(--mint); flex-shrink: 0; }
.bf-check:has(input:checked) { border-color: rgba(33, 201, 154, 0.7); background: rgba(33, 201, 154, 0.12); }
.bf-check:has(input:disabled) { cursor: default; opacity: 0.6; }
.bf-fine { margin-top: 10px; font-size: 0.8rem; line-height: 1.5; color: var(--bf-soft); }
.bf-fine a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Takkesiden ---------- */
.bf-tak {
  max-width: 520px;
  margin: 0 auto 22px;
  padding: 16px 18px;
  border-radius: 14px;
  color: #fff;
  text-align: left;
  background: linear-gradient(160deg, var(--bf-ink-2), var(--bf-ink));
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.bf-tak .bf-pct { margin-top: 2px; }
.bf-tak p { margin: 0; color: var(--bf-soft); font-size: 0.95rem; }
.bf-tak strong { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .bf-bar, .bf-meter-fill { transition: none; }
  .bf-bar::after, .bf-puls { animation: none; }
}
