/* ==========================================================================
   AERIVEX CHECKOUT MODAL, LICENSE REVEAL & /claim UI STYLES
   Matches aerivexdownloader.com dark/light theme & CSS variables
   ========================================================================== */

[hidden] {
  display: none !important;
}

body.axv-modal-open {
  overflow: hidden !important;
}

.axv-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.axv-modal.is-open {
  display: flex;
}

.axv-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.axv-modal-dialog {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: min(94vw, 540px);
  max-height: 90vh;
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-card, #0f172a);
  border: 1px solid var(--border-card, rgba(255, 255, 255, 0.1));
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55), 0 0 40px rgba(16, 185, 129, 0.12);
  color: var(--text-main, #f8fafc);
}

[data-theme="light"] .axv-modal-dialog,
.light-mode .axv-modal-dialog {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.axv-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-card, rgba(255, 255, 255, 0.08));
}

[data-theme="light"] .axv-modal-header,
.light-mode .axv-modal-header {
  border-bottom-color: #e2e8f0;
}

.axv-modal-plan-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.axv-device-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.axv-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.axv-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-main, #f8fafc);
}

.axv-modal-price {
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  color: #34d399;
}

[data-theme="light"] .axv-modal-price,
.light-mode .axv-modal-price {
  color: #059669;
}

.axv-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: 1px solid var(--border-card, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted, #94a3b8);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.axv-modal-close:hover {
  color: var(--text-main, #ffffff);
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.12);
}

[data-theme="light"] .axv-modal-close,
.light-mode .axv-modal-close {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.axv-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 20px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.axv-modal-body::-webkit-scrollbar {
  width: 6px;
}

.axv-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.axv-modal-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 9999px;
}

.axv-modal-footer {
  flex-shrink: 0;
  padding: 12px 20px;
  border-top: 1px solid var(--border-card, rgba(255, 255, 255, 0.08));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  background: rgba(15, 23, 42, 0.45);
}

[data-theme="light"] .axv-modal-footer,
.light-mode .axv-modal-footer {
  border-top-color: #e2e8f0;
  background: #f8fafc;
}

.axv-modal-footer a {
  color: #10b981;
  font-weight: 600;
  text-decoration: none;
}

.axv-modal-footer a:hover {
  text-decoration: underline;
}

.axv-whop-embed-surface {
  position: relative;
  min-height: 440px;
  background: #0d131f;
  color: #f8fafc;
  color-scheme: dark;
  border-radius: 14px;
  padding: 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.axv-whop-embed-mount {
  background: transparent;
  color: #f8fafc;
}

.axv-whop-embed-mount iframe {
  display: block;
  width: 100%;
  background: transparent;
}

.axv-embed-loader {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border-radius: 14px;
  background: #0d131f;
  color: #cbd5e1;
  text-align: center;
}

.axv-embed-loader-text {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #cbd5e1;
}

.axv-embed-error-fallback {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px;
  text-align: center;
  color: #f8fafc;
}

.axv-embed-error-fallback p {
  margin: 0;
  max-width: 360px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #94a3b8;
}

[data-theme="light"] .axv-whop-embed-surface,
.light-mode .axv-whop-embed-surface {
  background: #ffffff;
  color: #111827;
  color-scheme: light;
  border-color: #e2e8f0;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .axv-whop-embed-mount,
.light-mode .axv-whop-embed-mount {
  background: #ffffff;
  color: #111827;
}

[data-theme="light"] .axv-embed-loader,
.light-mode .axv-embed-loader {
  background: #ffffff;
  color: #334155;
}

[data-theme="light"] .axv-embed-loader-text,
.light-mode .axv-embed-loader-text {
  color: #334155;
}

[data-theme="light"] .axv-embed-error-fallback,
.light-mode .axv-embed-error-fallback {
  color: #1e293b;
}

[data-theme="light"] .axv-embed-error-fallback p,
.light-mode .axv-embed-error-fallback p {
  color: #475569;
}

/* Demo Checkout Preview */
.axv-demo-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

[data-theme="light"] .axv-demo-banner,
.light-mode .axv-demo-banner {
  color: #b45309;
}

.axv-demo-pill {
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: #f59e0b;
  color: #0f172a;
}

.axv-mock-whop-box {
  border-radius: 14px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .axv-mock-whop-box,
.light-mode .axv-mock-whop-box {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.axv-mock-whop-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .axv-mock-whop-summary,
.light-mode .axv-mock-whop-summary {
  border-bottom-color: #e2e8f0;
}

.axv-mock-whop-brand {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #94a3b8);
}

.axv-mock-whop-plan {
  font-size: 15px;
  font-weight: 700;
  margin-top: 2px;
}

.axv-mock-whop-price {
  font-size: 16px;
  font-weight: 800;
  color: #10b981;
}

.axv-mock-form-preview {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.axv-mock-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.axv-mock-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
}

.axv-mock-field-val {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .axv-mock-field-val,
.light-mode .axv-mock-field-val {
  background: #ffffff;
  border-color: #cbd5e1;
}

.axv-demo-actions {
  display: grid;
  gap: 10px;
}

/* Live Embed Skeleton */
.axv-embed-skeleton {
  display: grid;
  gap: 12px;
  padding: 8px 0;
}

.axv-skel-line,
.axv-skel-box {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.12) 25%, rgba(148, 163, 184, 0.22) 50%, rgba(148, 163, 184, 0.12) 75%);
  background-size: 200% 100%;
  animation: axvSkelPulse 1.4s infinite;
}

.axv-skel-lg { height: 22px; width: 65%; }
.axv-skel-md { height: 16px; width: 45%; }
.axv-skel-box { height: 180px; width: 100%; }
.axv-skel-btn { height: 42px; width: 100%; }

@keyframes axvSkelPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.axv-embed-fallback-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
}

.axv-embed-fallback-note a {
  color: #10b981;
  font-weight: 600;
  text-decoration: none;
}

/* Buttons */
.axv-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #022c22;
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
}

.axv-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.axv-btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.axv-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-main, #e2e8f0);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-decoration: none;
  transition: all 0.15s ease;
}

