/* =========================================================
   ChoiceSpin — Winner Share Modal (v7 MINIMAL / PREMIUM)
   File: /styles/winner-share/winner-share-styles.css
   ========================================================= */

.sc-wshare[hidden]{
  display:none;
}

.sc-wshare{
  position: fixed;
  inset: 0;
  z-index: 10040;
  display: none;
}

.sc-wshare.is-open{
  display: grid;
  place-items: center;
}

.sc-wshare__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

html[data-theme="light"] .sc-wshare__backdrop{
  background: rgba(15,23,42,.14);
}

.sc-wshare__panel{
  position: relative;
  z-index: 1;
  width: min(540px, calc(100vw - 24px));
  max-height: min(86vh, 900px);
  overflow: auto;
  box-sizing: border-box;

  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.10);
  background:
    radial-gradient(900px 320px at -10% -20%, rgba(255,255,255,.07), transparent 42%),
    radial-gradient(800px 260px at 110% 120%, rgba(59,130,246,.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,.01)),
    #1d1d1d;
  color: rgba(255,255,255,.97);
  box-shadow:
    0 30px 80px rgba(0,0,0,.42),
    0 10px 30px rgba(0,0,0,.18);

  transform: translateY(8px) scale(.985);
  opacity: 0;
  transition: transform 170ms ease, opacity 170ms ease;
}

.sc-wshare.is-open .sc-wshare__panel{
  transform: translateY(0) scale(1);
  opacity: 1;
}

html[data-theme="light"] .sc-wshare__panel{
  background:
    radial-gradient(1000px 360px at -10% -20%, rgba(255,255,255,.95), transparent 42%),
    radial-gradient(800px 260px at 110% 120%, rgba(59,130,246,.05), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.78)),
    #ffffff;
  color: #111111;
  border-color: rgba(15,23,42,.08);
  box-shadow:
    0 24px 70px rgba(15,23,42,.14),
    0 8px 24px rgba(15,23,42,.08);
}

.sc-wshare__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 10px;
}

.sc-wshare__title{
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.01em;
}

.sc-wshare__x{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  font: inherit;
  font-size: 1rem;
  color: inherit;
  background: rgba(255,255,255,.08);
  transition: background .12s ease, opacity .12s ease;
}

.sc-wshare__x:hover{
  background: rgba(255,255,255,.12);
}

html[data-theme="light"] .sc-wshare__x{
  background: rgba(15,23,42,.06);
}

html[data-theme="light"] .sc-wshare__x:hover{
  background: rgba(15,23,42,.09);
}

.sc-wshare__body{
  padding: 6px 18px 18px;
}

.sc-wshare__card{
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)),
    #141414;
  padding: 18px 18px 18px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 10px 24px rgba(0,0,0,.18);
  transition:
    border-color .12s ease,
    box-shadow .12s ease;
}

html[data-theme="light"] .sc-wshare__card{
  border-color: rgba(15,23,42,.08);
  background:
    linear-gradient(180deg, rgba(15,23,42,.02), rgba(15,23,42,.01)),
    #f7f7f8;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 8px 18px rgba(15,23,42,.05);
}

.sc-wshare__card.is-ready{
  cursor: pointer;
}

.sc-wshare__card.is-ready:hover{
  border-color: rgba(255,255,255,.11);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.03),
    0 10px 24px rgba(0,0,0,.18);
}

html[data-theme="light"] .sc-wshare__card.is-ready:hover{
  border-color: rgba(15,23,42,.10);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.85),
    0 8px 18px rgba(15,23,42,.05);
}

.sc-wshare__card:focus-visible,
.sc-wshare__x:focus-visible,
.sc-wshare__btn:focus-visible,
.sc-wshare__social:focus-visible{
  outline: 3px solid rgba(59,130,246,.35);
  outline-offset: 2px;
}

