/* PromotionShare — wallet route colour scheme (#/wallet) */

.tw-promo-share-apps {
  --tw-share-bg: #0b0f1a;
  --tw-share-cyan: #00cfff;
  --tw-share-gold: #ffd700;
  --tw-share-gold-dark: #ffb300;
  --tw-share-blue: #1e90ff;
  width: calc(100% - 0.64rem);
  max-width: 9.1rem;
  margin: 0.36rem auto 0.56rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  overflow: visible;
}

/* Wrapper keeps badge above panel (not clipped by overflow) */
.tw-promo-share-apps__panel-wrap {
  position: relative;
  padding-top: 0.14rem;
  overflow: visible;
}

/* ── SHARE VIA panel — same as wallet cards (cyan TL / gold BR) ── */
.tw-promo-share-apps__panel {
  position: relative;
  isolation: isolate;
  padding: 0.4rem 0.2rem 0.28rem;
  border: none;
  border-radius: 0.28rem;
  background-color: var(--tw-share-bg);
  background-image: linear-gradient(
    135deg,
    rgba(11, 60, 145, 0.45) 0%,
    rgba(2, 6, 23, 0.92) 100%
  );
  overflow: hidden;
  box-shadow:
    -0.16rem -0.16rem 0.48rem rgba(0, 207, 255, 0.16),
    0.16rem 0.16rem 0.48rem rgba(255, 215, 0, 0.14);
}

/* Cyan top-left → gold bottom-right ring (wallet-container-header-belly) */
.tw-promo-share-apps__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  box-sizing: border-box;
  background: linear-gradient(
    135deg,
    var(--tw-share-cyan) 0%,
    transparent 40%,
    transparent 60%,
    var(--tw-share-gold) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 1;
}

.tw-promo-share-apps__panel::after {
  content: none;
  display: none;
}

.tw-promo-share-apps__row {
  position: relative;
  z-index: 2;
}

.tw-promo-share-apps__badge {
  position: absolute;
  top: 0.14rem;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.06rem 0.28rem;
  background: var(--tw-share-bg, #0b0f1a);
  color: var(--tw-share-cyan, #00cfff);
  font-family: "Rajdhani", "Inter", system-ui, sans-serif;
  font-size: 0.26667rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  white-space: nowrap;
  z-index: 3;
}

/* ── Icon row ── */
.tw-promo-share-apps__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.08rem;
  padding: 0.06rem 0.04rem 0;
}

.tw-promo-share-apps__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
  transition: transform 0.2s ease;
}

.tw-promo-share-apps__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.96rem;
  height: 0.96rem;
  border-radius: 50%;
  flex-shrink: 0;
  color: #ffffff;
  box-shadow: 0 0.04rem 0.14rem rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tw-promo-share-apps__icon svg {
  width: 0.46rem;
  height: 0.46rem;
  display: block;
  fill: currentColor;
}

