/* Black Friday code button. Works on light plan cards, the dark featured card
   and the dark pack pages. Colours stay inside the site palette: ink and amber. */
.bf-offer {
  --bf-ink: #0b0c16;
  --bf-gold: #f6b84a;
  --bf-text: rgba(16, 17, 26, 0.62);
  --bf-strong: #10111a;
  container-type: inline-size;
  margin: -6px 0 20px;
  display: grid;
  gap: 7px;
  font-style: normal;
}

.bf-offer--dark,
.bf-offer--hero,
.bf-offer--summary {
  --bf-text: rgba(236, 236, 245, 0.6);
  --bf-strong: #fbfbff;
}

.bf-offer--hero { margin: 18px 0 0; max-width: 400px; }
.bf-offer--summary { margin: 4px 0 14px; width: 100%; text-align: left; }

.bf-offer-button {
  width: 100%;
  padding: 8px 8px 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #fbfbff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(246, 184, 74, 0.32);
  border-radius: 16px;
  background:
    radial-gradient(130% 160% at 0% 0%, rgba(246, 184, 74, 0.18), transparent 58%),
    var(--bf-ink);
  box-shadow: 0 12px 28px rgba(8, 9, 18, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), border-color 220ms ease, box-shadow 220ms ease;
}

.bf-offer--dark .bf-offer-button,
.bf-offer--hero .bf-offer-button,
.bf-offer--summary .bf-offer-button {
  background:
    radial-gradient(130% 160% at 0% 0%, rgba(246, 184, 74, 0.2), transparent 58%),
    rgba(0, 0, 0, 0.4);
}

