/* =========================================================
   ChoiceSpin — Share Modal (v5 ALIVE PREMIUM / NO NEON)
   File: /styles/share/share-modal.css

   ✅ NO neon/glow halos anywhere
   ✅ NO hover movement (no translate/float) — only subtle color changes
   ✅ Premium headings font
   ✅ Step transitions (forward/back)
   ✅ Input underline animation (blue)
   ✅ Copy success tick animation (no glow)
   ✅ Stepper track reaches dots correctly + fades near dots
   ✅ Dark + Light supported
   ========================================================= */

.sc-share-modal{
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;

  --scm-blue: #4f8cff;
  --scm-green: #22c55e;
    --scm-red: #ef4444;


  --scm-bg: #1D1D1D;
  --scm-fg: rgba(255,255,255,.92);
  --scm-muted: rgba(255,255,255,.68);
  --scm-dim: rgba(255,255,255,.55);

  --scm-surface: rgba(255,255,255,.06);
  --scm-surface2: rgba(255,255,255,.04);

  --scm-line2: rgba(255,255,255,.10);
  --scm-track: rgba(255,255,255,.18);

  --scm-radius: 18px;
  --scm-radius2: 14px;

  --scm-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --scm-head-font: "Outfit", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.sc-share-modal.is-open{ display: block; }

html[data-theme="light"] .sc-share-modal{
  --scm-bg: #ffffff;
  --scm-fg: #0f172a;
  --scm-muted: rgba(15,23,42,.70);
  --scm-dim: rgba(15,23,42,.55);

  --scm-surface: rgba(15,23,42,.04);
  --scm-surface2: rgba(15,23,42,.03);

  --scm-line2: rgba(15,23,42,.10);
  --scm-track: rgba(15,23,42,.18);
}

/* Backdrop */
.sc-share-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
}
html[data-theme="light"] .sc-share-modal__backdrop{
  background: rgba(2,6,23,.50);
}

/* Panel */
.sc-share-modal__panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: min(600px, calc(100vw - 24px));
  border-radius: var(--scm-radius);

  background: var(--scm-bg);
  color: var(--scm-fg);
  font-family: var(--scm-font);

  border: 1px solid var(--scm-line2);
  box-shadow: 0 28px 80px rgba(0,0,0,.55);

  padding: 12px;
}

/* =========================================================
   TOP BAR (Stepper + Close)
   ========================================================= */
.sc-share-modal__top{
  display: flex;
  align-items: flex-start;
  gap: 10px;

  padding: 2px 2px 12px;
  margin-bottom: 10px;

  border-bottom: 1px solid var(--scm-line2);
}

/* Close (no glow) */
.sc-share-modal__x{
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;

  width: 36px;
  height: 36px;
  border-radius: 12px;

  display: grid;
  place-items: center;

  font-size: 18px;
  cursor: pointer;
  opacity: .86;

  transition: background 140ms ease, opacity 140ms ease;
}
.sc-share-modal__x:hover{
  opacity: 1;
  background: var(--scm-surface);
}
.sc-share-modal__x:focus-visible{
  outline: 2px solid rgba(79,140,255,.45);
  outline-offset: 2px;
}

/* =========================================================
   STEPPER (no plate / no glow)
   ========================================================= */
.sc-share-steps{
  position: relative;
  flex: 1;
  min-width: 0;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;

  padding: 10px 10px 8px;
  background: transparent;
}

/* Track wrapper */
.sc-share-steps__track{
  position: absolute;
  left: 10px;
  right: 10px;
  top: 24px;
  height: 2px;
  pointer-events: none;

  --dot: 28px;
  --r: calc(var(--dot) / 2);
  --fade: 4px;

  z-index: 1;
}

/* Two segments */
.sc-share-steps__track::before,
.sc-share-steps__track::after{
  content: "";
  position: absolute;
  top: 0;
  height: 2px;
  border-radius: 999px;

  background: linear-gradient(
    to right,
    transparent 0%,
    var(--scm-track) var(--fade),
    var(--scm-track) calc(100% - var(--fade)),
    transparent 100%
  );
}

