/* ==========================================================================
   hp-links-panel-classic.css — the links panel's 'classic' look (tenant setting links_panel_style = 'classic',
   HORIZON-20261120-003). This is Core's hp-links-panel.css as it stood before 1.41.142 (76caadb85^), with ONE
   change: the panel sets its own text colour from the panel tokens (see .hp-offcanvas). Markup: src/Links/panel-classic.php.
   Loaded INSTEAD of hp-links-panel.css under the same handle, so the two files never meet on a page.

   "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 ───────────────────────────────────────────────── */

.hp-offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 100vw;
  background: var(--hp-offcanvas-bg, var(--hp-bg-surface));
  /* Kept from 1.41.142: the panel's ink comes from the panel tokens, never the page's --hp-text, which is dark on a
     light skin while the panel ground stays dark. The fallback is the rows' own pre-1.41.142 colour. */
  color: var(--hp-offcanvas-link, rgba(255, 255, 255, 0.88));
  border-left: 1px solid var(--hp-offcanvas-border, var(--hp-border));
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(105%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s;
  z-index: 1100;
}

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

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

.hp-offcanvas__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.85);
  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;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

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

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

.hp-offcanvas__powered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 24px 20px 32px;
  border-top: 1px solid var(--hp-offcanvas-rule-soft, rgba(255, 255, 255, 0.06));
}

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

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

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

/* Cancel the global .hp-ah-logo opacity so only the <a> controls brightness */
.hp-offcanvas__powered .hp-ah-logo {
  width: 160px;
  opacity: 1;
}

/* ── Creator banner photo ─────────────────────────────────── */

.hp-offcanvas__banner {
  flex-shrink: 0;
  width: 100%;
  height: clamp(160px, 30vh, 300px);
  overflow: hidden;
  margin-top: 0;
  position: relative;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

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

/* Gradient bridge — fades photo into panel background */
.hp-offcanvas__banner::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 28%;
  background: linear-gradient(to bottom, transparent 0%, var(--hp-offcanvas-bg, var(--hp-bg-surface)) 100%);
  pointer-events: none;
}

.hp-offcanvas__banner--placeholder {
  background: var(--hp-bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hp-gold);
}

/* ── Creator name block ───────────────────────────────────── */

.hp-offcanvas__creator {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 20px 14px;
}

.hp-offcanvas__name {
  font-family: var(--hp-font-display);
  font-size: 2.3rem;
  font-weight: 400;
  color: var(--hp-gold);
  margin: 0;
  line-height: 1.15;
  text-align: center;
}

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

.hp-offcanvas__social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px 22px;
}

.hp-offcanvas__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--hp-offcanvas-chip-bg, var(--hp-bg-elevated));
  border: 1px solid var(--hp-offcanvas-chip-border, var(--hp-border));
  color: var(--hp-offcanvas-chip-fg, var(--hp-text-muted));
  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);
}

/* ── Divider ─────────────────────────────────────────────── */

.hp-offcanvas__divider {
  height: 1px;
  background: var(--hp-offcanvas-rule, rgba(255, 255, 255, 0.18));
  margin: 0 20px;
  flex-shrink: 0;
}

/* ── Editorial link list (orientation layer) ─────────────── */

.hp-offcanvas__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-offcanvas__link-item {
  border-bottom: 1px solid var(--hp-offcanvas-rule-soft, rgba(255, 255, 255, 0.06));
}

.hp-offcanvas__link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 21px 20px;
  text-decoration: none;
  color: var(--hp-offcanvas-link, rgba(255, 255, 255, 0.88));
  font-family: var(--hp-offcanvas-link-font, inherit);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}

.hp-offcanvas__link:hover {
  color: var(--hp-offcanvas-link-hover, var(--hp-gold));
  background: rgba(255, 255, 255, 0.03);
}

/* The platform's logo beside the word (HORIZON-20261120-002, Alex 2026-11-22): inline, ~16px, 72% opacity, no tile.
   Only links to a known platform carry one, so rows without it stay exactly as before. */
.hp-offcanvas__link-logo {
  display: inline-flex;
  flex-shrink: 0;
  margin-right: 12px;
  opacity: 0.72;
  line-height: 0;
  vertical-align: middle;
}

/* Brand marks are filled shapes: hp-components.css styles every .hp-icon as an outline (fill:none, stroke), which
   draws them as hairlines and all but hides Fansly and Stripchat. Same override hp-mobile.css gives the social row. */
