/* ═══════════════════════════════════════════════════════
   MAJESSA — Premium Telegram Popup
   Luxury fashion-grade notification
   ═══════════════════════════════════════════════════════ */

/* ── Sparkle particles ── */
.mj-sparkle {
  position: fixed;
  bottom: 80px;
  right: 40px;
  width: 6px;
  height: 6px;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  will-change: transform, opacity;
}

.mj-sparkle::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(180, 160, 130, 0.9) 0%, transparent 70%);
  border-radius: 50%;
}

.mj-sparkle--star::before {
  background: none;
  width: 8px;
  height: 8px;
  clip-path: polygon(
    50% 0%, 61% 35%, 98% 35%, 68% 57%,
    79% 91%, 50% 70%, 21% 91%, 32% 57%,
    2% 35%, 39% 35%
  );
  background-color: rgba(200, 180, 150, 0.7);
}

@keyframes mj-sparkle-float {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.3);
  }
  15% {
    opacity: 1;
  }
  70% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-90px) translateX(var(--mj-drift, 0px)) scale(0.1);
  }
}

.mj-sparkle--animate {
  animation: mj-sparkle-float var(--mj-duration, 2s) var(--mj-delay, 0s) ease-out forwards;
}

/* ── Popup card ── */
.mj-tg-popup {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 340px;
  max-width: calc(100vw - 48px);
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.08),
    0 2px 12px rgba(0, 0, 0, 0.04);
  padding: 32px 28px 28px;
  font-family: 'Montserrat', sans-serif;
  opacity: 0;
  transform: translateY(24px);
  transition: none;
  pointer-events: none;
  visibility: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.mj-tg-popup--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.mj-tg-popup--hiding {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition:
    opacity 0.4s ease-in,
    transform 0.4s ease-in;
}

/* ── Close button ── */
.mj-tg-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.3;
  transition: opacity 0.3s ease;
  border-radius: 50%;
}

.mj-tg-popup__close:hover {
  opacity: 0.7;
}

.mj-tg-popup__close svg {
  width: 14px;
  height: 14px;
  stroke: #1a1a1a;
  stroke-width: 1.5;
  stroke-linecap: round;
}

/* ── Decorative line ── */
.mj-tg-popup__accent {
  width: 32px;
  height: 1px;
  background: #1a1a1a;
  margin-bottom: 20px;
  opacity: 0.2;
}

/* ── Title ── */
.mj-tg-popup__title {
  font-family: 'Tenor Sans', serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #1a1a1a;
  margin: 0 0 10px;
  line-height: 1.4;
}

/* ── Subtitle ── */
.mj-tg-popup__text {
  font-family: 'Montserrat', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: #888;
  line-height: 1.6;
  margin: 0 0 22px;
  letter-spacing: 0.01em;
}

/* ── CTA button ── */
.mj-tg-popup__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #1a1a1a;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 100px;
  transition:
    background 0.35s ease,
    transform 0.35s ease,
    box-shadow 0.35s ease;
  border: none;
  cursor: pointer;
}

.mj-tg-popup__btn:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  color: #fff;
  text-decoration: none;
}

.mj-tg-popup__btn:active {
  transform: translateY(0);
}

.mj-tg-popup__btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ── Mobile responsive ── */
@media (max-width: 576px) {
  .mj-tg-popup {
    bottom: 12px;
    right: 5%;
    left: 5%;
    width: 90%;
    max-width: none;
    padding: 28px 24px 24px;
    border-radius: 16px;
  }

  .mj-sparkle {
    right: 50%;
  }

  .mj-tg-popup__title {
    font-size: 16px;
  }

  .mj-tg-popup__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Reduce motion for a11y ── */
@media (prefers-reduced-motion: reduce) {
  .mj-tg-popup,
  .mj-tg-popup--visible,
  .mj-tg-popup--hiding {
    transition: none;
  }
  .mj-sparkle--animate {
    animation: none;
  }
}
