/* ---------------------------------------------------------------------------
   Goal strip + share modal.

   Loaded via $pageCss on LIVE performer pages only - an offline model has no
   goal, so neither file is worth the request there.

   Everything is built from the existing custom properties (--card, --border,
   --pink, --pink2, --text, --muted) so it inherits the theme rather than
   pinning colours that drift when the theme changes.
   --------------------------------------------------------------------------- */

/* ---- strip on the page ---- */

.goal-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  margin-top: 14px;
}

.goal-strip .goal-meta { flex: 1 1 260px; min-width: 200px; }

/* Rail variant. Label left, button right, on ONE line - which is why the rail
   went to 360px. Stacked, it read as a box with a stranded button; full-width
   under the player, it read as a mostly-empty bar. This is the shape that
   works at this width.
   State 1 only. States 2 and 3 carry a progress bar and stay full-width under
   the player, where the bar is legible. */
.goal-strip.compact {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
}
.goal-strip.compact .goal-label { flex: 0 1 auto; }
.goal-strip.compact .goal-cta {
  flex: none;
  font-size: 12.5px;
  padding: 9px 14px;
  white-space: nowrap;
}

.goal-strip .goal-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .6px;
  color: var(--muted);
  text-transform: uppercase;
}

/* Pulsing amber dot. This is the thing that makes the strip findable - a
   static row of muted uppercase text reads as a caption, a blinking dot reads
   as something happening. Amber rather than the live-green: green already
   means "she is online" elsewhere on the page, and this is not that.
   Honoured only when the visitor has not asked for reduced motion; without
   that the dot simply sits there, which still works. */
.goal-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #F0A035;
  flex: none;
}

@media (prefers-reduced-motion: no-preference) {
  .goal-dot { animation: goalPulse 1.6s ease-in-out infinite; }
}

@keyframes goalPulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 rgba(240, 160, 53, .55); }
  50%      { opacity: .45; box-shadow: 0 0 0 5px rgba(240, 160, 53, 0); }
}

.goal-strip .goal-label b { color: var(--text); }

/* The bar. Sits under the label so the numbers read first - the label is the
   claim, the bar is the evidence. */
.goal-bar {
  position: relative;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .10);
  overflow: hidden;
  margin-top: 8px;
}

.goal-bar > span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #F0A035, var(--pink));
  /* Width is set inline from PHP. A transition means the bar animates on a
     roulette swap instead of snapping. */
  transition: width .45s ease;
}

.goal-pct {
  font-weight: 800;
  font-size: 18px;
  color: #F0A035;
  white-space: nowrap;
}

.goal-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  /* Gradient, matching the primary CTA. It was flat pink and sat quietly next
     to the muted label; the share ask has to be the loudest thing in the strip
     or the strip is pointless. */
  background: linear-gradient(90deg, var(--pink), var(--accent2));
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .3px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.goal-cta:hover { filter: brightness(1.08); }

/* The model's own words for the goal. Quoted and offset so it reads as hers
   rather than as site copy. */
.goal-quote {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  border-left: 3px solid var(--pink);
  background: rgba(255, 255, 255, .03);
  border-radius: 0 8px 8px 0;
  color: var(--pink2);
  font-style: italic;
}

/* ---- modal ---- */

.share-back {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 900;
}

.share-back[hidden] { display: none; }

.share-modal {
  width: 100%;
  max-width: 470px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  position: relative;
}

/* Avatar + title as one row. The tile is the modal's anchor - without it the
   dialog opens as a wall of text and reads like a system prompt rather than
   something about a person. */
.share-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-right: 28px;
}

.share-head-t { min-width: 0; }

/* A letter, not her thumbnail. The thumbnail is a live cam still - at 52px it
   is an unreadable blur, and it can be anything at all depending on the moment
   the frame was grabbed. An initial is always legible and never a surprise. */
.share-avatar {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--pink), var(--accent2));
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 17px, not 20. At 20 the longest form of this title - "Bring more eyes to
   {name}'s room" with a two-word display name - wrapped to two lines and the
   avatar ended up taller than the text beside it. */
.share-modal h2 { font-size: 17px; line-height: 1.35; margin: 0 0 4px; }

.share-live { font-size: 13px; color: var(--live); }
.share-live .dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  margin-right: 6px;
}

.share-close {
  position: absolute;
  top: 14px; right: 14px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.share-close:hover { color: var(--text); }

.share-modal p { color: var(--muted); line-height: 1.6; margin: 12px 0; }
.share-modal p b { color: var(--text); }
.share-modal .lead b { color: #F0A035; }

/* Preview of the exact text that gets posted. Shown because "what will this
   put on my timeline" is the actual hesitation, and answering it up front
   costs nothing. */
.share-preview {
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  margin: 14px 0;
}
.share-preview .h {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .7px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 7px;
}
.share-preview .t { color: var(--muted); font-style: italic; line-height: 1.55; }
.share-preview .t a { color: var(--pink); text-decoration: none; }

.share-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(90deg, var(--pink), var(--accent2));
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 14px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  margin-bottom: 10px;
}
.share-primary:hover { filter: brightness(1.08); }

.share-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-grid a, .share-grid button, .share-dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 13px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.share-grid a:hover, .share-grid button:hover, .share-dismiss:hover {
  background: rgba(255, 255, 255, .08);
}

.share-dismiss { width: 100%; margin-top: 10px; }

.share-foot {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
  margin-top: 14px;
}

@media (max-width: 420px) {
  .share-grid { grid-template-columns: 1fr; }
}