/* segment 1: dot1 edge -> dot2 edge */
.sc-share-steps__track::before{
  left:  calc(16.666% + var(--r));
  right: calc(50% + var(--r));
}

/* segment 2: dot2 edge -> dot3 edge */
.sc-share-steps__track::after{
  left:  calc(50% + var(--r));
  right: calc(16.666% + var(--r));
}

/* Blue fill overlay (no glow) */
.sc-share-steps__fill{
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.sc-share-steps__fill::before,
.sc-share-steps__fill::after{
  content: "";
  position: absolute;
  top: 0;
  height: 2px;
  border-radius: 999px;

  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(79,140,255,.95) var(--fade),
    rgba(79,140,255,.95) calc(100% - var(--fade)),
    transparent 100%
  );

  opacity: 0;
  transition: opacity 240ms cubic-bezier(.2,.9,.2,1);
}

/* segment 1 */
.sc-share-steps__fill::before{
  left:  calc(16.666% + var(--r));
  right: calc(50% + var(--r));
}

/* segment 2 */
.sc-share-steps__fill::after{
  left:  calc(50% + var(--r));
  right: calc(16.666% + var(--r));
}

/* Drive fill by modal step */
.sc-share-modal[data-step="2"] .sc-share-steps__fill::before,
.sc-share-modal[data-step="3"] .sc-share-steps__fill::before{
  opacity: 1;
}
.sc-share-modal[data-step="3"] .sc-share-steps__fill::after{
  opacity: 1;
}

.sc-share-steps__item{
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 7px;

  padding: 2px 4px 2px;
  cursor: pointer;
  user-select: none;
  outline: none;
}

.sc-share-steps__label{
  font-family: var(--scm-head-font);
  letter-spacing: .01em;

  font-size: 12px;
  font-weight: 620;
  color: var(--scm-muted);
  text-align: center;
  line-height: 1.15;
  max-width: 140px;
}

