/* ============================================================
   Results UI component — styles  (matches Figma node 648-1197)
   3-column dashboard shown after the prompt: Estimated Results (left),
   prompt + Trending creators (center), Campaign Configuration (right),
   Book a call / View more creators CTAs. Pairs with results-ui.js.
   Depends on styles.css for tokens + .prompt-card + .btn.
   ============================================================ */

.ru {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(18px) saturate(1.04);
  backdrop-filter: blur(18px) saturate(1.04);
}
.ru.is-shown { visibility: visible; pointer-events: auto; }
.ru__inner {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2.6vw, 44px);
}
.ru__grid {
  width: min(1360px, 100%);
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr) 360px;
  gap: clamp(16px, 1.8vw, 26px);
  align-items: center;   /* side panels sit centered against the taller coverflow (Figma) */
}

/* shared card */
.ru__card {
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 18px;
  padding: clamp(16px, 1.5vw, 20px);
  box-shadow: 0 18px 44px rgba(17, 17, 17, 0.10);
  will-change: transform, opacity;
}
.ru__cardHead { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.ru__cardHead h3 { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -0.01em; margin: 0; }
.ru__info {
  width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- center column ---------- */
.ru__center { display: flex; flex-direction: column; align-items: center; }
.ru__h {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.025em;
  text-align: center;
  margin: 0 0 18px;
}
.ru__prompt { width: 100%; max-width: 560px; min-height: 150px; }
.ru__prompt .prompt-card__input { min-height: 70px; }
.ru__trendingH {
  align-self: center;
  text-align: center;
  overflow: hidden;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(19px, 2vw, 24px);
  letter-spacing: -0.01em;
  color: var(--primary);
  margin: 0 0 18px;
}
.ru__trendingH .inner { display: block; }

/* ---------- center: two-column upward marquee ----------
   Two lanes of clean uniform cards, both rising (bottom → top). Each lane's
   list is duplicated once in the markup, so translateY(0 → -50%) loops
   seamlessly. The viewport masks the top & bottom edges; hover pauses. */
.ru__cover {
  position: relative;
  width: 100%;
  height: clamp(430px, 54vh, 580px);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
}
.ru__coverCol { position: relative; }
.ru__coverTrack {
  display: flex;
  flex-direction: column;
  will-change: transform;
  animation: ru-marquee var(--ru-marq-dur, 32s) linear infinite;
}
.ru__coverCol:nth-child(1) .ru__coverTrack { --ru-marq-dur: 30s; }
.ru__coverCol:nth-child(2) .ru__coverTrack { --ru-marq-dur: 36s; }
.ru__cover:hover .ru__coverTrack { animation-play-state: paused; }
@keyframes ru-marquee {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
.ru__creator {
  display: flex; align-items: center; gap: 14px;
  background: var(--white);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 14px;
  padding: 12px 15px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.05), 0 8px 20px -6px rgba(17, 17, 17, 0.12);
  will-change: transform, opacity, filter;
}
.ru__avatar { flex: none; width: 56px; height: 56px; border-radius: 50%; }
.ru__avatar--photo { padding: 2.5px; background: #0b0b0b; display: inline-flex; }
.ru__avatar--photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); display: block; }
.ru__avatar--color { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.9), 0 2px 6px rgba(0, 0, 0, 0.12); }
.ru__cmeta { min-width: 0; }
.ru__cname { margin: 0 0 3px; font-weight: 700; font-size: 15px; color: var(--primary); }
.ru__cstat { margin: 0; font-size: 12px; line-height: 17px; color: var(--text); }

/* trending marquee card — clean, uniform, full width within its lane.
   Even spacing via margin-bottom (not flex gap) so the duplicated list
   translates by exactly one copy at -50% — a seamless loop. */
