/* Neutral, theme-friendly button */
.pradsma-is-wrap{
  display:inline-block; 
  position:relative;
  overflow: visible;
  -webkit-touch-callout: none;
    -webkit-user-select: none;
     -khtml-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
}
.pradsma-is-btn{
  display:inline-flex; align-items:center; gap:.5rem;
  padding:.5rem .9rem; border-radius:999px; border:1px solid rgba(0,0,0,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.9), rgba(245,245,245,.9));
  color: inherit; font: 600 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.pradsma-is-btn:hover{ transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.08); border-color: rgba(0,0,0,.12); }
.pradsma-is-btn:active{ transform: translateY(0); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.pradsma-is-label span{ vertical-align: middle; }
.pradsma-is-count{ font-weight:700; min-width: 1.5em; text-align:right; }

/* Button bounce animation */
.pradsma-is-wrap.is-bouncing .pradsma-is-btn {
  animation: pradsma-button-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pradsma-button-pop {
  0% { transform: scale(1); }
  25% { transform: scale(1.15); }
  50% { transform: scale(0.95); }
  75% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Confetti container */
.pradsma-is-confetti {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 1px;
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%);
}

.pradsma-is-confetti .burst {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  opacity: 0;
}

/* Bright colors */
.pradsma-is-confetti .burst:nth-child(8n+1) { background: #FFD700; } /* Gold */
.pradsma-is-confetti .burst:nth-child(8n+2) { background: #FF6B35; } /* Coral */
.pradsma-is-confetti .burst:nth-child(8n+3) { background: #FF1493; } /* Deep Pink */
.pradsma-is-confetti .burst:nth-child(8n+4) { background: #00BFFF; } /* Deep Sky Blue */
.pradsma-is-confetti .burst:nth-child(8n+5) { background: #32CD32; } /* Lime Green */
.pradsma-is-confetti .burst:nth-child(8n+6) { background: #FF69B4; } /* Hot Pink */
.pradsma-is-confetti .burst:nth-child(8n+7) { background: #FFA500; } /* Orange */
.pradsma-is-confetti .burst:nth-child(8n)   { background: #9400D3; } /* Dark Violet */

/* --- ANIMATIONS --- */

/* 1: burst (default) */
.pradsma-is-confetti[data-anim="burst"].run .burst {
  animation: pradsma-anim-burst 1s ease-out forwards;
  animation-delay: calc(var(--i) * 0.03s);
  box-shadow: 0 0 20px currentColor;
}
@keyframes pradsma-anim-burst {
  0%   { opacity: 0; transform: translate(0, 0) scale(0); }
  15%  { opacity: 1; transform: translate(calc(var(--x) * 15px), calc(var(--y) * 15px)) scale(1.2); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 80px), calc(var(--y) * 80px)) scale(0.2); }
}

/* 2: sparkle */
.pradsma-is-confetti[data-anim="sparkle"].run .burst {
  animation: pradsma-anim-sparkle 0.8s ease-out forwards;
  animation-delay: calc(var(--i) * 0.05s);
  box-shadow: 0 0 12px currentColor;
}
@keyframes pradsma-anim-sparkle {
  0%, 100% { opacity: 0; transform: translate(0, 0) scale(0) rotate(0deg); }
  20% { opacity: 1; transform: translate(calc(var(--x) * 20px), calc(var(--y) * 20px)) scale(1) rotate(180deg); }
  40% { opacity: 0.5; transform: translate(calc(var(--x) * 40px), calc(var(--y) * 40px)) scale(0.8) rotate(360deg); }
  60% { opacity: 1; transform: translate(calc(var(--x) * 50px), calc(var(--y) * 50px)) scale(1.2) rotate(540deg); }
}

/* 3: pulse */
.pradsma-is-confetti[data-anim="pulse"].run .burst {
  animation: pradsma-anim-pulse 1s ease-out forwards;
  animation-delay: calc(var(--i) * 0.08s);
  border: 2px solid currentColor; background: transparent;
}
@keyframes pradsma-anim-pulse {
  0%   { opacity: 0; transform: translate(0, 0) scale(0); }
  50%  { opacity: 0.8; transform: translate(calc(var(--x) * 40px), calc(var(--y) * 40px)) scale(2); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 60px), calc(var(--y) * 60px)) scale(3); }
}

/* 4: fade */
.pradsma-is-confetti[data-anim="fade"].run .burst {
  animation: pradsma-anim-fade 1.2s ease-out forwards;
  animation-delay: calc(var(--i) * 0.04s);
  box-shadow: 0 0 15px currentColor;
}
@keyframes pradsma-anim-fade {
  0%   { opacity: 0; transform: translate(0, 0) scale(1); }
  30%  { opacity: 1; transform: translate(calc(var(--x) * 30px), calc(var(--y) * 30px)) scale(1.5); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 70px), calc(var(--y) * 70px)) scale(2.5); }
}

/* 5: pop */
.pradsma-is-confetti[data-anim="pop"].run .burst {
  animation: pradsma-anim-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  animation-delay: calc(var(--i) * 0.02s);
  box-shadow: 0 0 18px currentColor;
}
@keyframes pradsma-anim-pop {
  0%   { opacity: 0; transform: translate(0, 0) scale(0); }
  50%  { opacity: 1; transform: translate(calc(var(--x) * 25px), calc(var(--y) * 25px)) scale(1.5); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 60px), calc(var(--y) * 60px)) scale(0.3); }
}

/* 6: twinkle */
.pradsma-is-confetti[data-anim="twinkle"].run .burst {
  animation: pradsma-anim-twinkle 1s ease-in-out forwards;
  animation-delay: calc(var(--i) * 0.06s);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  box-shadow: 0 0 20px currentColor;
}
@keyframes pradsma-anim-twinkle {
  0%, 100% { opacity: 0; transform: translate(0, 0) scale(0) rotate(0deg); }
  25% { opacity: 1; transform: translate(calc(var(--x) * 20px), calc(var(--y) * 20px)) scale(1.2) rotate(90deg); }
  50% { opacity: 0.5; transform: translate(calc(var(--x) * 40px), calc(var(--y) * 40px)) scale(0.8) rotate(180deg); }
  75% { opacity: 1; transform: translate(calc(var(--x) * 50px), calc(var(--y) * 50px)) scale(1) rotate(270deg); }
}

/* 7: glow */
.pradsma-is-confetti[data-anim="glow"].run .burst {
  animation: pradsma-anim-glow 1.5s ease-out forwards;
  animation-delay: calc(var(--i) * 0.05s);
  box-shadow: 0 0 25px currentColor, 0 0 50px currentColor;
  filter: blur(2px);
}
@keyframes pradsma-anim-glow {
  0%   { opacity: 0; transform: translate(0, 0) scale(0.5); }
  40%  { opacity: 1; transform: translate(calc(var(--x) * 35px), calc(var(--y) * 35px)) scale(1.8); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 55px), calc(var(--y) * 55px)) scale(2.5); }
}

