/* ==========================================================================
   hp-offcanvas.css — "My Hottest Links" off-canvas panel
   Desktop: 380px slide-in from right.  Mobile (≤600px): bottom-sheet.

   Thumb-zone hierarchy:
     Creator banner   → visual anchor — landscape panel_photo
     Editorial links  → orientation layer — where can I go?
     ── thumb-zone breath gap + gradient divider ──
     Featured btn     → site's standard hp-btn--primary (gold)
     Ghost btn        → site's standard hp-btn--secondary

   HORIZON-20261001-023: every colour the panel painted as a literal or a surface token is now an opt-in
   --hp-offcanvas-* / --hp-links-btn-* token whose fallback is EXACTLY the value painted before, so no tenant changes
   until a colour pack sets them. Why: the panel was lifted from the dark themes, so its link names are white on
   var(--hp-bg-surface); on a LIGHT skin that surface is pale and the links vanish (memory
   feedback-links-drawer-is-dark-skin-only). scarlet-ink sets a black panel, as one creator's old popup was.
   ========================================================================== */

/* ── Backdrop ────────────────────────────────────────────── */

.hp-offcanvas-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  z-index: 1099;
}

body.hp-offcanvas-open .hp-offcanvas-backdrop {
  opacity: 1;
  visibility: visible;
}

body.hp-offcanvas-open {
  overflow: hidden;
}

/* ── Panel ───────────────────────────────────────────────── */
/* HORIZON-20261005-043 (Alex approved the mock 2026-10-07, "consider the Thumb Zone design"): her name and tagline on
   the photo; socials and the editorial stack in one scrolling body; the thumb zone (featured, then ghost) PINNED to the
   bottom edge with clear room above it. Every colour still comes from the site's tokens. */

.hp-offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100vw;
  background: var(--hp-offcanvas-bg, var(--hp-bg-surface));
  border-left: 1px solid var(--hp-offcanvas-border, var(--hp-border));
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
  z-index: 1100;
  /* The panel's own ink. The panel ground is dark on every skin, including light ones, so the words come from the
     panel tokens and never from the page's --hp-text (dark on a light skin). Muted ink is mixed from ink and ground,
     so it stays legible against whatever ground the skin sets. */
  --hp-oc-ink: var(--hp-offcanvas-link, var(--hp-text, #fff));
  --hp-oc-mute: color-mix(in srgb, var(--hp-oc-ink) 80%, var(--hp-offcanvas-bg, var(--hp-bg-surface, #000)));
}

.hp-offcanvas.is-open {
  transform: translateX(0);
  visibility: visible;
}

.hp-offcanvas__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
}

/* ── Close button ────────────────────────────────────────── */

.hp-offcanvas__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  z-index: 10;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hp-offcanvas__close:hover {
  border-color: var(--hp-gold);
  color: var(--hp-gold);
  background: rgba(0, 0, 0, 0.65);
}

/* ── "Powered By" ────────────────────────────────────────── */

.hp-offcanvas__powered {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 6px 20px 16px;
}

.hp-offcanvas__powered__label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hp-offcanvas-label, var(--hp-text-subtle, var(--hp-gold)));
}

.hp-offcanvas__powered a {
  display: flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.hp-offcanvas__powered a:hover {
  opacity: 1;
}

.hp-offcanvas__powered .hp-ah-logo {
  width: 160px;
  opacity: 1;
}

/* ── Creator photo, with her name and tagline on it ──────── */

.hp-offcanvas__banner {
  position: relative;
  flex-shrink: 0;
  width: 100%;
  height: clamp(160px, 23vh, 230px);
  overflow: hidden;
}

.hp-offcanvas__banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.hp-offcanvas__banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.12) 0%, transparent 32%, color-mix(in srgb, var(--hp-offcanvas-bg, var(--hp-bg-surface)) 88%, transparent) 84%, var(--hp-offcanvas-bg, var(--hp-bg-surface)) 100%);
  pointer-events: none;
}

.hp-offcanvas__banner--placeholder {
  height: 56px;
}
.hp-offcanvas__banner--placeholder::after { display: none; }

.hp-offcanvas__creator {
  position: absolute;
  left: 24px;
  right: 64px;
  bottom: 16px;
  z-index: 2;
}
.hp-offcanvas__creator--plain { position: static; padding: 0 24px; }

.hp-offcanvas__name {
  margin: 0;
  font-family: var(--hp-font-display, inherit);
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--hp-oc-ink);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.hp-offcanvas__tagline {
  margin: 6px 0 0;
  font-family: var(--hp-font-display, inherit);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--hp-oc-mute);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* ── Social icons ────────────────────────────────────────── */