.ru__cover .ru__tCard {
  width: 100%;
  margin-bottom: 16px;
  padding: 14px 18px;
  border-radius: 16px;
}
.ru__cover .ru__tCard .ru__avatar { width: 60px; height: 60px; }
.ru__cover .ru__tCard .ru__cname { font-size: 16px; margin-bottom: 4px; color: #0b0b0b; }
.ru__cover .ru__tCard .ru__cstat { font-size: 13px; line-height: 19px; color: #535353; }

/* ---------- estimated results (left — sized a touch larger) ---------- */
.ru__side--left .ru__card { padding: clamp(18px, 1.7vw, 24px); }
.ru__side--left .ru__cardHead { margin-bottom: 16px; }
.ru__side--left .ru__cardHead h3 { font-size: 17px; }
.ru__gauge { position: relative; width: 100%; max-width: 260px; margin: 4px auto 12px; }
.ru__gauge svg { width: 100%; height: auto; display: block; overflow: visible; }
.ru__gaugeCenter { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.ru__gaugeNum { display: block; font-family: var(--font-display); font-weight: 500; font-size: 25px; letter-spacing: -0.01em; color: var(--primary); font-variant-numeric: tabular-nums; }
.ru__gaugeLbl { display: block; font-size: 12.5px; color: var(--text); margin-top: 2px; }
.ru__gTick { font-size: 9.5px; fill: #a5a5a5; font-family: var(--font-body); }

.ru__stats { list-style: none; margin: 6px 0 0; padding: 0; }
.ru__stat { display: flex; align-items: center; gap: 13px; padding: 10px 0; border-top: 1px solid var(--line); will-change: transform, opacity; }
.ru__stat:first-child { border-top: 0; }
.ru__statIco { flex: none; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; color: var(--primary); }
.ru__statIco svg { width: 23px; height: 23px; }
.ru__statLbl { flex: 1; font-size: 13.5px; color: var(--text); }
.ru__statVal { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--primary); font-variant-numeric: tabular-nums; }

/* ---------- campaign config (right) ---------- */
.ru__tabs { display: flex; gap: 4px; padding: 4px; background: #f4f4f4; border-radius: 11px; margin: 4px 0 16px; }
.ru__tabs button { flex: 1; border: 0; cursor: pointer; font-family: var(--font-body); font-size: 12px; font-weight: 600; color: var(--text); background: transparent; padding: 8px 6px; border-radius: 8px; transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease; }
.ru__tabs button.is-active { background: var(--primary); color: #fff; }
.ru__cfgLbl { font-family: var(--font-display); font-weight: 700; font-size: 13.5px; margin: 0 0 6px; }
.ru__fields { display: flex; flex-direction: column; }
.ru__field { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); will-change: transform, opacity; }
.ru__field:first-child { border-top: 0; }
.ru__flabel { font-size: 12.5px; color: var(--text); }
.ru__stepper { display: inline-flex; align-items: center; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 9px; }
.ru__stepper button { width: 26px; height: 30px; border: 0; background: none; cursor: pointer; font-size: 15px; color: var(--primary); line-height: 1; }
.ru__stepper span { min-width: 26px; text-align: center; font-size: 13px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.ru__pill { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 9px; padding: 7px 11px; font-size: 12.5px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.ru__pill .ru__num { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.ru__pill svg { width: 11px; height: 11px; opacity: 0.55; }
.ru__sep { width: 1px; height: 14px; background: rgba(0, 0, 0, 0.12); }

/* ---------- CTAs ---------- */
.ru__ctas { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 26px; width: 100%; }
.ru__ctas .btn { will-change: transform, opacity; }
.ru__ctas .btn--lg { height: 52px; padding: 0 30px; font-size: 16px; border-radius: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .ru__grid { grid-template-columns: 1fr; max-width: 640px; }
  .ru__center { order: -1; }
}
@media (max-width: 520px) {
  .ru__cards { grid-template-columns: 1fr; }
  /* one readable lane on phones */
  .ru__cover { grid-template-columns: 1fr; }
  .ru__cover .ru__coverCol:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ru__trendingH .inner { transform: none !important; }
  /* freeze the marquee and let the lane be scrolled manually */
  .ru__coverTrack { animation: none !important; }
  .ru__cover {
    overflow-y: auto;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .ru__coverCol { overflow: visible; }
}