/* 8: hearts (NEW) */
.pradsma-is-confetti[data-anim="hearts"] .burst {
  background: #ff1493;
  width: 12px; height: 12px;
  animation: pradsma-anim-hearts 1.2s ease-out forwards;
  animation-delay: calc(var(--i) * 0.08s);
  border-radius: 0;
}
.pradsma-is-confetti[data-anim="hearts"] .burst::before,
.pradsma-is-confetti[data-anim="hearts"] .burst::after {
  content: ''; position: absolute; width: 12px; height: 12px;
  background: #ff1493; border-radius: 50%;
}
.pradsma-is-confetti[data-anim="hearts"] .burst::before { top: -6px; left: 0; }
.pradsma-is-confetti[data-anim="hearts"] .burst::after { top: 0; left: -6px; }

@keyframes pradsma-anim-hearts {
  0%   { opacity: 0; transform: translate(0, 0) scale(0) rotate(0); }
  20%  { opacity: 1; transform: translate(calc(var(--x) * 10px), calc(var(--y) * 10px - 20px)) scale(1.2) rotate(-15deg); }
  100% { opacity: 0; transform: translate(calc(var(--x) * 30px), calc(var(--y) * 30px - 100px)) scale(0.5) rotate(45deg); }
}

/* 9: fireworks (NEW) */
.pradsma-is-confetti[data-anim="fireworks"].run .burst {
  animation: pradsma-anim-fireworks 1.2s ease-out forwards;
  animation-delay: calc(var(--i) * 0.02s);
  border-radius: 2px; width: 4px; height: 12px;
}
@keyframes pradsma-anim-fireworks {
  0%   { opacity: 0; transform: translate(0, 0) scaleY(0) rotate(calc(var(--x) * 90deg)); }
  20%  { opacity: 1; transform: translate(calc(var(--x) * 40px), calc(var(--y) * 40px)) scaleY(1) rotate(calc(var(--x) * 90deg)); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--x) * 100px), calc(var(--y) * 100px + 30px)) scaleY(0.2) rotate(calc(var(--x) * 90deg)); }
}