.axv-btn-secondary:hover {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.1);
}

[data-theme="light"] .axv-btn-secondary,
.light-mode .axv-btn-secondary {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.axv-btn-full {
  width: 100%;
}

/* State A: Verifying */
.axv-state-verifying,
.axv-state-delayed {
  text-align: center;
  padding: 28px 12px;
}

.axv-spinner-ring {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  border-radius: 9999px;
  border: 3px solid rgba(16, 185, 129, 0.2);
  border-top-color: #10b981;
  animation: axvSpin 0.85s linear infinite;
}

@keyframes axvSpin {
  to { transform: rotate(360deg); }
}

.axv-state-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
}

.axv-state-subtext {
  margin: 0 auto;
  max-width: 440px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted, #94a3b8);
}

/* State B: License Ready */
.axv-success-badge-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.axv-success-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.axv-ready-heading {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main, #f8fafc);
}

.axv-ready-subheading {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
}

.axv-key-box {
  padding: 16px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.35);
  margin-bottom: 16px;
}

.axv-key-box-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.axv-key-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
}

.axv-key-status-pill {
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
}

.axv-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.axv-key-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-main, #ffffff);
  word-break: break-all;
}

[data-theme="light"] .axv-key-code,
.light-mode .axv-key-code {
  color: #0f172a;
}

.axv-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.axv-copy-btn.is-copied {
  background: #10b981;
  color: #022c22;
}

[data-theme="light"] .axv-copy-btn,
.light-mode .axv-copy-btn {
  color: #059669;
}

.axv-pills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 520px) {
  .axv-pills-grid {
    grid-template-columns: 1fr;
  }
}

.axv-summary-pill {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

[data-theme="light"] .axv-summary-pill,
.light-mode .axv-summary-pill {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.axv-pill-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #94a3b8);
}

.axv-pill-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
  word-break: break-word;
}

.axv-pill-active {
  color: #10b981;
}

.axv-pdf-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.axv-pdf-banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main, #e2e8f0);
}

.axv-pdf-banner-text svg {
  color: #38bdf8;
  flex-shrink: 0;
}

.axv-next-steps-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .axv-next-steps-card,
.light-mode .axv-next-steps-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.axv-next-steps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.axv-next-steps-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main, #f8fafc);
}

.axv-download-app-link {
  font-size: 12px;
  font-weight: 700;
  color: #10b981;
  text-decoration: none;
}

.axv-download-app-link:hover {
  text-decoration: underline;
}

.axv-steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted, #94a3b8);
}

.axv-steps-list li span {
  color: #10b981;
  font-weight: 800;
  margin-right: 4px;
}

/* State C: Delayed */
.axv-delayed-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #f59e0b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.axv-delayed-actions {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Standalone /claim & /success Page Shell */
.axv-page-main {
  min-height: calc(100vh - 140px);
  padding: 120px 16px 72px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.axv-page-card {
  width: 100%;
  max-width: 640px;
  padding: 32px 28px;
  border-radius: 22px;
  background: var(--bg-card, rgba(15, 23, 42, 0.85));
  border: 1px solid var(--border-card, rgba(255, 255, 255, 0.1));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(18px);
}

[data-theme="light"] .axv-page-card,
.light-mode .axv-page-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.axv-page-header {
  text-align: center;
  margin-bottom: 24px;
}

.axv-page-title {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.5vw, 32px);
  font-weight: 800;
  color: var(--text-main, #f8fafc);
}

.axv-page-subtitle {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted, #94a3b8);
}

.axv-claim-form {
  display: grid;
  gap: 16px;
}

.axv-form-group {
  display: grid;
  gap: 6px;
}

.axv-form-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main, #e2e8f0);
}

.axv-form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-main, #f8fafc);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.axv-form-input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

[data-theme="light"] .axv-form-input,
.light-mode .axv-form-input {
  color: #0f172a;
  background: #f8fafc;
  border-color: #cbd5e1;
}

.axv-form-helper {
  font-size: 11.5px;
  color: var(--text-muted, #94a3b8);
}

.axv-inline-alert {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

[data-theme="light"] .axv-inline-alert,
.light-mode .axv-inline-alert {
  color: #b91c1c;
}

.axv-claim-demo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-size: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

[data-theme="light"] .axv-claim-demo-toolbar,
.light-mode .axv-claim-demo-toolbar {
  color: #b45309;
}

.axv-btn-spinner {
  width: 15px;
  height: 15px;
  border-radius: 9999px;
  border: 2px solid rgba(2, 44, 34, 0.3);
  border-top-color: #022c22;
  display: none;
  animation: axvSpin 0.75s linear infinite;
}

.axv-btn-primary.is-loading .axv-btn-spinner {
  display: inline-block;
}
