.sw-pig-donation {
  --sw-pig-pink: #ff9fc1;
  --sw-pig-pink-dark: #f26b9b;
  --sw-pig-ink: #203044;
  --sw-pig-glass: rgba(13, 31, 54, 0.58);
  --sw-pig-line: rgba(178, 232, 255, 0.62);
  position: fixed;
  right: 24px;
  bottom: 104px;
  z-index: 999999;
  width: min(420px, calc(100vw - 32px));
  color: #f8fbff;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  pointer-events: auto;
  filter: drop-shadow(0 24px 52px rgba(0, 0, 0, 0.42));
  animation: swPigRootIn 680ms cubic-bezier(.18, .9, .2, 1.08) both;
}

.sw-pig-donation__pig-wrap {
  position: absolute;
  right: 18px;
  bottom: calc(100% - 18px);
  width: 150px;
  height: 122px;
  transform-origin: 90% 90%;
  animation: swPigPeek 900ms cubic-bezier(.18, .98, .22, 1) both;
}

.sw-pig-donation__pig {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 104px;
  height: 92px;
  transform-origin: 52% 78%;
  animation: swPigLook 1.1s 220ms cubic-bezier(.18, .98, .22, 1) both;
}

.sw-pig-donation__face {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 86px;
  height: 76px;
  border-radius: 46% 48% 44% 44%;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, .75) 0 8%, transparent 18%),
    linear-gradient(145deg, #ffc1d4, var(--sw-pig-pink) 55%, var(--sw-pig-pink-dark));
  box-shadow:
    inset -10px -14px 20px rgba(174, 43, 100, .28),
    inset 10px 8px 15px rgba(255, 255, 255, .46),
    0 0 0 2px rgba(255, 255, 255, .55),
    0 10px 30px rgba(255, 99, 159, .34);
}

.sw-pig-donation__ear {
  position: absolute;
  top: 4px;
  width: 30px;
  height: 38px;
  border-radius: 70% 35% 70% 35%;
  background: linear-gradient(145deg, #ffbad0, #f36d9d);
  box-shadow: inset 5px 5px 10px rgba(255,255,255,.42), inset -5px -8px 9px rgba(150,25,85,.22);
}

.sw-pig-donation__ear--left {
  left: 8px;
  transform: rotate(-24deg);
}

.sw-pig-donation__ear--right {
  right: 5px;
  transform: rotate(26deg) scaleX(-1);
}

.sw-pig-donation__eye {
  position: absolute;
  top: 25px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 16%, #192438 18% 100%);
  transform-origin: 50% 52%;
  animation: swPigBlink 420ms cubic-bezier(.6, 0, .2, 1) var(--sw-pig-blink-count) 1250ms;
}

.sw-pig-donation__eye--left { left: 27px; }
.sw-pig-donation__eye--right { right: 28px; }

.sw-pig-donation__snout {
  position: absolute;
  left: 27px;
  top: 39px;
  width: 34px;
  height: 24px;
  border-radius: 50% 50% 48% 48%;
  background: linear-gradient(180deg, #ffd3df, #ef7ba5);
  box-shadow: inset 4px 5px 8px rgba(255,255,255,.5), inset -4px -6px 8px rgba(143, 26, 77, .22);
}

.sw-pig-donation__snout i {
  position: absolute;
  top: 9px;
  width: 6px;
  height: 8px;
  border-radius: 50%;
  background: rgba(87, 31, 62, .78);
}

.sw-pig-donation__snout i:first-child { left: 9px; }
.sw-pig-donation__snout i:last-child { right: 9px; }

.sw-pig-donation__mouth {
  position: absolute;
  left: 40px;
  top: 66px;
  width: 14px;
  height: 7px;
  border-bottom: 3px solid rgba(90, 28, 60, .7);
  border-radius: 0 0 18px 18px;
}

.sw-pig-donation__hoof {
  position: absolute;
  bottom: 4px;
  width: 28px;
  height: 24px;
  border-radius: 12px 12px 8px 8px;
  background: linear-gradient(180deg, #ffc4d6, #e96a96);
  box-shadow: inset 3px 3px 7px rgba(255,255,255,.45), 0 8px 14px rgba(111, 34, 79, .22);
}

.sw-pig-donation__hoof--left {
  left: 8px;
  transform: rotate(-18deg);
}

.sw-pig-donation__hoof--right {
  right: 10px;
  transform: rotate(14deg);
}

.sw-pig-donation__pocket {
  position: absolute;
  right: -3px;
  bottom: -6px;
  width: 42px;
  height: 30px;
  border-radius: 8px 8px 16px 16px;
  background: linear-gradient(145deg, rgba(59, 121, 176, .78), rgba(15, 45, 84, .92));
  border: 1px solid rgba(195, 238, 255, .4);
  opacity: .92;
}

.sw-pig-donation__bubble {
  position: absolute;
  right: 92px;
  top: 18px;
  min-width: 178px;
  max-width: 245px;
  padding: 11px 14px;
  border-radius: 20px 20px 6px 20px;
  background: rgba(255, 255, 255, .88);
  color: #253246;
  font-size: 14px;
  line-height: 1.18;
  letter-spacing: .01em;
  box-shadow: 0 12px 30px rgba(0,0,0,.22), inset 0 0 0 1px rgba(255,255,255,.6);
  animation: swPigBubble 560ms 560ms cubic-bezier(.18,.98,.22,1) both;
}

.sw-pig-donation__bubble::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 15px;
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, .88);
  transform: rotate(45deg);
  border-radius: 3px;
}

.sw-pig-donation__modal {
  position: relative;
  padding: 22px;
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 177, 210, .2), transparent 32%),
    radial-gradient(circle at 86% 18%, rgba(110, 224, 255, .18), transparent 34%),
    linear-gradient(145deg, rgba(11, 28, 51, .76), rgba(9, 21, 37, .58));
  border: 1px solid var(--sw-pig-line);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -28px 60px rgba(9, 204, 168, .08),
    0 0 0 1px rgba(255, 255, 255, .08),
    0 28px 70px rgba(0,0,0,.36),
    0 0 44px rgba(124, 230, 255, .16);
  backdrop-filter: blur(18px) saturate(138%);
  -webkit-backdrop-filter: blur(18px) saturate(138%);
  overflow: hidden;
  animation: swPigModal 640ms 360ms cubic-bezier(.18,.98,.22,1) both;
}