/* Modal */
.pradsma-is-modal{ border:none; border-radius:12px; padding:0; max-width: 420px; width: calc(100% - 2rem); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); }
.pradsma-is-modal::backdrop{ background: rgba(0,0,0,.4); backdrop-filter: blur(4px); }
.pradsma-is-modal .pradsma-is-modal-body{ padding: 24px; }
.pradsma-is-modal-title{ margin:0 0 8px; font-size:18px; font-weight:700; color: #111; }
.pradsma-is-modal-desc{ margin:0 0 16px; font-size:14px; color: #666; line-height: 1.5; }
#pradsma-gsi-container-pradsma-default,
[id^="pradsma-gsi-container-"]{ margin: 6px 0 16px; }
.pradsma-is-form label{ display:block; margin:12px 0; font-size:13px; font-weight:600; color: #333; }
.pradsma-is-form input{ box-sizing: border-box; width:100%; padding:.7rem; margin-top: 6px; border-radius:8px; border:1px solid #ddd; font-size:14px; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.pradsma-is-form input:focus{ outline: none; border-color: #4285f4; box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1); }
.pradsma-is-actions{ display:flex; gap:.5rem; margin-top: 16px; }
.pradsma-is-submit{ flex: 1; padding:.7rem 1rem; border-radius:10px; border:1px solid rgba(0,0,0,.1); background:#111; color:#fff; font-weight:600; cursor:pointer; transition: background 0.2s ease; }
.pradsma-is-submit:hover{ background:#333; }
.pradsma-is-cancel{ padding:.7rem 1rem; border-radius:10px; border:1px solid rgba(0,0,0,.15); background:#fff; color:#111; font-weight:600; cursor:pointer; transition: background 0.2s ease; }
.pradsma-is-cancel:hover{ background:#f5f5f5; }
.pradsma-is-privacy{ font-size:11px; color:#999; margin-top:12px; line-height: 1.4; }

/* Toast */
.pradsma-toast{
  position: fixed; left:50%; bottom: 32px; transform: translateX(-50%);
  background: rgba(0,0,0,.9); color:#fff; padding:.75rem 1.25rem; border-radius:12px;
  font: 600 14px/1.4 system-ui; z-index: 10000; box-shadow: 0 4px 20px rgba(0,0,0,.3);
  animation: pradsma-toast-slide-up 0.3s ease;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
@keyframes pradsma-toast-slide-up {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.pradsma-toast.success{ background: rgba(16, 185, 129, 0.95); }
.pradsma-toast.info{ background: rgba(59, 130, 246, 0.95); }
.pradsma-toast.error{ background: rgba(239, 68, 68, 0.95); }