.sc-share-steps__dot{
  width: 28px;
  height: 28px;
  border-radius: 999px;

  display: grid;
  place-items: center;

  border: 2px solid rgba(255,255,255,.22);
  background: transparent;
  color: var(--scm-muted);

  position: relative;
  z-index: 3;

  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
html[data-theme="light"] .sc-share-steps__dot{
  border-color: rgba(15,23,42,.22);
}

.sc-share-steps__num{
  font: 800 12px/1 var(--scm-font);
  color: inherit;
}

.sc-share-steps__ico{
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  display: none;
  color: currentColor;
}

/* ACTIVE = pencil (no outer glow) */
.sc-share-steps__item.is-active .sc-share-steps__dot{
  border-color: rgba(79,140,255,.95);
  background: rgba(79,140,255,.10);
  color: rgba(79,140,255,.98);
}
.sc-share-steps__item.is-active .sc-share-steps__label{
  color: var(--scm-fg);
}
.sc-share-steps__item.is-active .sc-share-steps__num{ display: none; }
.sc-share-steps__item.is-active .sc-share-steps__ico--edit{ display: block; }

/* DONE = check */
.sc-share-steps__item.is-done .sc-share-steps__dot{
  border-color: rgba(79,140,255,.95);
  background: rgba(79,140,255,.95);
  color: #fff;
}
.sc-share-steps__item.is-done .sc-share-steps__label{
  color: var(--scm-muted);
}
.sc-share-steps__item.is-done .sc-share-steps__num{ display: none; }
.sc-share-steps__item.is-done .sc-share-steps__ico--check{ display: block; }

/* focus (no glow, just outline) */
.sc-share-steps__item:focus-visible{
  outline: 2px solid rgba(79,140,255,.35);
  outline-offset: 4px;
  border-radius: 14px;
}

@media (max-width: 520px){
  .sc-share-steps{ padding: 10px 8px 8px; }
  .sc-share-steps__label{ font-size: 11px; max-width: 100px; }
  .sc-share-steps__track{ top: 23px; }
}

/* =========================================================
   Labels + inputs (premium headings)
   ========================================================= */
.sc-share-modal__label{
  display:block;
  font-family: var(--scm-head-font);
  font-weight: 760;
  letter-spacing: .01em;

  font-size: 13px;
  margin: 10px 0 6px;
  color: var(--scm-fg);
}

/* input underline grow (no glow) */
.sc-share-modal__input{
  width: 100%;
  height: 42px;
  border-radius: var(--scm-radius2);

  border: 1px solid var(--scm-line2);
  background-color: var(--scm-surface);
  color: inherit;

  padding: 0 12px;
  outline: none;

  font: 540 14px/1 var(--scm-font);

  background-image: linear-gradient(var(--scm-blue), var(--scm-blue));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;

  transition:
    background-size 260ms cubic-bezier(.2,.9,.2,1),
    border-color 140ms ease,
    background-color 140ms ease;
}

.sc-share-modal__input::placeholder{ color: var(--scm-dim); }

.sc-share-modal__input:hover{
  background-color: var(--scm-surface2);
}

.sc-share-modal__input:focus{
  border-color: rgba(79,140,255,.55);
  background-size: 100% 2px;
}
/* Error state (no glow, just clean red) */
.sc-share-modal__input.is-error{
  border-color: rgba(239,68,68,.65);
  background-image: linear-gradient(var(--scm-red), var(--scm-red));
  background-size: 100% 2px; /* show underline */
}

.sc-share-modal__input.is-error:focus{
  border-color: rgba(239,68,68,.78);
}

/* =========================================================
   Radio cards (no movement, no glow)
   ========================================================= */
.sc-share-modal__radios{
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.sc-share-modal__radio{
  display: flex;
  gap: 12px;
  align-items: flex-start;

  padding: 12px 12px;
  border-radius: 16px;

  border: 1px solid transparent;
  background: var(--scm-surface);

  cursor: pointer;

  transition: background 160ms ease, border-color 160ms ease;
}

.sc-share-modal__radio:hover{
  border-color: var(--scm-line2);
  background: rgba(255,255,255,.075);
}
html[data-theme="light"] .sc-share-modal__radio:hover{
  background: rgba(15,23,42,.05);
}

/* radios */
.sc-share-modal__radio input[type="radio"]{
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border-radius: 999px;

  border: 2px solid rgba(255,255,255,.22);
  background: transparent;

  display: inline-grid;
  place-items: center;

  transition: border-color 140ms ease, background 140ms ease;
}
html[data-theme="light"] .sc-share-modal__radio input[type="radio"]{
  border-color: rgba(15,23,42,.22);
}

.sc-share-modal__radio input[type="radio"]::before{
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
  transition: background 140ms ease;
}

.sc-share-modal__radio input[type="radio"]:checked{
  border-color: rgba(79,140,255,.95);
  background: rgba(79,140,255,.10);
}
.sc-share-modal__radio input[type="radio"]:checked::before{
  background: rgba(79,140,255,.95);
}

.sc-share-modal__radio b{
  font-family: var(--scm-head-font);
  font-weight: 760;
  letter-spacing: .01em;

  font-size: 13.5px;
  line-height: 1.25;
  color: var(--scm-fg);
}

.sc-share-modal__radio small{
  display: inline-block;
  margin-top: 4px;
  color: var(--scm-muted);
  font-weight: 540;
  font-size: 12.5px;
}

.sc-share-modal__radio:has(input[type="radio"]:checked){
  background: rgba(79,140,255,.08);
  border-color: rgba(79,140,255,.18);
  animation: scSelectGlow 220ms cubic-bezier(.2,.9,.2,1) both;
}
@keyframes scSelectGlow{
  from{ filter: none; }
  to  { filter: none; }
}

/* =========================================================
   Textarea underline grow (no glow)
   ========================================================= */
.sc-share-modal__textarea{
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border-radius: var(--scm-radius2);

  padding: 10px 12px;

  border: 1px solid var(--scm-line2);
  background-color: rgba(0,0,0,.20);
  color: var(--scm-fg);

  font: 540 14px/1.35 var(--scm-font);
  outline: none;

  background-image: linear-gradient(var(--scm-blue), var(--scm-blue));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;

  transition:
    background-size 260ms cubic-bezier(.2,.9,.2,1),
    border-color 140ms ease,
    background-color 140ms ease;
}
html[data-theme="light"] .sc-share-modal__textarea{
  background-color: rgba(15,23,42,.03);
}
.sc-share-modal__textarea::placeholder{ color: var(--scm-dim); }
.sc-share-modal__textarea:focus{
  border-color: rgba(79,140,255,.55);
  background-size: 100% 2px;
}

/* Hints */
.sc-share-modal__hint{
  margin-top: 8px;
  font: 540 13px/1.35 var(--scm-font);
  color: var(--scm-muted);
}
/* Inline field error text */
.sc-share-modal__field-error{
  margin-top: 6px;
  font: 650 12.5px/1.35 var(--scm-font);
  color: rgba(239,68,68,.95);
}
html[data-theme="light"] .sc-share-modal__field-error{
  color: rgba(220,38,38,.95);
}

/* Last shared link (no neon) */
.sc-share-lastlink{
  display: inline-block;
  margin-left: 8px;
}

#scShareUpdateLink{
  font-weight: 650;
  text-decoration: none;
  color: rgba(79,140,255,.95);
  border-bottom: 1px solid rgba(79,140,255,.35);
  padding-bottom: 1px;

  /* long URL handling */
  max-width: 420px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

#scShareUpdateLink:hover{
  border-bottom-color: rgba(79,140,255,.75);
}

html[data-theme="light"] #scShareUpdateLink{
  color: rgba(37,99,235,.95);
  border-bottom-color: rgba(37,99,235,.30);
}
html[data-theme="light"] #scShareUpdateLink:hover{
  border-bottom-color: rgba(37,99,235,.65);
}