.tw-promo-share-apps__label {
  display: block;
  width: 100%;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.24rem;
  font-weight: 500;
  line-height: 1.15;
  text-align: center;
  color: rgba(234, 246, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Brand icon fills */
.tw-promo-share-apps__item[data-brand="whatsapp"] .tw-promo-share-apps__icon {
  background: #25d366;
}

.tw-promo-share-apps__item[data-brand="telegram"] .tw-promo-share-apps__icon {
  background: linear-gradient(145deg, #2aabee 0%, #229ed9 100%);
}

.tw-promo-share-apps__item[data-brand="facebook"] .tw-promo-share-apps__icon {
  background: #1877f2;
}

.tw-promo-share-apps__item[data-brand="instagram"] .tw-promo-share-apps__icon {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
}

.tw-promo-share-apps__item[data-brand="twitter"] .tw-promo-share-apps__icon {
  background: linear-gradient(145deg, #3a4454 0%, #0f1419 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Hover / focus */
.tw-promo-share-apps__item:hover .tw-promo-share-apps__icon,
.tw-promo-share-apps__item:focus-visible .tw-promo-share-apps__icon {
  transform: translateY(-0.04rem) scale(1.06);
  box-shadow: 0 0.06rem 0.2rem rgba(0, 0, 0, 0.32);
}

.tw-promo-share-apps__item:focus-visible .tw-promo-share-apps__icon {
  outline: 2px solid rgba(0, 207, 255, 0.55);
  outline-offset: 2px;
}

.tw-promo-share-apps__item:active {
  transform: scale(0.96);
}

/* ── COPY LINK CTA — wallet Transfer Balance button ── */
@keyframes tw-promo-share-shine {
  0% {
    transform: translate3d(-120%, 0, 0) skewX(-16deg);
  }
  100% {
    transform: translate3d(350%, 0, 0) skewX(-16deg);
  }
}

.tw-promo-share-apps__cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.16rem;
  width: 100%;
  min-height: 0.88rem;
  padding: 0.22rem 0.48rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  overflow: hidden;
  font-family: "Rajdhani", "Inter", system-ui, sans-serif;
  font-size: 0.32rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000000;
  background: linear-gradient(135deg, var(--tw-share-gold, #ffd700), var(--tw-share-gold-dark, #ffb300));
  box-shadow: 0 0.12rem 0.36rem rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.tw-promo-share-apps__cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 38%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 35%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(255, 255, 255, 0.08) 65%,
    transparent 100%
  );
  animation: tw-promo-share-shine 2.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

.tw-promo-share-apps__cta i,
.tw-promo-share-apps__cta span {
  position: relative;
  z-index: 2;
}

.tw-promo-share-apps__cta i {
  font-size: 0.36rem;
  line-height: 1;
  color: #000000;
}

.tw-promo-share-apps__cta:hover,
.tw-promo-share-apps__cta:focus-visible {
  transform: translateY(-0.02rem);
  box-shadow: 0 0.14rem 0.42rem rgba(0, 0, 0, 0.4);
  outline: none;
}

.tw-promo-share-apps__cta:focus-visible {
  outline: 2px solid rgba(255, 215, 0, 0.65);
  outline-offset: 2px;
}

.tw-promo-share-apps__cta:active {
  transform: scale(0.98);
}

/* ── Toast ── */
.tw-promo-share-toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 1.2rem);
  transform: translateX(-50%) translateY(0.4rem);
  z-index: 10050;
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  background: rgba(8, 12, 24, 0.94);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: var(--text_color_L1, #eaf6ff);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.34667rem;
  box-shadow: 0 0 0.22rem rgba(255, 215, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.tw-promo-share-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Responsive ── */
@media (max-width: 360px) {
  .tw-promo-share-apps__row {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.2rem;
  }

  .tw-promo-share-apps__item {
    flex: 0 1 calc(33.333% - 0.12rem);
  }
}

@media (min-width: 520px) {
  .tw-promo-share-apps__icon {
    width: 1.08rem;
    height: 1.08rem;
  }

  .tw-promo-share-apps__icon svg {
    width: 0.5rem;
    height: 0.5rem;
  }

  .tw-promo-share-apps__label {
    font-size: 0.26667rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tw-promo-share-apps__item,
  .tw-promo-share-apps__icon,
  .tw-promo-share-apps__cta {
    transition: none;
  }

  .tw-promo-share-apps__cta::before {
    animation: none;
  }
}

/* ── Gold poster frame — neon shimmer (reference) ── */
@keyframes tw-poster-gold-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

body.tw-promotion-share-active .promotionShare__container,
.promotionShare__container {
  overflow: visible !important;
}

body.tw-promotion-share-active .promotionShare__container .my-swipe,
body.tw-promotion-share-active .promotionShare__container .swiper,
.promotionShare__container .my-swipe,
.promotionShare__container .swiper {
  overflow: visible !important;
  padding-block: 0.22rem;
}

body.tw-promotion-share-active .promotionShare__container .swiper-wrapper .swiper-slide,
.promotionShare__container .swiper-wrapper .swiper-slide {
  position: relative;
  isolation: isolate;
  border-radius: 0.32rem;
  overflow: hidden;
  padding: 2px;
  box-sizing: border-box;
  filter: drop-shadow(0 0 0.12rem rgba(255, 215, 0, 0.35))
    drop-shadow(0 0 0.28rem rgba(255, 190, 0, 0.2));
}

/* Traveling gold shimmer ring */
body.tw-promotion-share-active .promotionShare__container .swiper-slide::before,
.promotionShare__container .swiper-slide::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220%;
  height: 220%;
  transform: translate(-50%, -50%);
  background: conic-gradient(
    from 0deg,
    #8b6914 0deg,
    #b8860b 40deg,
    #ffd700 100deg,
    #fff4a8 130deg,
    #ffffff 145deg,
    #fff8cc 155deg,
    #ffd700 190deg,
    #ffb300 260deg,
    #c8940a 320deg,
    #8b6914 360deg
  );
  animation: tw-poster-gold-spin 2.8s linear infinite;
  z-index: 0;
  pointer-events: none;
}

/* Corner flares + thin lit edge */
body.tw-promotion-share-active .promotionShare__container .swiper-slide::after,
.promotionShare__container .swiper-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 248, 210, 0.45);
  background:
    radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.55) 0%, transparent 11%),
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.42) 0%, transparent 11%),
    radial-gradient(circle at 100% 100%, rgba(255, 230, 140, 0.38) 0%, transparent 11%),
    radial-gradient(circle at 0 100%, rgba(255, 230, 140, 0.38) 0%, transparent 11%);
}

body.tw-promotion-share-active .promotionShare__container .promotionShare__container-swiper,
.promotionShare__container .promotionShare__container-swiper {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: calc(0.32rem - 2px);
  overflow: hidden;
  box-shadow: none;
}

body.tw-promotion-share-active .promotionShare__container .promotionShare__container-swiper::before,
body.tw-promotion-share-active .promotionShare__container .promotionShare__container-swiper::after,
.promotionShare__container .promotionShare__container-swiper::before,
.promotionShare__container .promotionShare__container-swiper::after {
  content: none;
  display: none;
}

/* Active poster — stronger outer glow */
body.tw-promotion-share-active .promotionShare__container .swiper-slide-active,
.promotionShare__container .swiper-slide-active {
  filter: drop-shadow(0 0 0.16rem rgba(255, 215, 0, 0.65))
    drop-shadow(0 0 0.34rem rgba(255, 200, 0, 0.45))
    drop-shadow(0 0 0.58rem rgba(255, 170, 0, 0.28));
}

body.tw-promotion-share-active .promotionShare__container .swiper-slide-active::after,
.promotionShare__container .swiper-slide-active::after {
  box-shadow:
    inset 0 0 0 1px rgba(255, 252, 230, 0.65),
    inset 0 0 0.18rem rgba(255, 215, 0, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  body.tw-promotion-share-active .promotionShare__container .swiper-slide::before,
  .promotionShare__container .swiper-slide::before {
    animation: none;
    transform: translate(-50%, -50%) rotate(130deg);
  }
}

/* ── Hide invite friends / commission slogan ── */
body.tw-promotion-share-active .promotionShare__container-slogan,
.promotionShare__container .promotionShare__container-slogan {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* ── Hide legacy Vue buttons ── */
body.tw-promotion-share-active .promotionShare__container-buttons,
.promotionShare__container .promotionShare__container-buttons {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}