.sc-wshare__cardhead{
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

.sc-wshare__copyhint{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  color: inherit;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  opacity: .92;
  transition:
    background .12s ease,
    border-color .12s ease,
    color .12s ease,
    opacity .12s ease;
}

html[data-theme="light"] .sc-wshare__copyhint{
  background: rgba(15,23,42,.06);
  border-color: rgba(15,23,42,.08);
}

.sc-wshare__copyhint svg{
  display: block;
  width: 17px;
  height: 17px;
  pointer-events: none;
}

.sc-wshare__card.is-copied .sc-wshare__copyhint{
  background: #22c55e;
  border-color: #22c55e;
  color: #ffffff;
  opacity: 1;
}

.sc-wshare__preview{
  font-size: 1rem;
  line-height: 1.62;
  white-space: pre-wrap;
  word-break: break-word;
  color: inherit;
  opacity: .97;

  /* ✅ leave room for the copy icon on the top-right */
  padding-right: 52px;
}

.sc-wshare__preview.is-empty{
  min-height: 92px;
  border-radius: 14px;
  background:
    linear-gradient(
      90deg,
      rgba(255,255,255,.04) 0%,
      rgba(255,255,255,.08) 18%,
      rgba(255,255,255,.04) 36%
    );
  background-size: 240% 100%;
  animation: sc-wshare-shimmer 1.2s linear infinite;
  color: transparent;
  user-select: none;

  /* ✅ keep same right-side breathing room while loading */
  padding-right: 52px;
}

html[data-theme="light"] .sc-wshare__preview.is-empty{
  background:
    linear-gradient(
      90deg,
      rgba(15,23,42,.04) 0%,
      rgba(15,23,42,.07) 18%,
      rgba(15,23,42,.04) 36%
    );
  background-size: 240% 100%;
}

@keyframes sc-wshare-shimmer{
  from{ background-position: 200% 0; }
  to{ background-position: -40% 0; }
}

.sc-wshare__or{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: rgba(255,255,255,.62);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.sc-wshare__or::before,
.sc-wshare__or::after{
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(255,255,255,.10);
}

html[data-theme="light"] .sc-wshare__or{
  color: rgba(15,23,42,.56);
}

html[data-theme="light"] .sc-wshare__or::before,
html[data-theme="light"] .sc-wshare__or::after{
  background: rgba(15,23,42,.10);
}

.sc-wshare__socials{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 2px;
  row-gap: 4px;
}

.sc-wshare__social{
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  cursor: pointer;
  transition: opacity .12s ease, transform .12s ease;
}

.sc-wshare__social:hover{
  opacity: .88;
  transform: translateY(-1px);
}

.sc-wshare__social:active{
  opacity: .74;
  transform: translateY(0);
}
html[data-theme="light"] .sc-wshare__social{
  border: 0;
  background: transparent;
  box-shadow: none;
}

.sc-wshare__social img{
  display: block;
  width: 19px;
  height: 19px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* Theme-aware X logo swap */
.sc-wshare__social .sc-wshare__img--theme-light{
  display: none;
}

html[data-theme="light"] .sc-wshare__social .sc-wshare__img--theme-dark{
  display: none;
}

html[data-theme="light"] .sc-wshare__social .sc-wshare__img--theme-light{
  display: block;
}

.sc-wshare__actions{
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.sc-wshare__btn{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  min-height: 46px;
  min-width: 120px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  color: inherit;
  background: rgba(255,255,255,.08);
  transition: background .12s ease, opacity .12s ease;
}

.sc-wshare__btn:hover{
  background: rgba(255,255,255,.12);
}

html[data-theme="light"] .sc-wshare__btn{
  background: rgba(15,23,42,.06);
}

html[data-theme="light"] .sc-wshare__btn:hover{
  background: rgba(15,23,42,.09);
}

@media (max-width: 420px){
  .sc-wshare__panel{
    width: min(540px, calc(100vw - 18px));
    border-radius: 20px;
  }

  .sc-wshare__top{
    padding: 16px 16px 8px;
  }

  .sc-wshare__body{
    padding: 6px 16px 16px;
  }

  .sc-wshare__card{
    padding: 16px 16px 16px;
    border-radius: 18px;
  }

  .sc-wshare__cardhead{
    top: 12px;
    right: 12px;
  }

  .sc-wshare__preview{
    font-size: .96rem;
    line-height: 1.58;
    padding-right: 48px;
  }

.sc-wshare__social{
  width: 34px;
  height: 34px;
  border-radius: 10px;
}
  .sc-wshare__social img{
    width: 18px;
    height: 18px;
  }
}
/* =========================================================
   Winner Download Modal
   ========================================================= */

.sc-wdownload[hidden]{
  display:none;
}

.sc-wdownload{
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
}

.sc-wdownload.is-open{
  display: grid;
  place-items: center;
}

.sc-wdownload__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

html[data-theme="light"] .sc-wdownload__backdrop{
  background: rgba(15,23,42,.14);
}

.sc-wdownload__panel{
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 24px));
  max-height: min(86vh, 900px);
  overflow: auto;
  box-sizing: border-box;

  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.10);
  background:
    linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,.01)),
    #1d1d1d;
  color: rgba(255,255,255,.97);
  box-shadow:
    0 30px 80px rgba(0,0,0,.42),
    0 10px 30px rgba(0,0,0,.18);

  opacity: 1;
}

