/**
 * Ventopia Alert v2 — livelier motion
 * States: loading · success · fail
 */

.vt-alert-root {
  --vt-a-accent: #667eea;
  --vt-a-accent-2: #764ba2;
  --vt-a-accent-3: #a78bfa;
  --vt-a-ok: #10b981;
  --vt-a-ok-soft: #d1fae5;
  --vt-a-fail: #ef4444;
  --vt-a-fail-soft: #fee2e2;
  --vt-a-text: #0f172a;
  --vt-a-muted: #64748b;
  --vt-a-card: rgba(255, 255, 255, 0.94);
  --vt-a-border: rgba(226, 232, 240, 0.9);
  --vt-a-shadow: 0 28px 72px rgba(15, 23, 42, 0.22), 0 8px 24px rgba(102, 126, 234, 0.16);
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.vt-alert-root.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.vt-alert-root__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}

.vt-alert-root__backdrop::before,
.vt-alert-root__backdrop::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0;
  pointer-events: none;
}

.vt-alert-root.is-open .vt-alert-root__backdrop::before {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  background: radial-gradient(circle, rgba(102, 126, 234, 0.55), transparent 68%);
  top: 12%;
  left: 8%;
  opacity: 0.55;
  animation: vtAlertOrbA 5.5s ease-in-out infinite;
}

.vt-alert-root.is-open .vt-alert-root__backdrop::after {
  width: min(50vw, 380px);
  height: min(50vw, 380px);
  background: radial-gradient(circle, rgba(118, 75, 162, 0.5), transparent 68%);
  bottom: 10%;
  right: 6%;
  opacity: 0.5;
  animation: vtAlertOrbB 6.8s ease-in-out infinite;
}

.vt-alert {
  position: relative;
  width: min(100%, 380px);
  padding: 34px 28px 28px;
  border-radius: 26px;
  background: var(--vt-a-card);
  border: 1px solid var(--vt-a-border);
  box-shadow: var(--vt-a-shadow);
  text-align: center;
  overflow: hidden;
  transform: translateY(28px) scale(0.88);
  opacity: 0;
  transition: box-shadow 0.35s ease;
}

.vt-alert-root.is-open .vt-alert {
  /* Final-state fallback for Safari, interrupted animations and Reduce Motion. */
  display: flex !important;
  flex-direction: column;
  visibility: visible !important;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: vtAlertCardIn 0.55s cubic-bezier(0.22, 1.35, 0.36, 1) forwards;
}