/* =========================================================
   Footer actions (buttons) — NO glow
   ========================================================= */
.sc-share-wiz-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.sc-share-modal__btn{
  height: 40px;
  padding: 0 14px;
  border-radius: 14px;

  border: 1px solid transparent;
  background: var(--scm-surface);

  color: var(--scm-fg);
  font: 760 13.5px/1 var(--scm-font);

  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  transition: background 140ms ease, border-color 140ms ease, filter 140ms ease;
}

.sc-share-modal__btn:hover{
  background: rgba(255,255,255,.085);
}
html[data-theme="light"] .sc-share-modal__btn:hover{
  background: rgba(15,23,42,.05);
}

.sc-share-modal__btn:active{
  filter: brightness(.98);
}

.sc-share-modal__btn:focus-visible{
  outline: 2px solid rgba(79,140,255,.35);
  outline-offset: 2px;
}

.sc-share-modal__btn--primary{
  background: rgba(79,140,255,.95);
  color: #fff;
}
.sc-share-modal__btn--primary:hover{
  background: rgba(79,140,255,1);
}

/* Copy = GREEN (no glow) */
#scShareCopy.sc-share-modal__btn{
  background: rgba(34,197,94,.95);
  color: #ffffff;
}
#scShareCopy.sc-share-modal__btn:hover{
  background: rgba(34,197,94,1);
}
#scShareCopy.sc-share-modal__btn:focus-visible{
  outline: 2px solid rgba(34,197,94,.35);
}

/* Copy success state (no glow) */
#scShareCopy.sc-share-modal__btn.is-copied{
  background: rgba(34,197,94,1);
  animation: scCopiedPop 220ms cubic-bezier(.2,.9,.2,1) both;
}
@keyframes scCopiedPop{
  from{ transform: scale(.98); }
  to  { transform: scale(1); }
}

.sc-btn-ico{
  width: 16px;
  height: 16px;
  display: inline-block;
}

.sc-share-modal__btn:disabled{
  opacity: .62;
  cursor: not-allowed;
}

