/* =============================================================================
   gift-story.css — POPULARITY SCORE + STORYLINE panel on the item page.

   Styles the gs-* panel that gift-story.js injects into #itemModal .iv-info. It
   borrows the marketplace palette entirely from market.css :root vars (--panel,
   --raised, --well, --hairline, --ink-*, --p300/400/500, --gain, --loss, --sweep,
   --font-num) so it re-skins for free across the dark / light / hashtag themes and
   never hardcodes a colour. All classes are scoped gs-. Motion is decoration only:
   the meter's fill grows with a transition that prefers-reduced-motion removes.

   It sits below the make-an-offer block (.iv-offer), separated by the same hairline
   rule that block uses, so the item column reads as one continuous product panel.
   ========================================================================== */

.gs-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* header — an eyebrow attribution + a section title, matching .iv-offer-h weight */
.gs-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gs-eyebrow {
  color: var(--p400);
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.gs-title {
  margin: 0;
  color: var(--ink-hi);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.gs-body { display: flex; flex-direction: column; gap: 12px; }
.gs-loading { color: var(--ink-lo); font-size: 12.5px; }

/* score row: a big tabular figure on the left, meter + drivers on the right */
.gs-score-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  background: var(--well);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  transition: border-color .15s ease, background .15s ease;
}
.gs-score-row:hover { border-color: var(--hairline-2, var(--hairline)); }

.gs-score {
  display: flex;
  align-items: baseline;
  gap: 1px;
  flex: 0 0 auto;
  min-width: 62px;
}
.gs-score-num {
  color: var(--ink-hi);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.01em;
}
.gs-score-max { color: var(--ink-faint); font-size: 13px; font-weight: 700; }

.gs-side { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 7px; }

/* band badge — colour reads from the palette per band */
.gs-badge {
  align-self: flex-start;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  border: 1px solid var(--hairline);
}
.gs-b-cold { color: var(--ink-lo);  background: var(--tint-weak, transparent); }
.gs-b-warm { color: var(--p400);    background: var(--tint, transparent); border-color: var(--p400); }
.gs-b-hot  { color: var(--sweep);   background: transparent; border-color: var(--sweep); }
.gs-b-fire { color: var(--loss);    background: transparent; border-color: var(--loss); }

/* the meter track + its band-coloured fill */
.gs-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--raised);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.gs-meter-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--p400);
  transition: width .5s cubic-bezier(.2,.9,.3,1);
}
.gs-f-cold { background: var(--ink-lo); }
.gs-f-warm { background: var(--p400); }
.gs-f-hot  { background: var(--sweep); }
.gs-f-fire { background: linear-gradient(90deg, var(--sweep), var(--loss)); }

/* the driving numbers under the meter — tabular so the figures line up */
.gs-drivers {
  color: var(--ink-lo);
  font-size: 12px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums lining-nums;
}

/* the human storyline */
.gs-story {
  margin: 0;
  color: var(--ink-mid);
  font-size: 13px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums lining-nums;
}

@media (max-width: 460px) {
  .gs-score-row { gap: 12px; padding: 11px 12px; }
  .gs-score-num { font-size: 30px; }
}

/* motion is decoration, never data — kill the meter animation + hovers */
@media (prefers-reduced-motion: reduce) {
  .gs-meter-fill { transition: none; }
  .gs-score-row { transition: none; }
}