.bf-offer-button:hover {
  transform: translateY(-1px);
  border-color: rgba(246, 184, 74, 0.62);
  box-shadow: 0 16px 34px rgba(8, 9, 18, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.bf-offer-button:focus-visible { outline: 2px solid var(--bf-gold); outline-offset: 3px; }

.bf-offer-label { display: grid; gap: 2px; line-height: 1; flex: none; }

.bf-offer-tag {
  color: rgba(251, 251, 255, 0.62);
  font-size: 8.5px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bf-offer-pct {
  color: var(--bf-gold);
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bf-offer-code {
  min-width: 0;
  height: 36px;
  padding: 0 3px 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px dashed rgba(246, 184, 74, 0.5);
  border-radius: 11px;
  background: rgba(246, 184, 74, 0.1);
}

.bf-offer-code code {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-overflow: ellipsis;
  user-select: all;
}

.bf-offer-icon {
  position: relative;
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--bf-ink);
  background: var(--bf-gold);
  border-radius: 8px;
  transition: background 200ms ease;
}

.bf-offer-icon svg {
  position: absolute;
  width: 16px;
  height: 16px;
  transition: opacity 160ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.bf-i-done { opacity: 0; transform: scale(0.6); }
.bf-offer.is-copied .bf-offer-icon { background: #37d996; }
.bf-offer.is-copied .bf-i-copy { opacity: 0; transform: scale(0.6); }
.bf-offer.is-copied .bf-i-done { opacity: 1; transform: none; }

/* Narrow plan cards: the code chip takes its own full-width row. */
@container (max-width: 250px) {
  .bf-offer-button { flex-wrap: wrap; row-gap: 8px; padding: 10px; }
  .bf-offer-label { grid-auto-flow: column; align-items: baseline; gap: 8px; }
  .bf-offer-code { width: 100%; justify-content: space-between; }
}

.bf-offer-price,
.bf-offer-fine {
  margin: 0;
  color: var(--bf-text);
  font-size: 11.5px;
  line-height: 1.45;
}

.bf-offer-price strong {
  color: var(--bf-strong);
  font-size: 14px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.bf-offer-fine { font-size: 10.5px; }

.bf-offer-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .bf-offer-button, .bf-offer-icon svg { transition: none; }
  .bf-offer-button:hover { transform: none; }
}

@media (forced-colors: active) {
  .bf-offer-button, .bf-offer-code, .bf-offer-icon { border: 1px solid CanvasText; }
}

/* v2.5 round 3: homepage plan cards. The discount sits with the price,
   the code is a quiet ticket right above the button. */
.plan-card.has-bf .plan-price { flex-wrap: wrap; row-gap: 10px; }
.bf-deal {
  flex-basis: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 9px;
  color: rgba(16, 17, 26, 0.56);
  font-size: 11.5px;
  line-height: 1.2;
}
.bf-deal-pct {
  padding: 4px 7px 3px;
  color: #7a4a00;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: #fbeacb;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}
.bf-deal strong { color: #10111a; font-size: 15px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.is-featured .bf-deal { color: rgba(236, 236, 245, 0.56); }
.is-featured .bf-deal strong { color: #fbfbff; }
.is-featured .bf-deal-pct { color: #1a1204; background: #f6b84a; }

.bf-ticket { container-type: inline-size; margin: 0 0 10px; display: grid; gap: 6px; }
.bf-ticket-button {
  width: 100%;
  padding: 9px 9px 9px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #10111a;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border: 1px dashed rgba(16, 17, 26, 0.22);
  border-radius: 12px;
  background: rgba(16, 17, 26, 0.025);
  transition: border-color 200ms ease, background 200ms ease;
}
.bf-ticket-button:hover { border-color: rgba(16, 17, 26, 0.45); background: rgba(16, 17, 26, 0.045); }
.bf-ticket-button:focus-visible { outline: 2px solid #f6b84a; outline-offset: 3px; }
.bf-ticket-text { min-width: 0; display: grid; gap: 3px; line-height: 1.1; }
.bf-ticket-text small { color: rgba(16, 17, 26, 0.5); font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.bf-ticket-text code { overflow: hidden; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13.5px; font-weight: 700; letter-spacing: 0.05em; white-space: nowrap; text-overflow: ellipsis; user-select: all; }
.bf-ticket-icon {
  position: relative; width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  color: #10111a; border: 1px solid rgba(16, 17, 26, 0.14); border-radius: 9px; background: #fff;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.bf-ticket-icon svg { position: absolute; width: 15px; height: 15px; transition: opacity 160ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1); }
.bf-ticket-hint { margin: 0; color: rgba(16, 17, 26, 0.45); font-size: 10.5px; line-height: 1.3; text-align: center; }
.bf-ticket.is-copied .bf-ticket-icon { color: #fff; background: #1f9d68; border-color: #1f9d68; }
.bf-ticket.is-copied .bf-i-copy { opacity: 0; transform: scale(0.6); }
.bf-ticket.is-copied .bf-i-done { opacity: 1; transform: none; }

.bf-ticket--dark .bf-ticket-button,
.bf-ticket--hero .bf-ticket-button { color: #fbfbff; border-color: rgba(246, 184, 74, 0.38); background: rgba(246, 184, 74, 0.06); }
.bf-ticket--dark .bf-ticket-button:hover,
.bf-ticket--hero .bf-ticket-button:hover { border-color: rgba(246, 184, 74, 0.7); background: rgba(246, 184, 74, 0.1); }
.bf-ticket--dark .bf-ticket-text small,
.bf-ticket--hero .bf-ticket-text small { color: rgba(246, 184, 74, 0.85); }
.bf-ticket--dark .bf-ticket-icon,
.bf-ticket--hero .bf-ticket-icon { color: #1a1204; border-color: transparent; background: #f6b84a; }
.bf-ticket--dark .bf-ticket-hint,
.bf-ticket--hero .bf-ticket-hint { color: rgba(236, 236, 245, 0.48); }
.bf-ticket--hero { max-width: 360px; margin: 16px 0 0; }
.bf-ticket--hero .bf-ticket-hint { text-align: left; }

@media (prefers-reduced-motion: reduce) { .bf-ticket-button, .bf-ticket-icon svg { transition: none; } }
@media (forced-colors: active) { .bf-ticket-button, .bf-ticket-icon { border: 1px solid CanvasText; } }
.pk-price .bf-deal { color: rgba(236, 236, 245, 0.6); font-size: 13px; }
.pk-price .bf-deal strong { color: #fbfbff; font-size: 17px; }
.pk-price .bf-deal-pct { color: #1a1204; background: #f6b84a; }