/* Share link row */
.sc-share-modal__row{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-top: 8px;
}
@media (max-width: 520px){
  .sc-share-modal__row{
    flex-direction: column;
    align-items: stretch;
  }
}

/* =========================================================
   Tooltips (no glow / no movement)
   ========================================================= */
.sc-share-radio__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sc-tip{
  position: relative;
  flex: 0 0 auto;

  width: 22px;
  height: 22px;
  border-radius: 999px;

  border: 1px solid transparent;
  background: rgba(255,255,255,.09);
  color: rgba(255,255,255,.92);

  font: 800 12px/1 var(--scm-font);
  display: inline-grid;
  place-items: center;

  cursor: pointer;
  padding: 0;

  transition: background 140ms ease;
}
html[data-theme="light"] .sc-tip{
  background: rgba(15,23,42,.06);
  color: rgba(15,23,42,.85);
}
.sc-tip:hover{
  background: rgba(255,255,255,.12);
}
html[data-theme="light"] .sc-tip:hover{
  background: rgba(15,23,42,.09);
}

.sc-tip::after{
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: calc(100% + 10px);

  width: max-content;
  max-width: 280px;

  padding: 10px 12px;
  border-radius: 12px;

  background: rgba(0,0,0,.92);
  color: rgba(255,255,255,.92);

  box-shadow: 0 18px 45px rgba(0,0,0,.55);
  font: 540 12.5px/1.35 var(--scm-font);

  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;

  z-index: 10;
}

.sc-tip::before{
  content: "";
  position: absolute;
  right: 10px;
  top: calc(100% + 4px);

  width: 10px;
  height: 10px;
  background: rgba(0,0,0,.92);
  transform: rotate(45deg);

  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;

  z-index: 10;
}

html[data-theme="light"] .sc-tip::after,
html[data-theme="light"] .sc-tip::before{
  background: rgba(15,23,42,.92);
}

.sc-tip:hover::after,
.sc-tip:focus-visible::after,
.sc-tip.is-open::after{
  opacity: 1;
  transform: translateY(0);
}
.sc-tip:hover::before,
.sc-tip:focus-visible::before,
.sc-tip.is-open::before{
  opacity: 1;
}

.sc-tip:focus-visible{
  outline: 2px solid rgba(79,140,255,.35);
  outline-offset: 2px;
}

/* =========================================================
   Alive animations (open + step transitions)
   ========================================================= */
.sc-share-modal.is-open .sc-share-modal__panel{
  animation: scModalIn 220ms ease-out both;
}
@keyframes scModalIn{
  from{ opacity: 0; transform: translate(-50%, -48%) scale(.985); }
  to  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.sc-share-body{
  position: relative;
}

.sc-share-step{
  animation: scStepIn 260ms cubic-bezier(.2,.9,.2,1) both;
}
@keyframes scStepIn{
  from{ opacity: 0; transform: translateX(18px); }
  to  { opacity: 1; transform: translateX(0); }
}

.sc-share-step.is-back{
  animation-name: scStepInBack;
}
@keyframes scStepInBack{
  from{ opacity: 0; transform: translateX(-18px); }
  to  { opacity: 1; transform: translateX(0); }
}

/* tiny pop on active dot (no glow) */
.sc-share-steps__item.is-active .sc-share-steps__dot{
  animation: scDotPop 220ms cubic-bezier(.2,.9,.2,1) both;
}
@keyframes scDotPop{
  from{ transform: scale(.92); }
  to  { transform: scale(1); }
}

/* =========================================================
   Reduce motion
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  .sc-share-modal.is-open .sc-share-modal__panel,
  .sc-share-step,
  .sc-share-steps__item.is-active .sc-share-steps__dot{
    animation: none !important;
  }

  .sc-share-modal__x,
  .sc-share-modal__btn,
  .sc-share-modal__radio,
  .sc-tip,
  .sc-share-modal__input,
  .sc-share-modal__textarea,
  .sc-share-steps__fill::before,
  .sc-share-steps__fill::after{
    transition: none !important;
  }
}
