.payment-alert {
  --payment-accent: #f2a20c;
  --payment-accent-strong: #d97706;
  --payment-text: #0f172a;
  --payment-muted: #475569;
  position: fixed;
  top: calc(var(--header-height, 4.5rem) + 12px);
  left: 50%;
  transform: translate(-50%, -10px);
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(520px, 92vw);
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.payment-alert.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.payment-alert[hidden] {
  display: none;
}

.payment-alert::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--toast-accent, var(--payment-accent)), transparent 70%);
  opacity: 0.9;
}

.payment-alert::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 999px;
  background: var(--toast-accent, var(--payment-accent));
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0.6;
}

.payment-alert.is-visible::after {
  animation: paymentToastProgress var(--toast-duration, 4500ms) linear forwards;
}

@keyframes paymentToastProgress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

.payment-alert__icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  background: rgba(242, 162, 12, 0.12);
  color: var(--payment-accent-strong);
}

.payment-alert__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.payment-alert__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--payment-text);
}

.payment-alert__message {
  font-size: 13px;
  color: var(--payment-muted);
}

.payment-alert__close {
  background: transparent;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
  color: var(--payment-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.payment-alert__close:hover {
  background: rgba(17, 24, 39, 0.06);
  color: var(--payment-text);
}

.payment-alert--success {
  border-color: rgba(47, 158, 68, 0.35);
  --toast-accent: #2f9e44;
}

.payment-alert--success .payment-alert__icon {
  background: rgba(47, 158, 68, 0.18);
  color: #1f7a36;
}

.payment-alert--success .payment-alert__title {
  color: #1f7a36;
}

.payment-alert--error {
  border-color: rgba(224, 49, 49, 0.35);
  --toast-accent: #e03131;
}

.payment-alert--error .payment-alert__icon {
  background: rgba(224, 49, 49, 0.18);
  color: #b11f1f;
}

.payment-alert--error .payment-alert__title {
  color: #b11f1f;
}