html[data-theme="light"] .sc-wdownload__panel{
  background:
    linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,255,255,.78)),
    #ffffff;
  color: #111111;
  border-color: rgba(15,23,42,.08);
  box-shadow:
    0 24px 70px rgba(15,23,42,.14),
    0 8px 24px rgba(15,23,42,.08);
}

.sc-wdownload__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 10px;
}

.sc-wdownload__title{
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.01em;
}

.sc-wdownload__x{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  min-width: 40px;
  height: 40px;
  padding: 0;
  font: inherit;
  font-size: 1rem;
  color: inherit;
  background: rgba(255,255,255,.08);
  transition: background .12s ease;
}

.sc-wdownload__x:hover{
  background: rgba(255,255,255,.12);
}

html[data-theme="light"] .sc-wdownload__x{
  background: rgba(15,23,42,.06);
}

html[data-theme="light"] .sc-wdownload__x:hover{
  background: rgba(15,23,42,.09);
}

.sc-wdownload__body{
  padding: 6px 18px 18px;
}

.sc-wdownload__subtitle{
  color: rgba(255,255,255,.68);
  font-size: .96rem;
  line-height: 1.45;
  margin-bottom: 14px;
}

html[data-theme="light"] .sc-wdownload__subtitle{
  color: rgba(15,23,42,.62);
}

.sc-wdownload__options{
  display: grid;
  gap: 10px;
}

.sc-wdownload__option{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,.10);
  background: #121212;
  color: rgba(255,255,255,.97);
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  box-shadow: none;
}

.sc-wdownload__option:hover{
  background: #191919;
  border-color: rgba(255,255,255,.16);
}

.sc-wdownload__option:active{
  background: #161616;
}

html[data-theme="light"] .sc-wdownload__option{
  border-color: rgba(15,23,42,.08);
  background: #f3f4f6;
  color: #111111;
}

html[data-theme="light"] .sc-wdownload__option:hover{
  border-color: rgba(15,23,42,.12);
  background: #eaecef;
}

html[data-theme="light"] .sc-wdownload__option:active{
  background: #e5e7eb;
}

.sc-wdownload__option-title{
  display: block;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 800;
}

.sc-wdownload__option-desc{
  display: block;
  margin-top: 6px;
  font-size: .92rem;
  line-height: 1.45;
  color: rgba(255,255,255,.66);
}

html[data-theme="light"] .sc-wdownload__option-desc{
  color: rgba(15,23,42,.62);
}

.sc-wdownload__actions{
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.sc-wdownload__btn{
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 14px;
  min-height: 46px;
  min-width: 120px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  color: inherit;
  background: rgba(255,255,255,.08);
  transition: background .12s ease;
}

.sc-wdownload__btn:hover{
  background: rgba(255,255,255,.12);
}

html[data-theme="light"] .sc-wdownload__btn{
  background: rgba(15,23,42,.06);
}

html[data-theme="light"] .sc-wdownload__btn:hover{
  background: rgba(15,23,42,.09);
}

.sc-wdownload__x:focus-visible,
.sc-wdownload__option:focus-visible,
.sc-wdownload__btn:focus-visible{
  outline: 3px solid rgba(59,130,246,.35);
  outline-offset: 2px;
}

@media (max-width: 420px){
  .sc-wdownload__panel{
    width: min(520px, calc(100vw - 18px));
    border-radius: 20px;
  }

  .sc-wdownload__top{
    padding: 16px 16px 8px;
  }

  .sc-wdownload__body{
    padding: 6px 16px 16px;
  }

  .sc-wdownload__option{
    padding: 15px 14px;
    border-radius: 14px;
  }
}
@media (prefers-reduced-motion: reduce){
  .sc-wshare__panel,
  .sc-wshare__card,
  .sc-wshare__copyhint,
  .sc-wshare__btn,
  .sc-wshare__x,
  .sc-wshare__social,
  .sc-wshare__preview.is-empty{
    transition: none;
    animation: none;
  }
}