.hp-offcanvas__link-logo svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.hp-offcanvas__ctas .hp-btn {
  align-items: center;
}

/* ── Thumb-zone CTA section ──────────────────────────────── */

.hp-offcanvas__ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px 40px;
  position: relative;
}

/* Gradient divider + breathing room before the CTAs */
.hp-offcanvas__ctas::before {
  content: '';
  display: block;
  height: 1px;
  margin-bottom: clamp(0.88rem, 2.8vw, 1.2rem);
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--hp-gold) 32%, transparent) 20%,
    color-mix(in srgb, var(--hp-gold) 32%, transparent) 80%,
    transparent 100%
  );
}

/* Buttons use the site's global styles — just stretch to panel width */
.hp-offcanvas__ctas .hp-btn {
  width: 100%;
  justify-content: center;
}

/* ── 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: var(--hp-radius-pill, 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);
}

/* The trigger steps aside for what is under it (HORIZON-20261203-007). hp-links-panel.js picks the form: full pill,
   compact (the round link icon in the same corner) or yielded (faded out and untappable while a link, button or
   affiliate disclosure passes under the corner). It collapses toward its bottom-right corner, so the corner never
   moves. The same block is in both looks' stylesheets (hp-links-panel.css, hp-links-panel-classic.css). */
.hp-hottest-links-btn {
  transform-origin: 100% 100%;
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.2s, border-color 0.2s,
              padding 0.22s ease, gap 0.22s ease, visibility 0s;
}

.hp-hottest-links-btn > span {
  display: inline-block;
  max-width: 12em;
  overflow: hidden;
  white-space: nowrap;
  transition: max-width 0.22s ease, opacity 0.18s ease;
}

.hp-hottest-links-btn.is-compact {
  gap: 0;
  padding-left: 14.5px;
  padding-right: 14.5px;
}

.hp-hottest-links-btn.is-compact > span {
  max-width: 0;
  opacity: 0;
}

.hp-hottest-links-btn.is-visible.is-yielded {
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, padding 0.22s ease, gap 0.22s ease, visibility 0s linear 0.18s;
}

@media (prefers-reduced-motion: reduce) {
  .hp-hottest-links-btn,
  .hp-hottest-links-btn > span,
  .hp-hottest-links-btn.is-visible.is-yielded {
    transition: none;
  }
}

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

@media (max-height: 820px) and (min-width: 601px) {
  .hp-offcanvas__creator  { padding: 8px 20px 10px; }
  .hp-offcanvas__social   { padding: 0 20px 12px; }
  .hp-offcanvas__link     { padding: 14px 20px; }
  .hp-offcanvas__ctas     { padding: 0 20px 22px; gap: 8px; }
  .hp-offcanvas__powered  { padding: 16px 20px 20px; }
}

/* ── Mobile: bottom-sheet ────────────────────────────────── */

@media (max-width: 600px) {
  .hp-offcanvas {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 90svh;
    /* The sheet sits at bottom:0, so its LAST row lands against the screen
       edge / home indicator and reads as clipped at rest. Confirmed on a real
       iPhone 2026-08-29: the panel DOES scroll - it only looked cut off.
       NOTE: env(safe-area-inset-bottom) ALONE WOULD BE A NO-OP HERE: env()
       resolves to 0 unless the page declares viewport-fit=cover, and no page
       in this stack does. Hence the max() floor, which also improves by itself
       if viewport-fit=cover is ever added. */
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
    border-left: none;
    border-top: 1px solid var(--hp-offcanvas-border, var(--hp-border));
    border-radius: 16px 16px 0 0;
    transform: translateY(110%);
  }

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

  .hp-offcanvas__close {
    top: 12px;
    right: 12px;
  }

  /* Pull-bar sits on top of photo, not in flow */
  .hp-offcanvas::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 10;
  }

  .hp-offcanvas__banner {
    height: 140px;
  }

  .hp-offcanvas__creator {
    padding: 8px 16px 8px;
  }

  .hp-offcanvas__name {
    font-size: 1.7rem;
  }

  .hp-offcanvas__social {
    padding: 0 16px 10px;
    gap: 6px;
  }

  .hp-offcanvas__link {
    padding: 11px 16px;
    font-size: 0.78rem;
  }

  .hp-offcanvas__ctas {
    padding: 0 16px 20px;
    gap: 7px;
  }

  .hp-offcanvas__ctas::before {
    margin-bottom: 0.6rem;
  }

  .hp-offcanvas__powered {
    padding: 14px 16px 18px;
  }

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