/* After first entrance (or morph), keep settled — removing is-morphing must NOT refire cardIn */
.vt-alert-root.is-open .vt-alert.has-entered {
  animation: none;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.vt-alert-root.is-open .vt-alert.has-entered.is-morphing {
  animation: vtAlertCardMorph 0.55s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.vt-alert-root.is-open .vt-alert.has-entered[data-state="fail"].is-morphing {
  animation: vtAlertCardShake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.vt-alert-root.is-closing .vt-alert {
  animation: vtAlertCardOut 0.28s ease forwards;
}

.vt-alert.is-morphing {
  animation: vtAlertCardMorph 0.55s cubic-bezier(0.22, 1.2, 0.36, 1);
}

.vt-alert[data-state="fail"].is-morphing {
  animation: vtAlertCardShake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* Ambient glow behind card */
.vt-alert__glow {
  position: absolute;
  inset: -40% -30% auto;
  height: 80%;
  border-radius: 50%;
  filter: blur(42px);
  opacity: 0.4;
  pointer-events: none;
  transition: background 0.45s ease, opacity 0.45s ease;
  background: radial-gradient(circle, var(--vt-a-accent) 0%, transparent 70%);
  animation: vtAlertGlowPulse 2.4s ease-in-out infinite;
}

.vt-alert[data-state="success"] .vt-alert__glow {
  background: radial-gradient(circle, var(--vt-a-ok) 0%, transparent 70%);
  opacity: 0.38;
  animation: vtAlertGlowPulseOk 2s ease-in-out infinite;
}

.vt-alert[data-state="fail"] .vt-alert__glow {
  background: radial-gradient(circle, var(--vt-a-fail) 0%, transparent 70%);
  opacity: 0.36;
  animation: none;
}

/* Floating sparkles around card */
.vt-alert__spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--vt-a-accent);
  opacity: 0;
  pointer-events: none;
  filter: blur(0.2px);
}

.vt-alert-root.is-open .vt-alert__spark {
  opacity: 0.7;
  animation: vtAlertSparkFloat 2.8s ease-in-out infinite;
}

.vt-alert__spark:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; background: var(--vt-a-accent); }
.vt-alert__spark:nth-child(2) { top: 28%; right: 14%; animation-delay: 0.4s; background: var(--vt-a-accent-2); width: 4px; height: 4px; }
.vt-alert__spark:nth-child(3) { bottom: 22%; left: 18%; animation-delay: 0.9s; background: var(--vt-a-accent-3); width: 5px; height: 5px; }
.vt-alert__spark:nth-child(4) { bottom: 30%; right: 16%; animation-delay: 1.3s; background: #c4b5fd; width: 4px; height: 4px; }

.vt-alert[data-state="success"] .vt-alert__spark { background: #34d399; }
.vt-alert[data-state="fail"] .vt-alert__spark { background: #f87171; opacity: 0.35; }

/* Icon stage */
.vt-alert__icon {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 22px;
}

.vt-alert__pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(102, 126, 234, 0.35);
  opacity: 0;
  pointer-events: none;
}

.vt-alert[data-state="loading"] .vt-alert__pulse {
  animation: vtAlertRipple 1.8s ease-out infinite;
}

.vt-alert[data-state="loading"] .vt-alert__pulse:nth-of-type(2) {
  animation-delay: 0.6s;
}

.vt-alert[data-state="success"] .vt-alert__pulse,
.vt-alert[data-state="fail"] .vt-alert__pulse {
  display: block;
  opacity: 0;
}

.vt-alert[data-state="success"] .vt-alert__pulse {
  border-color: rgba(16, 185, 129, 0.45);
}

.vt-alert[data-state="success"] .vt-alert__pulse.vt-alert__pulse--replay {
  animation: vtAlertRippleOk 1.5s ease-out infinite;
}

.vt-alert[data-state="success"] .vt-alert__pulse.vt-alert__pulse--replay:nth-of-type(2) {
  animation-delay: 0.5s;
}

.vt-alert[data-state="fail"] .vt-alert__pulse {
  border-color: rgba(239, 68, 68, 0.45);
}

.vt-alert[data-state="fail"] .vt-alert__pulse.vt-alert__pulse--replay {
  animation: vtAlertRippleFail 1.35s ease-out infinite;
}

.vt-alert[data-state="fail"] .vt-alert__pulse.vt-alert__pulse--replay:nth-of-type(2) {
  animation-delay: 0.45s;
}

.vt-alert__icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
  transition: opacity 0.25s ease, transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.vt-alert[data-state="loading"] .vt-alert__icon-ring {
  border-color: rgba(102, 126, 234, 0.15);
  border-top-color: var(--vt-a-accent);
  border-right-color: rgba(118, 75, 162, 0.55);
  animation: vtAlertSpin 0.75s linear infinite;
  box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.35);
  opacity: 1;
}

.vt-alert[data-state="loading"] .vt-alert__icon {
  animation: vtAlertIconBreathe 2s ease-in-out infinite;
}

.vt-alert[data-state="success"] .vt-alert__icon-ring,
.vt-alert[data-state="fail"] .vt-alert__icon-ring {
  opacity: 0;
  transform: scale(0.55);
  animation: none;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.vt-alert[data-state="success"] .vt-alert__icon {
  animation: vtAlertSuccessIconIn 0.7s cubic-bezier(0.22, 1.35, 0.36, 1) forwards;
}

.vt-alert[data-state="fail"] .vt-alert__icon {
  animation: vtAlertFailIconIn 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
}

.vt-alert__glyph {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vt-alert__glyph svg {
  width: 96px;
  height: 96px;
  overflow: visible;
}

.vt-alert__glyph--loading {
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.vt-alert__glyph--loading .vt-alert__dots span {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 3.5px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vt-a-accent), var(--vt-a-accent-2));
  animation: vtAlertDot 1s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.35);
}

.vt-alert__glyph--loading .vt-alert__dots span:nth-child(2) { animation-delay: 0.12s; }
.vt-alert__glyph--loading .vt-alert__dots span:nth-child(3) { animation-delay: 0.24s; }

/* ===== Success / Fail / Question / Info result icons ===== */
.vt-alert__glyph--success,
.vt-alert__glyph--fail,
.vt-alert__glyph--question,
.vt-alert__glyph--info {
  opacity: 0;
  pointer-events: none;
}

.vt-alert[data-state="loading"] .vt-alert__glyph--loading { opacity: 1; }
.vt-alert[data-state="loading"] .vt-alert__glyph--success,
.vt-alert[data-state="loading"] .vt-alert__glyph--fail,
.vt-alert[data-state="loading"] .vt-alert__glyph--question,
.vt-alert[data-state="loading"] .vt-alert__glyph--info { opacity: 0; }

.vt-alert[data-state="success"] .vt-alert__glyph--loading,
.vt-alert[data-state="fail"] .vt-alert__glyph--loading,
.vt-alert[data-state="question"] .vt-alert__glyph--loading,
.vt-alert[data-state="info"] .vt-alert__glyph--loading {
  opacity: 0;
  transform: scale(0.5);
}

.vt-alert[data-state="success"] .vt-alert__glyph--success,
.vt-alert[data-state="fail"] .vt-alert__glyph--fail,
.vt-alert[data-state="question"] .vt-alert__glyph--question,
.vt-alert[data-state="info"] .vt-alert__glyph--info {
  opacity: 1;
}

.vt-alert__result-circle {
  fill: none;
  stroke: var(--vt-a-ok);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 239;
  stroke-dashoffset: 239;
  transform-origin: 48px 48px;
}

.vt-alert__result-circle--fail {
  stroke: var(--vt-a-fail);
}

.vt-alert__result-circle--question {
  stroke: #6366f1;
}

.vt-alert__result-circle--info {
  stroke: #0ea5e9;
}

.vt-alert__result-fill {
  fill: var(--vt-a-ok-soft);
  stroke: none;
  transform-origin: 48px 48px;
  transform: scale(0);
  opacity: 0;
}

.vt-alert__result-fill--fail {
  fill: var(--vt-a-fail-soft);
}

.vt-alert__result-fill--question {
  fill: #eef2ff;
  opacity: 1;
  transform: scale(1);
}

.vt-alert__result-fill--info {
  fill: #f0f9ff;
  opacity: 1;
  transform: scale(1);
}

.vt-alert[data-state="success"] .vt-alert__result-circle,
.vt-alert[data-state="question"] .vt-alert__result-circle,
.vt-alert[data-state="info"] .vt-alert__result-circle {
  animation: vtAlertCircleDraw 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.vt-alert[data-state="success"] .vt-alert__result-fill,
.vt-alert[data-state="question"] .vt-alert__result-fill,
.vt-alert[data-state="info"] .vt-alert__result-fill {
  animation: vtAlertFillPop 0.45s 0.18s cubic-bezier(0.22, 1.4, 0.36, 1) forwards;
}

.vt-alert__check {
  fill: none;
  stroke: var(--vt-a-ok);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 62;
  stroke-dashoffset: 62;
  transform-origin: 48px 48px;
}

.vt-alert[data-state="success"] .vt-alert__check {
  animation:
    vtAlertCheckDraw 0.42s 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    vtAlertCheckPop 0.5s 0.72s cubic-bezier(0.22, 1.5, 0.36, 1) forwards;
}

.vt-alert[data-state="fail"] .vt-alert__result-circle--fail {
  animation: vtAlertCircleDraw 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.vt-alert[data-state="fail"] .vt-alert__result-fill--fail {
  animation: vtAlertFillPop 0.4s 0.14s cubic-bezier(0.22, 1.2, 0.36, 1) forwards;
}

.vt-alert__x1,
.vt-alert__x2 {
  fill: none;
  stroke: var(--vt-a-fail);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 44;
  stroke-dashoffset: 44;
  transform-origin: 48px 48px;
}

.vt-alert[data-state="fail"] .vt-alert__x1 {
  animation:
    vtAlertXDraw 0.28s 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    vtAlertXWiggle 0.45s 0.62s ease forwards;
}

.vt-alert[data-state="fail"] .vt-alert__x2 {
  animation:
    vtAlertXDraw 0.28s 0.44s cubic-bezier(0.22, 1, 0.36, 1) forwards,
    vtAlertXWiggle 0.45s 0.74s ease forwards;
}

/* Expanding halo behind result icon */
.vt-alert__halo {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}

.vt-alert__halo--ok {
  border: 2px solid rgba(16, 185, 129, 0.55);
}

.vt-alert__halo--fail {
  border: 2px solid rgba(239, 68, 68, 0.5);
}

.vt-alert[data-state="success"] .vt-alert__halo--ok {
  animation: vtAlertHaloBurst 0.85s 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.vt-alert[data-state="fail"] .vt-alert__halo--fail {
  animation: vtAlertHaloBurst 0.75s 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.vt-alert[data-state="success"] .vt-alert__glyph--success svg {
  filter: drop-shadow(0 6px 14px rgba(16, 185, 129, 0.28));
}

.vt-alert[data-state="fail"] .vt-alert__glyph--fail svg {
  filter: drop-shadow(0 6px 14px rgba(239, 68, 68, 0.22));
}

/* Success burst particles */
.vt-alert__burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}

.vt-alert[data-state="success"] .vt-alert__burst {
  opacity: 1;
}

.vt-alert__burst i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  background: #34d399;
  opacity: 0;
}

.vt-alert[data-state="success"] .vt-alert__burst i {
  animation: vtAlertBurst 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.vt-alert__burst i:nth-child(1) { --dx: -42px; --dy: -28px; background: #34d399; animation-delay: 0.05s; }
.vt-alert__burst i:nth-child(2) { --dx: 38px; --dy: -32px; background: #6ee7b7; width: 5px; height: 5px; animation-delay: 0.08s; }
.vt-alert__burst i:nth-child(3) { --dx: -36px; --dy: 30px; background: #a78bfa; animation-delay: 0.1s; }
.vt-alert__burst i:nth-child(4) { --dx: 44px; --dy: 22px; background: #667eea; width: 5px; height: 5px; animation-delay: 0.12s; }
.vt-alert__burst i:nth-child(5) { --dx: 0px; --dy: -48px; background: #10b981; width: 6px; height: 6px; animation-delay: 0.06s; }
.vt-alert__burst i:nth-child(6) { --dx: -50px; --dy: 4px; background: #fbbf24; width: 4px; height: 4px; animation-delay: 0.14s; }
.vt-alert__burst i:nth-child(7) { --dx: 52px; --dy: -4px; background: #34d399; width: 4px; height: 4px; animation-delay: 0.16s; }
.vt-alert__burst i:nth-child(8) { --dx: 12px; --dy: 46px; background: #818cf8; width: 5px; height: 5px; animation-delay: 0.11s; }

/* Copy */
.vt-alert__title {
  margin: 0 0 8px;
  font-size: 1.22rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--vt-a-text);
  line-height: 1.35;
}

.vt-alert__text {
  margin: 0;
  font-size: 0.92rem;
  color: var(--vt-a-muted);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.vt-alert__text:empty { display: none; }

.vt-alert__title.is-swap,
.vt-alert__text.is-swap {
  animation: vtAlertTextIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Actions */
.vt-alert__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
  min-height: 0;
}

.vt-alert__actions:empty { display: none; margin-top: 0; }

.vt-alert__input-wrap {
  margin-top: 14px;
  text-align: left;
}

.vt-alert__input-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 650;
  color: #475569;
  margin-bottom: 6px;
}

.vt-alert__input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.vt-alert__input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
}

.vt-alert__input-error {
  min-height: 1.1em;
  margin-top: 6px;
  font-size: 0.8rem;
  color: #ef4444;
}

.vt-alert__radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(42vh, 280px);
  overflow: auto;
  padding: 2px;
}

.vt-alert__radio-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.vt-alert__radio-row:hover {
  border-color: #c7d2fe;
  background: #f8fafc;
}

.vt-alert__radio-row:has(input:checked) {
  border-color: #667eea;
  background: #eef2ff;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.16);
}

.vt-alert__radio-row input[type="radio"] {
  margin-top: 3px;
  flex: 0 0 auto;
  accent-color: #667eea;
}

.vt-alert__radio-body {
  flex: 1;
  min-width: 0;
}

.vt-alert__radio-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
}

.vt-alert__btn {
  appearance: none;
  border: none;
  border-radius: 14px;
  padding: 11px 22px;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 650;
  font-family: inherit;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.15s ease, box-shadow 0.2s ease;
  animation: vtAlertBtnIn 0.4s 0.12s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

.vt-alert__btn:hover { transform: translateY(-2px); }
.vt-alert__btn:active { transform: scale(0.96); }

.vt-alert__btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--vt-a-accent), var(--vt-a-accent-2));
  background-size: 160% 160%;
  animation: vtAlertBtnIn 0.4s 0.12s cubic-bezier(0.22, 1.2, 0.36, 1) both,
    vtAlertBtnShine 3.2s ease-in-out infinite;
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.38);
}

.vt-alert__btn--primary:hover { filter: brightness(1.06); }

.vt-alert__btn--ghost {
  color: #1e293b;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}

.vt-alert__btn--ghost:hover { filter: brightness(0.97); color: #0f172a; }

.vt-alert[data-state="fail"] .vt-alert__btn--primary {
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.32);
  animation: vtAlertBtnIn 0.4s 0.12s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

.vt-alert[data-state="success"] .vt-alert__btn--primary {
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.32);
  animation: vtAlertBtnIn 0.4s 0.12s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

.vt-alert[data-state="question"] .vt-alert__btn--primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.32);
  animation: vtAlertBtnIn 0.4s 0.12s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

.vt-alert__btn--deny {
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.vt-alert__btn--deny:hover {
  filter: brightness(1.06);
}

.vt-alert--has-html {
  width: min(95vw, 490px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.vt-alert--has-html .vt-alert__title {
  text-align: center;
  margin-bottom: 8px;
}

.vt-alert--has-html .vt-alert__html {
  overflow-y: auto;
  max-height: 56vh;
  margin: 10px 0 14px;
  padding: 2px 4px;
}

.vt-alert--no-icon .vt-alert__icon {
  display: none !important;
}

.vt-alert__validation-msg {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 10px;
  text-align: left;
}

.vt-alert[data-state="loading"] .vt-alert__actions {
  display: none;
}

@keyframes vtAlertCardIn {
  0% { transform: translateY(28px) scale(0.88); opacity: 0; }
  60% { transform: translateY(-6px) scale(1.03); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes vtAlertCardOut {
  to { transform: translateY(12px) scale(0.94); opacity: 0; }
}

@keyframes vtAlertCardMorph {
  0% { transform: scale(1); }
  35% { transform: scale(0.96); }
  70% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

@keyframes vtAlertCardShake {
  0%, 100% { transform: translateX(0) scale(1); }
  15% { transform: translateX(-10px) scale(0.98); }
  30% { transform: translateX(9px) scale(1.01); }
  45% { transform: translateX(-7px); }
  60% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

@keyframes vtAlertSpin {
  to { transform: rotate(360deg); }
}

@keyframes vtAlertDot {
  0%, 80%, 100% { transform: translateY(0) scale(0.85); opacity: 0.35; }
  40% { transform: translateY(-8px) scale(1.15); opacity: 1; }
}

@keyframes vtAlertCircleDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes vtAlertFillPop {
  0% { transform: scale(0); opacity: 0; }
  65% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes vtAlertCheckDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes vtAlertCheckPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

@keyframes vtAlertXDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes vtAlertXWiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
  75% { transform: rotate(-3deg); }
}

@keyframes vtAlertHaloBurst {
  0% { transform: scale(0.75); opacity: 0.85; }
  100% { transform: scale(1.55); opacity: 0; }
}

@keyframes vtAlertSuccessIconIn {
  0% { transform: scale(0.4) rotate(-20deg); opacity: 0; }
  55% { transform: scale(1.12) rotate(4deg); opacity: 1; }
  78% { transform: scale(0.96) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes vtAlertFailIconIn {
  0% { transform: scale(0.35); opacity: 0; }
  40% { transform: scale(1.14); opacity: 1; }
  55% { transform: scale(0.92) rotate(-4deg); }
  70% { transform: scale(1.06) rotate(4deg); }
  85% { transform: scale(0.98) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes vtAlertRippleOk {
  0% { transform: scale(0.82); opacity: 0.55; border-color: rgba(16, 185, 129, 0.55); }
  100% { transform: scale(1.45); opacity: 0; border-color: rgba(16, 185, 129, 0); }
}

@keyframes vtAlertRippleFail {
  0% { transform: scale(0.82); opacity: 0.5; border-color: rgba(239, 68, 68, 0.5); }
  100% { transform: scale(1.42); opacity: 0; border-color: rgba(239, 68, 68, 0); }
}

@keyframes vtAlertPop {
  0% { transform: scale(0.55); }
  55% { transform: scale(1.12); }
  78% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

@keyframes vtAlertPopFail {
  0% { transform: scale(0.55) rotate(-8deg); }
  55% { transform: scale(1.1) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes vtAlertDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes vtAlertGlowPulse {
  0%, 100% { opacity: 0.32; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.08); }
}

@keyframes vtAlertGlowPulseOk {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

@keyframes vtAlertIconBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes vtAlertRipple {
  0% { transform: scale(0.82); opacity: 0.55; }
  100% { transform: scale(1.35); opacity: 0; }
}

@keyframes vtAlertOrbA {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(36px, 24px) scale(1.12); }
}

@keyframes vtAlertOrbB {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-28px, -20px) scale(1.1); }
}

@keyframes vtAlertSparkFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.25; }
  50% { transform: translateY(-10px) scale(1.35); opacity: 0.85; }
}

@keyframes vtAlertBurst {
  0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

@keyframes vtAlertTextIn {
  0% { opacity: 0; transform: translateY(8px); filter: blur(3px); }
  100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes vtAlertBtnIn {
  0% { opacity: 0; transform: translateY(10px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes vtAlertBtnShine {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .vt-alert-root,
  .vt-alert,
  .vt-alert__icon,
  .vt-alert__icon-ring,
  .vt-alert__glyph,
  .vt-alert__result-circle,
  .vt-alert__result-fill,
  .vt-alert__check,
  .vt-alert__x1,
  .vt-alert__x2,
  .vt-alert__halo,
  .vt-alert__glow,
  .vt-alert__spark,
  .vt-alert__pulse,
  .vt-alert__burst i,
  .vt-alert__btn,
  .vt-alert-root__backdrop::before,
  .vt-alert-root__backdrop::after {
    animation: none !important;
    transition: none !important;
  }
  .vt-alert-root.is-open .vt-alert {
    opacity: 1;
    visibility: visible;
    transform: none;
    animation: vtAlertReducedIn .18s ease-out both !important;
  }
  .vt-alert-root.is-closing .vt-alert {
    animation: vtAlertReducedOut .12s ease-in both !important;
  }
}

@keyframes vtAlertReducedIn {
  from { opacity: 0; transform: translateY(4px) scale(.99); }
  to { opacity: 1; transform: none; }
}

@keyframes vtAlertReducedOut {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(2px) scale(.995); }
}


/* Top-right dismiss (SweetAlert-style ×) */
.vt-alert__close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 1.6rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  transition: background 0.15s ease, transform 0.15s ease;
}
.vt-alert__close:hover {
  background: #cbd5e1;
  transform: scale(1.04);
}
.vt-alert__close:active {
  transform: scale(0.98);
}
.vt-alert__close[hidden] {
  display: none !important;
}

/* Top-left back (opt-in via showBackButton; used by VtAlert.swap flows) */
.vt-alert__back {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 5;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  transition: background 0.15s ease, transform 0.15s ease;
}
.vt-alert__back:hover {
  background: #e0e7ff;
  transform: translateX(-1px);
}
.vt-alert__back:active {
  transform: scale(0.97);
}
.vt-alert__back:focus-visible,
.vt-alert__close:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}
.vt-alert__back[hidden] {
  display: none !important;
}

/* In-place content swap (VtAlert.swap) */
.vt-alert.vt-alert--swap-fwd .vt-alert__title,
.vt-alert.vt-alert--swap-fwd .vt-alert__text,
.vt-alert.vt-alert--swap-fwd .vt-alert__html,
.vt-alert.vt-alert--swap-fwd .vt-alert__actions {
  animation: vtAlertSwapFwd 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.vt-alert.vt-alert--swap-back .vt-alert__title,
.vt-alert.vt-alert--swap-back .vt-alert__text,
.vt-alert.vt-alert--swap-back .vt-alert__html,
.vt-alert.vt-alert--swap-back .vt-alert__actions {
  animation: vtAlertSwapBack 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes vtAlertSwapFwd {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes vtAlertSwapBack {
  from { opacity: 0; transform: translateX(-18px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vt-alert.vt-alert--swap-fwd .vt-alert__title,
  .vt-alert.vt-alert--swap-fwd .vt-alert__text,
  .vt-alert.vt-alert--swap-fwd .vt-alert__html,
  .vt-alert.vt-alert--swap-fwd .vt-alert__actions,
  .vt-alert.vt-alert--swap-back .vt-alert__title,
  .vt-alert.vt-alert--swap-back .vt-alert__text,
  .vt-alert.vt-alert--swap-back .vt-alert__html,
  .vt-alert.vt-alert--swap-back .vt-alert__actions {
    animation: none !important;
  }
}
