/* Black Friday hub. Uses the site's theme variables (style.css / light.css), so dark and light both work.
   The deals table deliberately reuses the homepage table's styling (table, th, td, .badge, .perf-score,
   .quick-links, .sortbar): only what the homepage does not have is defined here. */

.bf-page { width: 100%; min-width: 0; max-width: 100%; }
#main:has(> .bf-page) { min-width: 0; }

/* ── Header: the title, and the countdown where the eye lands ────────── */
.bf-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px 28px; margin: 0 0 14px; padding: 10px 0 0; }
.bf-hero-main { min-width: 0; }
.bf-hero-side { display: contents; }   /* the countdown sits beside the headline, the alert card runs under both */
.bf-alertcard { grid-column: 1 / -1; padding: 10px 14px 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg2); }
.bf-alert-title { margin: 0 0 4px; font-weight: 700; font-size: .95rem; }
.bf-alertcard .price-alert { margin: 0; padding: 0; border: 0; background: none; }
.bf-alertcard .price-alert-head { display: none; }   /* the card's own title says it; the fine print stays below the form */
.bf-alertcard .price-alert-bf { margin-top: 6px; }
.bf-status { margin: 0 0 4px; color: var(--green); font-weight: 600; font-size: .85rem; line-height: 1.4; }
.bf-hero h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 2.1rem); line-height: 1.15; }

/* The boxes have a fixed size, so the numbers changing never moves the page. */
.bf-countdown {
  flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; width: 300px; max-width: 100%;
  padding: 10px 12px; background: var(--bg2); border: 1px solid var(--active-border); border-radius: 12px;
}
.bf-cd-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text2); }
.bf-cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.bf-cd-grid > div { padding: 7px 2px 5px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.bf-cd-grid b { display: block; font-size: 1.95rem; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--green); }
.bf-cd-grid small { display: block; margin-top: 4px; font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); }

.bf-about { margin: 0 0 18px; color: var(--text2); font-size: .88rem; }
.bf-about summary { cursor: pointer; color: var(--text3); width: fit-content; }
.bf-about summary:hover { color: var(--link); }
.bf-about p { margin: 6px 0 0; max-width: 70ch; }
.bf-dev { margin: 0 0 12px; padding: 8px 12px; border: 1px dashed var(--border); border-radius: 8px; color: var(--text2); font-size: .85rem; }

/* ── Sections ───────────────────────────────────────────────────────── */
.bf-section { margin: 0 0 32px; scroll-margin-top: 80px; }
.bf-section h2 { margin: 0 0 6px; }
.bf-meta-line { margin: 0 0 12px; color: var(--text3); font-size: .82rem; }
.bf-compliance { margin-top: 10px; font-size: .78rem; color: var(--text3); }

/* ── Filter row (the homepage's Browse row) and sort bar ─────────────── */
.bf-toolbar { margin: 0 0 4px; }
.bf-pill {
  color: var(--link); background: var(--bg3); border: 1px solid var(--border); border-radius: 3px;
  padding: 2px 6px; font: inherit; line-height: 1.5; white-space: nowrap; cursor: pointer; transition: background .15s;
}
.bf-pill:hover { background: var(--bg2); text-decoration: underline; }
.bf-pill.is-on { background: var(--active-bg); border-color: var(--active-border); font-weight: 600; }
.bf-sortbar { position: static; flex-wrap: wrap; row-gap: 6px; }
.bf-sortbar .searchbar { margin-left: 0; }
.bf-input {
  padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg3);
  color: var(--text2); font-family: var(--mono); font-size: 11px; line-height: 1.4; cursor: pointer;
}
.sortbar-btn[data-dir="asc"]::after { content: " ↑"; }
.sortbar-btn[data-dir="desc"]::after { content: " ↓"; }
.bf-reset { color: var(--link); }
.bf-none { margin: 14px 0; color: var(--text2); }
.bf-morewrap { margin: 10px 0 0; text-align: center; }
.bf-more { padding: 6px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg3); color: var(--text2); font-family: var(--mono); font-size: 11px; cursor: pointer; }
.bf-more:hover { border-color: var(--border-bright); color: var(--text); }

