.tp-toast-host {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

@keyframes tpCartPulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.tp-cart-pulse {
  animation: tpCartPulse 360ms ease;
  transform-origin: center center;
}

.tp-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, 92vw);
  min-width: min(320px, 92vw);
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(22, 163, 74, 0.28);
  background: #16a34a;
  pointer-events: none;
}

.tp-toast--error {
  background: #dc2626;
  border-color: rgba(220, 38, 38, 0.28);
}

.tp-toast--in {
  animation: tpToastIn 520ms cubic-bezier(.16, 1, .3, 1);
}

.tp-toast__icon {
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: #16a34a;
  flex: 0 0 auto;
}

.tp-toast__icon-glyph {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tp-toast__icon-glyph svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.tp-toast__icon-glyph[data-toast-icon-success] svg {
  fill: none;
  stroke: currentColor;
}

.tp-toast--error .tp-toast__icon {
  color: #dc2626;
}

.tp-toast__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.tp-toast__message {
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25;
}

.tp-toast__detail {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  font-size: 0.75rem;
  line-height: 1.35;
}

.tp-toast__action,
.tp-toast__close {
  pointer-events: auto;
}

.tp-toast__action {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.tp-toast__action:hover {
  background: rgba(255, 255, 255, 0.22);
}

.tp-toast__close {
  margin-left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.tp-toast__close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
}

@keyframes tpToastIn {
  from {
    opacity: 0;
    transform: translate3d(0, -18px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@media (max-width: 640px) {
  .tp-toast-host {
    top: 72px;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
  }

  .tp-toast {
    min-width: 0;
    width: min(360px, calc(100vw - 24px));
    align-items: flex-start;
    gap: 9px;
    padding: 12px;
  }

  .tp-toast__icon {
    width: 30px;
    height: 30px;
    margin-top: 1px;
  }

  .tp-toast__message {
    font-size: 0.875rem;
  }

  .tp-toast__detail {
    font-size: 0.75rem;
  }

  .tp-toast__close {
    width: 24px;
    height: 24px;
    margin-left: 0;
    margin-top: 1px;
  }
}