.sw-pig-donation__modal::before {
  content: "";
  position: absolute;
  inset: -42% -18%;
  background: conic-gradient(from 90deg, transparent, rgba(255,255,255,.16), transparent 32%, rgba(74, 226, 178, .14), transparent 62%);
  opacity: .48;
  animation: swPigAura 8s linear infinite;
  pointer-events: none;
}

.sw-pig-donation__title,
.sw-pig-donation__text,
.sw-pig-donation__amounts,
.sw-pig-donation__custom,
.sw-pig-donation__actions,
.sw-pig-donation__legal,
.sw-pig-donation__thanks {
  position: relative;
  z-index: 1;
}

.sw-pig-donation__title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -.035em;
  color: #ffffff;
  text-shadow: 0 0 22px rgba(159, 231, 255, .32);
}

.sw-pig-donation__text {
  margin: 0 0 16px;
  color: rgba(237, 247, 255, .86);
  font-size: 14px;
  line-height: 1.36;
}

.sw-pig-donation__amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.sw-pig-donation__amount,
.sw-pig-donation__button {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.sw-pig-donation__amount {
  min-height: 42px;
  border-radius: 16px;
  color: #ecf9ff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(196, 238, 255, .28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.sw-pig-donation__amount:hover,
.sw-pig-donation__amount--active {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(255, 172, 69, .7), rgba(255, 112, 163, .58));
  border-color: rgba(255, 232, 158, .8);
  box-shadow: 0 0 24px rgba(255, 170, 75, .28), inset 0 1px 0 rgba(255,255,255,.34);
}

.sw-pig-donation__custom {
  display: grid;
  grid-template-columns: 1fr 112px;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: 16px;
  color: rgba(232, 244, 255, .82);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(196, 238, 255, .18);
  font-size: 13px;
}

.sw-pig-donation__input {
  width: 100%;
  min-height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(196, 238, 255, .28);
  background: rgba(1, 11, 22, .55);
  color: #fff;
  padding: 0 10px;
  outline: none;
}

.sw-pig-donation__input:focus {
  border-color: rgba(125, 235, 255, .85);
  box-shadow: 0 0 18px rgba(125, 235, 255, .18);
}

.sw-pig-donation__actions {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 10px;
  margin-bottom: 10px;
}

.sw-pig-donation__button {
  min-height: 46px;
  border-radius: 18px;
  font-size: 14px;
  letter-spacing: .01em;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.sw-pig-donation__button:hover {
  transform: translateY(-1px);
}

.sw-pig-donation__button:disabled {
  cursor: wait;
  opacity: .72;
}

.sw-pig-donation__button--primary {
  color: #05261d;
  background: linear-gradient(135deg, #92ffd7, #fff0a5 48%, #ff9dbb);
  box-shadow: 0 0 28px rgba(116, 255, 202, .32), inset 0 1px 0 rgba(255,255,255,.55);
}

.sw-pig-donation__button--secondary {
  color: rgba(240, 249, 255, .86);
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(196, 238, 255, .22);
}

.sw-pig-donation__legal,
.sw-pig-donation__thanks {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.28;
  color: rgba(232, 244, 255, .7);
}

.sw-pig-donation__thanks {
  margin-top: 5px;
  color: rgba(183, 255, 220, .82);
}

.sw-pig-donation--shake .sw-pig-donation__modal {
  animation: swPigShake 420ms ease both;
}

.sw-pig-donation--sad .sw-pig-donation__mouth {
  top: 69px;
  border-bottom: 0;
  border-top: 3px solid rgba(90, 28, 60, .7);
  border-radius: 18px 18px 0 0;
}

.sw-pig-donation--pocket .sw-pig-donation__modal {
  animation: swPigPocket 1000ms cubic-bezier(.66, -.1, .26, 1.1) both;
  transform-origin: 92% 0%;
}

.sw-pig-donation--leaving .sw-pig-donation__pig-wrap {
  animation: swPigExit 1150ms 180ms cubic-bezier(.8, -.12, .32, 1) both;
}

.sw-pig-donation--pff::after {
  content: "\00043f\000444";
  position: absolute;
  right: 134px;
  bottom: 72px;
  color: rgba(255,255,255,.82);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: .08em;
  animation: swPigPff 860ms 620ms ease both;
}

.sw-pig-donation--success-only {
  width: 320px;
  bottom: 98px;
}

.sw-pig-donation--success-only .sw-pig-donation__pig-wrap {
  position: relative;
  right: auto;
  bottom: auto;
  margin-left: auto;
}

.sw-pig-donation__pig--happy .sw-pig-donation__mouth {
  width: 24px;
  left: 35px;
  height: 12px;
  border-bottom-width: 4px;
}

.sw-pig-donation--reduced,
.sw-pig-donation--reduced .sw-pig-donation__pig-wrap,
.sw-pig-donation--reduced .sw-pig-donation__pig,
.sw-pig-donation--reduced .sw-pig-donation__bubble,
.sw-pig-donation--reduced .sw-pig-donation__modal,
.sw-pig-donation--reduced .sw-pig-donation__eye,
.sw-pig-donation--reduced .sw-pig-donation__modal::before {
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 1ms !important;
}

@media (max-width: 720px) {
  .sw-pig-donation {
    right: 12px;
    bottom: 88px;
    width: min(92vw, 390px);
  }

  .sw-pig-donation__pig-wrap {
    right: 4px;
    transform: scale(.9);
    transform-origin: right bottom;
  }

  .sw-pig-donation__bubble {
    right: 80px;
    max-width: 210px;
    font-size: 13px;
  }

  .sw-pig-donation__modal {
    padding: 18px;
    border-radius: 24px;
  }

  .sw-pig-donation__amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sw-pig-donation__actions,
  .sw-pig-donation__custom {
    grid-template-columns: 1fr;
  }
}

@keyframes swPigRootIn {
  from { opacity: 0; transform: translate3d(26px, 18px, 0) scale(.96); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes swPigPeek {
  0% { transform: translate3d(80px, 64px, 0) rotate(12deg); opacity: 0; }
  56% { transform: translate3d(-8px, -4px, 0) rotate(-5deg); opacity: 1; }
  100% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 1; }
}

@keyframes swPigLook {
  0% { transform: rotate(18deg) scale(.94); }
  58% { transform: rotate(-7deg) scale(1.04); }
  100% { transform: rotate(0deg) scale(1); }
}

@keyframes swPigBubble {
  from { opacity: 0; transform: translate3d(10px, 8px, 0) scale(.94); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes swPigModal {
  from { opacity: 0; transform: translate3d(0, 18px, 0) scale(.98); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes swPigBlink {
  0%, 54%, 100% { transform: scaleY(1); }
  62%, 78% { transform: scaleY(.08); }
}

@keyframes swPigAura {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes swPigShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  44% { transform: translateX(6px); }
  68% { transform: translateX(-4px); }
}

@keyframes swPigPocket {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  70% { opacity: .9; transform: translate3d(120px, -68px, 0) rotate(8deg) scale(.24); }
  100% { opacity: 0; transform: translate3d(128px, -72px, 0) rotate(10deg) scale(.08); }
}

@keyframes swPigExit {
  0% { transform: translate3d(0,0,0) rotate(0deg); }
  30% { transform: translate3d(-18px, 8px, 0) rotate(-9deg); }
  100% { transform: translate3d(210px, 70px, 0) rotate(18deg); opacity: 0; }
}

@keyframes swPigPff {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.6); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(-54px, -18px, 0) scale(1.35); }
}


.sw-pig-donation--demo-success .sw-pig-donation__modal {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 -28px 60px rgba(9, 204, 168, .16),
    0 0 0 1px rgba(151, 255, 211, .22),
    0 28px 70px rgba(0,0,0,.36),
    0 0 54px rgba(116, 255, 202, .32);
}

.sw-pig-donation--demo-success .sw-pig-donation__button--primary {
  background: linear-gradient(135deg, #9dffd9, #ffe887 46%, #ffbad0);
}


/* Piggy-bank upgrade: pleading face, server-donation story, and coin-to-slot motion. */
.sw-pig-donation__pig-wrap {
  width: 190px;
  height: 154px;
  right: 10px;
}

.sw-pig-donation__pig {
  width: 156px;
  height: 126px;
}

.sw-pig-donation__barrel {
  position: absolute;
  left: 7px;
  bottom: 9px;
  z-index: 1;
  width: 122px;
  height: 68px;
  border-radius: 44% 50% 46% 48%;
  background:
    radial-gradient(circle at 25% 26%, rgba(255,255,255,.68) 0 8%, transparent 22%),
    linear-gradient(135deg, #ffd2dd 0%, #ffa5c2 46%, #ef6b9c 100%);
  box-shadow:
    inset 10px 8px 16px rgba(255,255,255,.42),
    inset -14px -14px 22px rgba(146,27,82,.26),
    0 16px 28px rgba(116,34,77,.24),
    0 0 0 2px rgba(255,255,255,.38);
  overflow: hidden;
}

.sw-pig-donation__barrel::before,
.sw-pig-donation__barrel::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 15px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.36);
  box-shadow: inset 0 -2px 4px rgba(128,35,77,.18);
}

.sw-pig-donation__barrel::before { top: 15px; }
.sw-pig-donation__barrel::after { top: 25px; opacity: .72; }

.sw-pig-donation__barrel-slot {
  position: absolute;
  left: 45px;
  top: 9px;
  z-index: 2;
  width: 38px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(36,22,42,.92), rgba(91,31,70,.82));
  box-shadow:
    inset 0 2px 5px rgba(0,0,0,.42),
    0 0 16px rgba(255,238,135,.34);
}

.sw-pig-donation__barrel-slot::after {
  content: "";
  position: absolute;
  inset: -6px -8px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,235,122,.66), transparent 62%);
  opacity: 0;
}

.sw-pig-donation__face {
  z-index: 4;
  left: 58px;
  top: 7px;
  transform: rotate(-2deg);
}

.sw-pig-donation__ear { z-index: 5; }
.sw-pig-donation__ear--left { left: 55px; top: 0; }
.sw-pig-donation__ear--right { right: 8px; top: 1px; }

.sw-pig-donation__brow {
  position: absolute;
  top: 17px;
  z-index: 2;
  width: 18px;
  height: 6px;
  border-radius: 999px;
  background: rgba(113,34,73,.42);
  transform-origin: 50% 50%;
}

.sw-pig-donation__brow--left { left: 22px; transform: rotate(14deg); }
.sw-pig-donation__brow--right { right: 23px; transform: rotate(-14deg); }

.sw-pig-donation__eye {
  width: 13px;
  height: 15px;
  background:
    radial-gradient(circle at 36% 24%, #fff 0 12%, transparent 13% 100%),
    radial-gradient(circle at 50% 62%, #203044 0 48%, #5e2b59 52% 100%);
  box-shadow: 0 0 8px rgba(255,255,255,.38);
}

.sw-pig-donation__eye::after {
  content: "";
  position: absolute;
  left: 1px;
  bottom: -6px;
  width: 11px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.74), transparent 70%);
  opacity: .78;
}

.sw-pig-donation__mouth {
  left: 35px;
  top: 65px;
  width: 24px;
  height: 10px;
  border-bottom-width: 3px;
  transform: rotate(-2deg);
}

.sw-pig-donation__hoof {
  z-index: 6;
  bottom: 3px;
}

.sw-pig-donation__hoof--left { left: 18px; }
.sw-pig-donation__hoof--right { right: 8px; }

.sw-pig-donation__pocket {
  z-index: 7;
  right: 3px;
  bottom: 2px;
}

.sw-pig-donation__coin,
.sw-pig-donation__coin-glow {
  position: absolute;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
}

.sw-pig-donation__coin {
  right: 88px;
  top: -26px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fff7bd 0 10%, transparent 12%),
    radial-gradient(circle at 52% 54%, #ffe78a 0 20%, #f6bd32 42%, #b66b10 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,.38),
    inset -4px -5px 9px rgba(116,63,0,.24),
    0 0 22px rgba(255,214,70,.72);
}

.sw-pig-donation__coin::after {
  content: "\20BD";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(87,47,0,.68);
  font: 900 15px/1 Arial, sans-serif;
}

.sw-pig-donation__coin-glow {
  right: 80px;
  top: -32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,231,128,.72), transparent 68%);
  filter: blur(2px);
}

.sw-pig-donation--coin-drop .sw-pig-donation__coin {
  animation: swPigCoinDrop 1180ms 160ms cubic-bezier(.26,.92,.28,1) both;
}

.sw-pig-donation--coin-drop .sw-pig-donation__coin-glow {
  animation: swPigCoinGlow 1180ms 160ms ease both;
}

.sw-pig-donation--coin-drop .sw-pig-donation__barrel-slot::after {
  animation: swPigSlotFlash 520ms 900ms ease both;
}

.sw-pig-donation--coin-drop .sw-pig-donation__barrel {
  animation: swPigBarrelThank 720ms 820ms cubic-bezier(.2,.92,.2,1) both;
}

.sw-pig-donation--demo-success .sw-pig-donation__bubble,
.sw-pig-donation--success-only .sw-pig-donation__bubble {
  background: rgba(255, 247, 202, .94);
  color: #2d2106;
  box-shadow: 0 16px 36px rgba(0,0,0,.26), 0 0 28px rgba(255,218,96,.32), inset 0 0 0 1px rgba(255,255,255,.8);
}

@keyframes swPigCoinDrop {
  0% { opacity: 0; transform: translate3d(-70px, -54px, 0) rotate(-130deg) scale(.55); }
  18% { opacity: 1; transform: translate3d(-48px, -42px, 0) rotate(-40deg) scale(1); }
  58% { opacity: 1; transform: translate3d(-20px, 24px, 0) rotate(240deg) scale(.94); }
  82% { opacity: 1; transform: translate3d(-6px, 54px, 0) rotate(420deg) scale(.58); }
  100% { opacity: 0; transform: translate3d(0, 58px, 0) rotate(520deg) scale(.22); }
}

@keyframes swPigCoinGlow {
  0%, 100% { opacity: 0; transform: translate3d(-70px, -54px, 0) scale(.6); }
  22% { opacity: .82; }
  78% { opacity: .7; transform: translate3d(-6px, 54px, 0) scale(.7); }
}

@keyframes swPigSlotFlash {
  0% { opacity: 0; transform: scale(.7); }
  45% { opacity: .94; transform: scale(1.22); }
  100% { opacity: 0; transform: scale(1.55); }
}

@keyframes swPigBarrelThank {
  0%, 100% { transform: translateY(0) scale(1); }
  34% { transform: translateY(3px) scale(1.04,.94); }
  68% { transform: translateY(-2px) scale(.98,1.03); }
}