.hp-offcanvas__social {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 0;
}

.hp-offcanvas__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--hp-offcanvas-chip-bg, color-mix(in srgb, var(--hp-oc-ink) 7%, transparent));
  border: 1px solid var(--hp-offcanvas-chip-border, color-mix(in srgb, var(--hp-oc-ink) 20%, transparent));
  color: var(--hp-offcanvas-chip-fg, var(--hp-oc-ink));
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.hp-offcanvas__social-link:hover {
  border-color: var(--hp-gold);
  color: var(--hp-gold);
}

/* ── Section label ───────────────────────────────────────── */

.hp-offcanvas__label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 22px 24px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hp-offcanvas-label, var(--hp-oc-mute));
}
.hp-offcanvas__label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--hp-oc-ink) 22%, transparent), transparent);
}

/* ── Rows: the editorial stack and the two thumb-zone cards share one shape ── */

.hp-offcanvas__links {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0 24px;
}

.hp-offcanvas__link-item { margin: 0; }

.hp-offcanvas__link,
.hp-offcanvas__cta {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 14px;
  border-radius: 14px;
  text-decoration: none !important;
  font-family: var(--hp-offcanvas-link-font, inherit);
  text-transform: none;
  letter-spacing: normal;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.hp-offcanvas__link {
  color: var(--hp-oc-ink);
  background: color-mix(in srgb, var(--hp-oc-ink) 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--hp-oc-ink) 14%, transparent);
}
.hp-offcanvas__link:hover {
  color: var(--hp-oc-ink);
  border-color: color-mix(in srgb, var(--hp-gold) 70%, transparent);
  background: color-mix(in srgb, var(--hp-gold) 10%, transparent);
}

.hp-offcanvas__row-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--hp-oc-ink) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--hp-oc-ink) 14%, transparent);
}
.hp-offcanvas__row-icon svg { width: 22px; height: 22px; fill: currentColor; }
.hp-offcanvas__row-icon svg[fill="none"] { fill: none; stroke: currentColor; }

.hp-offcanvas__row-text { display: flex; flex-direction: column; min-width: 0; }
.hp-offcanvas__row-name { font-size: 1rem; font-weight: 600; line-height: 1.25; }
.hp-offcanvas__row-host {
  font-size: 0.8125rem;
  line-height: 1.3;
  color: var(--hp-oc-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-offcanvas__row-go {
  flex: none;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--hp-oc-ink) 26%, transparent);
}
.hp-offcanvas__row-go svg { width: 14px; height: 14px; }

/* ── Thumb zone: pinned to the bottom, with room above it (Alex: "more spacing between the top 4 and bottom two") ── */

.hp-offcanvas__ctas {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 24px 12px;
  border-top: 1px solid color-mix(in srgb, var(--hp-oc-ink) 10%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--hp-oc-ink) 3%, transparent), transparent 60%);
}

/* Featured: the primary tap. WHITE words on a DEEPENED accent, never the light accent itself, so the words clear
   4.5:1 across the whole fade (Alex: "make sure the fade on the pink is not too light"). The brightest stop is the
   accent mixed 62% with black: about 5.7:1 on a magenta accent, about 5:1 on a gold one. */