/* ── The table: the site's own look, plus what it doesn't have ───────── */
.bf-table-wrap { overflow-x: auto; }
.bf-table { width: 100%; }
.bf-table tr[hidden] { display: none; }
.bf-table th, .bf-table td { padding-left: 9px; padding-right: 9px; }
.bf-usual-cell { color: var(--text3); }
.bf-trend { padding-top: 3px; padding-bottom: 3px; }
.bf-spark { display: block; color: var(--green); }
.bf-linkbtn {
  color: var(--link); background: var(--bg3); border: 1px solid var(--border); border-radius: 3px;
  padding: 2px 6px; font-size: 11px; white-space: nowrap; text-decoration: none;
}
.bf-linkbtn:hover { background: var(--bg2); text-decoration: underline; }
.bf-buy {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius); background: var(--btn-bg);
  color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; text-decoration: none;
}
.bf-buy-short { display: none; }
.bf-buy:hover { background: var(--btn-bg-hover); color: #fff; text-decoration: none; }
.bf-card-name { font-weight: 600; }
.bf-card-meta { display: block; margin-top: 2px; font-size: .75rem; color: var(--text3); }

.bf-th { padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.bf-th:hover { color: var(--link); }
.bf-th-arrow::after { content: " ↕"; opacity: .35; }
th[aria-sort="descending"] .bf-th-arrow::after { content: " ▼"; opacity: 1; color: var(--link); }
th[aria-sort="ascending"] .bf-th-arrow::after { content: " ▲"; opacity: 1; color: var(--link); }

.bf-verdict { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; border: 1px solid currentColor; }
.bf-verdict-real_deal { color: var(--green); }
.bf-verdict-good_price { color: var(--link); }
.bf-verdict-normal, .bf-verdict-insufficient_data { color: var(--text3); }
.bf-verdict-not_a_deal, .bf-verdict-fake_discount { color: var(--red); }

.bf-used { margin-top: 22px; }
.bf-used summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

/* ── Budgets, fake discounts, related ───────────────────────────────── */
.bf-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.bf-tier { padding: 12px 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; }
.bf-tier h3 { margin: 0 0 8px; font-size: 1rem; }
.bf-tier ol { margin: 0 0 8px; padding-left: 18px; }
.bf-tier li { margin: 3px 0; }
.bf-tier-price { float: right; font-variant-numeric: tabular-nums; color: var(--text2); }
.bf-tier-more { font-size: .85rem; }

.bf-fakes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.bf-fake { padding: 12px 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; }
.bf-fake h3 { margin: 0 0 8px; font-size: 1rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bf-fake dl { margin: 0 0 10px; display: grid; gap: 4px; }
.bf-fake dl div { display: flex; justify-content: space-between; gap: 12px; }
.bf-fake dt { color: var(--text3); font-size: .85rem; }
.bf-fake dd { margin: 0; font-variant-numeric: tabular-nums; }
.bf-fake s { color: var(--text3); }

.bf-links { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 0 0 14px; }

/* ── Phones: the countdown is full width, a row becomes a short card ── */
@media (max-width: 720px) {
  .bf-hero { gap: 10px; grid-template-columns: minmax(0, 1fr); }
  .bf-alertcard { padding: 0; }
  .bf-alert-title { display: none; }
  .bf-countdown { width: 100%; }
  .bf-cd-grid b { font-size: 1.6rem; }

  .bf-filterbar { flex-wrap: nowrap; overflow-x: auto; }
  .bf-sortbar .searchbar { flex: 1 1 100%; }
  .bf-sortbar .searchbar input[type="search"] { width: 100%; }

  .bf-table, .bf-table tbody, .bf-table tr, .bf-table td { display: block; }
  .bf-table thead { display: none; }
  .bf-table tr {
    display: grid; grid-template-columns: 9.6rem minmax(0, 1fr) auto; grid-template-areas: "deal model price" "list buy buy";
    gap: 8px 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--border);
  }
  .bf-table td { padding: 0; border: 0; max-width: none; }
  .bf-table td.score-cell { grid-area: deal; white-space: normal; }
  /* The Deal pill is the percentage with its label under it: the labels ("vs other listings", "Best value under $300") are longer than the old "Save $20". */
  .bf-table td.score-cell .perf-score { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
  .bf-table td.score-cell .val-label { white-space: normal; line-height: 1.25; }
  .bf-table td.model-name { grid-area: model; white-space: normal; overflow: visible; font-size: .9rem; }
  .bf-table td.bf-price-cell { grid-area: price; font-size: 13px; }
  .bf-table td.bf-listings { grid-area: list; }
  .bf-table td.product-link { grid-area: buy; }
  .bf-table .bf-buy-long { display: none; }
  .bf-table .bf-buy-short { display: inline; }
  .bf-table td.product-link .bf-buy { display: block; text-align: center; padding: 8px 10px; font-size: 12px; }
  .bf-table td.bf-m-hide { display: none; }
  .bf-table-stale tr { grid-template-columns: 1fr auto; grid-template-areas: "model buy"; }
  .bf-table-stale td.product-link .bf-buy { display: inline-block; }
}
