

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes authIconIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes authAlertIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes authSpin {
  to { transform: rotate(360deg); }
}

@keyframes authDonePop {
  0% { opacity: 0; transform: scale(0.6); }
  70% { transform: scale(1.06); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes authCheckDraw {
  from { stroke-dashoffset: 24; }
  to { stroke-dashoffset: 0; }
}

.auth-card {
  opacity: 0;
  animation: authCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.auth-icon {
  animation: authIconIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

.auth-card h1,
.auth-card .lead {
  animation: authAlertIn 0.45s ease 0.18s both;
}

.auth-card .form {
  animation: authAlertIn 0.45s ease 0.24s both;
}

.auth-foot {
  animation: authAlertIn 0.45s ease 0.3s both;
}


.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-mut);
}

.auth-alert.is-visible {
  animation: authAlertIn 0.35s ease forwards, authShake 0.42s ease 0.1s;
}

.auth-alert__ic {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  stroke-width: 2;
  fill: none;
}

.auth-alert--err {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.22);
}

.auth-alert--err .auth-alert__ic {
  stroke: #f87171;
}

.auth-alert--ok {
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.22);
}

.auth-alert--ok .auth-alert__ic {
  stroke: #4ade80;
}

.field.is-invalid .input input {
  border-color: rgba(248, 113, 113, 0.45);
  animation: authShake 0.4s ease;
}

.field.is-invalid label {
  color: #f87171;
}


.auth-card--done .auth-icon {
  display: none;
}

.auth-done {
  text-align: center;
  animation: authAlertIn 0.45s ease 0.1s both;
}

.auth-done__icon {
  width: 58px;
  height: 58px;
  margin: 4px auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.28);
  animation: authDonePop 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.auth-done__icon svg {
  width: 28px;
  height: 28px;
  stroke: #4ade80;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: authCheckDraw 0.45s ease 0.45s forwards;
}

.auth-done h1 {
  animation: none;
}

.rcv-ok-lead {
  color: var(--text-mut);
  font-size: 15px;
  line-height: 1.6;
  margin-top: 8px;
  text-wrap: balance;
}

.rcv-ok-lead strong {
  color: var(--text);
}


.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: #0a0a0a;
  border-radius: 50%;
  animation: authSpin 0.65s linear infinite;
}

.btn-ghost.is-loading::after {
  border-color: rgba(255, 255, 255, 0.15);
  border-top-color: var(--text);
}


.wwp-toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(22, 22, 22, 0.96);
  border: 1px solid var(--brd-2);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  opacity: 0;
  transform: translateX(-50%) translateY(14px);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.wwp-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.wwp-toast::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wwp-toast--ok::before {
  background: #4ade80;
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.wwp-toast--err::before {
  background: #f87171;
  box-shadow: 0 0 10px rgba(248, 113, 113, 0.45);
}

.wwp-toast--info::before {
  background: #fbbf24;
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}


.checkout-grid {
  animation: checkoutIn 0.35s ease both;
}

@keyframes checkoutIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.checkout-grid .err {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .auth-icon,
  .auth-card h1,
  .auth-card .lead,
  .auth-card .form,
  .auth-foot,
  .auth-alert.is-visible,
  .auth-done,
  .auth-done__icon,
  .auth-done__icon svg,
  .checkout-grid {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }

  .wwp-toast {
    transition: none;
  }
}

.captcha-field {
  margin-top: 0;
}

.captcha-panel {
  display: flex;
  align-items: stretch;
  min-height: 50px;
  border: 1px solid var(--brd);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.captcha-panel:focus-within {
  border-color: var(--brd-2);
}

.captcha-media {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  border-right: 1px solid var(--brd);
  background: #111;
}

.captcha-img {
  display: block;
  width: 160px;
  height: 50px;
  object-fit: contain;
  border: 0;
  background: #111;
}

.captcha-refresh {
  width: 44px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-left: 1px solid var(--brd);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-mut);
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.captcha-refresh:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.captcha-refresh:disabled {
  opacity: 0.55;
  cursor: wait;
}

.captcha-refresh svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.captcha-answer {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 13px 15px;
}

.captcha-answer::placeholder {
  color: var(--text-dim);
}

.captcha-answer:focus {
  outline: none;
}

.captcha-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 420px) {
  .captcha-panel {
    flex-direction: column;
  }

  .captcha-media {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--brd);
  }

  .captcha-img {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
}