.hp-offcanvas__cta--featured {
  min-height: 70px;
  padding: 13px 16px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(120deg, color-mix(in srgb, var(--hp-gold) 62%, #000) 0%, color-mix(in srgb, var(--hp-gold) 46%, #1e0b3a) 100%);
  border: 1px solid color-mix(in srgb, var(--hp-gold) 70%, #fff);
  box-shadow: 0 14px 40px color-mix(in srgb, var(--hp-gold) 32%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.hp-offcanvas__cta--featured:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 18px 48px color-mix(in srgb, var(--hp-gold) 42%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.hp-offcanvas__cta--featured .hp-offcanvas__row-icon { background: rgba(0, 0, 0, 0.28); border-color: rgba(255, 255, 255, 0.25); color: #fff; }
.hp-offcanvas__cta--featured .hp-offcanvas__row-name { font-size: 1.0625rem; color: #fff; }
.hp-offcanvas__cta--featured .hp-offcanvas__row-host { color: #fff; }
.hp-offcanvas__cta--featured .hp-offcanvas__row-go { border-color: rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.12); color: #fff; }

/* Ghost: the second-easiest reach, outlined in the text colour. */
.hp-offcanvas__cta--ghost {
  color: var(--hp-oc-ink);
  background: color-mix(in srgb, var(--hp-oc-ink) 4%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--hp-oc-ink) 55%, transparent);
}
.hp-offcanvas__cta--ghost:hover {
  color: var(--hp-oc-ink);
  border-color: var(--hp-gold);
  background: color-mix(in srgb, var(--hp-gold) 10%, transparent);
}

.hp-offcanvas__link:focus-visible,
.hp-offcanvas__cta:focus-visible { outline: 3px solid var(--hp-gold); outline-offset: 2px; }

/* ── Floating trigger button ─────────────────────────────── */

.hp-hottest-links-btn {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 7px;
  /* 44px tall and a 12px label (HORIZON-20260924-001, D9): it measured 114x37
     with an 11.5px label on every site that shows it. */
  min-height: 44px;
  padding: 9px 16px 9px 12px;
  background: var(--hp-links-btn-bg, color-mix(in srgb, var(--hp-bg-surface) 92%, transparent));
  border: 1px solid var(--hp-links-btn-border, color-mix(in srgb, var(--hp-gold) 42%, transparent));
  border-radius: 999px;
  color: var(--hp-links-btn-fg, var(--hp-gold));
  font-family: var(--hp-links-btn-font, var(--hp-font-body));
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.2s, border-color 0.2s;
}

.hp-hottest-links-btn.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hp-hottest-links-btn:hover {
  /* It is a <button>: without a colour here GeneratePress's generic button:hover turns the
     label white (Core 1.41.9, HORIZON-20260926-070). Keep the pill's own ink on hover. */
  color: var(--hp-links-btn-hover-fg, var(--hp-gold));
  background: var(--hp-links-btn-hover-bg, color-mix(in srgb, var(--hp-gold) 8%, var(--hp-bg-surface)));
  border-color: var(--hp-links-btn-hover-border, color-mix(in srgb, var(--hp-gold) 65%, transparent));
}

body.hp-offcanvas-open .hp-hottest-links-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

/* Sit above sticky subscribe bar when it's visible */
body.hp-sub-bar-active .hp-hottest-links-btn {
  bottom: calc(var(--hp-sub-bar-h, 0px) + 16px);
}

/* ── Short desktop viewports (laptops, smaller monitors) ─── */

@media (max-height: 820px) and (min-width: 601px) {
  .hp-offcanvas__banner        { height: 180px; }
  .hp-offcanvas__name          { font-size: 2.2rem; }
  .hp-offcanvas__label         { padding-top: 16px; }
  .hp-offcanvas__link          { min-height: 54px; padding: 8px 14px; }
  .hp-offcanvas__ctas          { padding: 24px 24px 8px; gap: 10px; }
  .hp-offcanvas__cta--featured { min-height: 62px; }
}

/* ── Mobile: bottom sheet. The thumb zone sits at the bottom edge, where the thumb rests. ── */

@media (max-width: 600px) {
  .hp-offcanvas {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 90svh;
    border-left: none;
    border-top: 1px solid var(--hp-offcanvas-border, var(--hp-border));
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.6);
    transform: translateY(110%);
  }

  .hp-offcanvas.is-open {
    transform: translateY(0);
  }

  .hp-offcanvas__close {
    top: 22px;
    right: 22px;
    width: 34px;
    height: 34px;
  }

  /* Pull-bar */
  .hp-offcanvas::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.35);
    z-index: 10;
  }

  .hp-offcanvas__body { padding-bottom: 18px; }

  .hp-offcanvas__banner {
    width: auto;
    height: 136px;
    margin: 16px 12px 0;
    border-radius: 14px;
  }

  .hp-offcanvas__creator { left: 16px; right: 56px; bottom: 12px; }
  .hp-offcanvas__name    { font-size: 1.85rem; }
  .hp-offcanvas__tagline { font-size: 0.875rem; margin-top: 3px; }

  .hp-offcanvas__social   { padding: 12px 16px 0; gap: 8px; }
  .hp-offcanvas__label    { padding: 16px 16px 10px; }
  .hp-offcanvas__links    { padding: 0 16px; gap: 8px; }
  .hp-offcanvas__link     { min-height: 54px; padding: 7px 12px; }
  .hp-offcanvas__row-icon { width: 36px; height: 36px; }

  .hp-offcanvas__ctas {
    padding: 24px 16px 10px;
    gap: 10px;
  }

  .hp-offcanvas__powered { padding: 4px 16px max(14px, env(safe-area-inset-bottom, 0px)); }

  .hp-hottest-links-btn {
    bottom: 16px;
    right: 16px;
  }
}
