.thx-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 25, 42, 0.44);
  backdrop-filter: blur(8px);
  animation: thx-veil-in 0.42s var(--ease-soft) both;
}

.thx-leaving {
  animation: thx-veil-out 0.28s var(--ease-soft) both;
}

@keyframes thx-veil-in {
  from {
    background: rgba(6, 25, 42, 0);
    backdrop-filter: blur(0);
  }

  to {
    background: rgba(6, 25, 42, 0.44);
    backdrop-filter: blur(8px);
  }
}

@keyframes thx-veil-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.thx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 560px;
  max-width: 100%;
  padding: 52px 56px 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-3xl);
  background: var(--color-background);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: thx-card-in 0.62s var(--ease-soft) 0.04s both;
}

.thx-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--color-surface-tint), transparent 42%);
  pointer-events: none;
}

.thx-card:focus {
  outline: none;
}

.thx-leaving .thx-card {
  animation: thx-card-out 0.26s var(--ease-soft) both;
}

@keyframes thx-card-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes thx-card-out {
  from {
    opacity: 1;
    transform: none;
  }

  to {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

.thx-close {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 1;
  padding: 8px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--color-icon-muted);
  cursor: pointer;
  transition: color 0.2s var(--ease-soft);
}

.thx-close:hover {
  color: var(--color-primary-dark);
}

.thx-mark {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  background: var(--color-success-tint);
  animation: thx-mark-in 0.8s var(--ease-calm) 0.14s both;
}

.thx-halo {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-success-border);
  animation: thx-halo-out 1.1s var(--ease-soft) 0.42s both;
}

.thx-halo-late {
  animation-delay: 0.62s;
}

@keyframes thx-mark-in {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes thx-halo-out {
  from {
    opacity: 0.85;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(1.5);
  }
}

.thx-mark-svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thx-ring {
  stroke: var(--color-success-border);
  stroke-width: 3;
  stroke-dasharray: 170;
  stroke-dashoffset: 170;
  transform-origin: center;
  transform: rotate(-90deg);
  animation: thx-draw 0.82s var(--ease-soft) 0.22s forwards;
}

.thx-check {
  stroke: var(--color-success);
  stroke-width: 4;
  stroke-dasharray: 38;
  stroke-dashoffset: 38;
  animation: thx-draw 0.46s var(--ease-soft) 0.56s forwards;
}

@keyframes thx-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.thx-title {
  position: relative;
  margin: 26px 0 0;
  font-size: 30px;
  font-weight: 800;
  line-height: 38px;
  color: var(--color-primary-dark);
  animation: thx-line-in 0.62s var(--ease-soft) 0.3s both;
}

.thx-body {
  position: relative;
  max-width: 400px;
  margin: 12px 0 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 25px;
  color: var(--color-muted);
  animation: thx-line-in 0.62s var(--ease-soft) 0.38s both;
}

.thx-details {
  position: relative;
  width: 100%;
  padding: 6px 22px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  margin: 28px 0 0;
  background: var(--color-surface-tint);
  text-align: left;
  animation: thx-line-in 0.62s var(--ease-soft) 0.46s both;
}

.thx-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  animation: thx-line-in 0.55s var(--ease-soft) both;
}

.thx-row + .thx-row {
  border-top: 1px solid var(--color-border);
}

.thx-row:nth-child(1) {
  animation-delay: 0.54s;
}

.thx-row:nth-child(2) {
  animation-delay: 0.62s;
}

.thx-row:nth-child(3) {
  animation-delay: 0.7s;
}

.thx-row:nth-child(4) {
  animation-delay: 0.78s;
}

.thx-label {
  flex: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  color: var(--color-muted);
}

.thx-value {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  color: var(--color-foreground);
  overflow-wrap: anywhere;
  text-align: right;
}

.thx-note {
  position: relative;
  margin: 18px 0 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--color-success);
  animation: thx-line-in 0.62s var(--ease-soft) 0.82s both;
}

.thx-action {
  position: relative;
  margin-top: 28px;
  animation: thx-line-in 0.62s var(--ease-soft) 0.9s both;
}

@keyframes thx-line-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thx-overlay,
  .thx-card,
  .thx-mark,
  .thx-title,
  .thx-body,
  .thx-details,
  .thx-row,
  .thx-note,
  .thx-action {
    animation: none;
  }

  .thx-halo {
    animation: none;
    opacity: 0;
  }

  .thx-ring,
  .thx-check {
    stroke-dashoffset: 0;
    animation: none;
  }

  .thx-leaving {
    opacity: 0;
  }
}

@media (max-width: 640px) {
  .thx-card {
    padding: 38px 24px 32px;
  }

  .thx-title {
    font-size: 26px;
    line-height: 33px;
  }

  .thx-row {
    flex-direction: column;
    gap: 2px;
  }

  .thx-value {
    text-align: left;
  }
}
