/* ---- Subscription / trial access modal (ported from the old SPA) -------- */
.xl-subs-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.xl-subs-modal.active { display: flex; }
.xl-subs-card {
  background: var(--white);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.25);
}
.xl-subs-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--blue);
}
.xl-subs-icon.warning { background: #fff4e0; color: #c47a1f; }
.xl-subs-icon.danger { background: var(--error-light); color: var(--error); }
.xl-subs-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink);
}
.xl-subs-days {
  font-size: 28px;
  font-weight: 700;
  color: var(--blue);
  margin: 8px 0;
}
.xl-subs-days.warning { color: #c47a1f; }
.xl-subs-days.danger { color: var(--error); }
.xl-subs-text {
  font-size: 13px;
  color: var(--slate);
  margin-bottom: 20px;
  line-height: 1.5;
}
.xl-subs-btn {
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 10px 28px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
}
.xl-subs-btn:hover { background: var(--blue-dark); }
.xl-subs-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 12px;
  color: #128C7E;
  text-decoration: none;
  font-weight: 600;
}
.xl-subs-wa:hover { text-decoration: underline; }
.xl-subs-wa svg { width: 14px; height: 14px; }
.xl-subs-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 4px;
}
.xl-subs-paynow {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  color: var(--blue) !important;
}
.xl-subs-paynow:hover { text-decoration: underline; }

/* ───────── Pay Now modal ───────── */
.xl-paynow-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 20px;
}
.xl-paynow-modal.active { display: flex; }
.xl-paynow-card {
  background: var(--white);
  border-radius: 16px;
  padding: 24px 20px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.25);
}
.xl-paynow-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--ink);
}
.xl-paynow-sub {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 16px;
}
.xl-paynow-qr-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  display: inline-block;
  margin-bottom: 10px;
}
.xl-paynow-qr-wrap img {
  display: block;
  width: 200px;
  height: 200px;
}
.xl-paynow-hint {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 16px;
}
.xl-paynow-btn {
  width: 100%;
  padding: 11px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  margin-bottom: 10px;
}
.xl-paynow-btn:hover { background: var(--blue-dark); }
.xl-paynow-btn:disabled { background: var(--muted); cursor: not-allowed; }
.xl-paynow-btn-wa { background: #25D366; }
.xl-paynow-btn-wa:hover { background: #1da851; }
.xl-paynow-btn-wa:disabled { background: var(--muted); cursor: not-allowed; }
.xl-paynow-back {
  background: none;
  border: none;
  font-size: 12px;
  color: var(--slate);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}
/* ───────── Success step ───────── */
@keyframes xl-paynow-pop {
  0%   { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}
.xl-paynow-success-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: #f0fdf4;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  animation: xl-paynow-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.xl-paynow-success-body {
  font-size: 13px; color: var(--slate); line-height: 1.55;
  max-width: 268px; margin-bottom: 14px;
}
.xl-paynow-success-body strong { color: var(--ink); font-weight: 700; }
.xl-paynow-success-wa-hint {
  font-size: 12px; color: var(--muted); line-height: 1.5;
  max-width: 268px; margin-bottom: 22px;
}
.xl-paynow-success-wa-hint a {
  color: var(--blue); font-weight: 700; text-decoration: none;
}
.xl-paynow-success-wa-hint a:hover { text-decoration: underline; }

/* ───────── QR step states ───────── */
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.xl-qr-loading {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 34px 0 30px;
}
.xl-qr-spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--blue-light);
  border-top-color: var(--blue);
  animation: spin 0.7s linear infinite;
}
.xl-qr-loading-text { font-size: 13px; font-weight: 500; color: var(--slate); }

.xl-qr-error {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 8px 0 4px;
}
.xl-qr-error-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--error-light); color: var(--error);
  font-size: 24px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.xl-qr-error-msg {
  font-size: 13px; color: var(--slate); line-height: 1.5;
  max-width: 240px; text-align: center;
}

/* Amount block */
.xl-qr-amount-label {
  font-size: 11px; font-weight: 600; color: var(--slate);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.xl-qr-amount-row {
  display: flex; align-items: center; justify-content: center;
  position: relative; margin-bottom: 14px;
}
.xl-qr-amount-fig {
  font-size: 30px; font-weight: 800; color: var(--ink);
  line-height: 1; letter-spacing: -0.01em;
}
.xl-qr-code-highlight {
  color: var(--blue); background: var(--blue-light);
  border-radius: 6px; padding: 1px 5px; margin-left: 1px;
}
.xl-qr-copy-btn {
  background: none; border: none; padding: 4px;
  color: var(--blue); cursor: pointer;
  margin-left: 6px; display: inline-flex; align-items: center;
  flex-shrink: 0;
}
.xl-qr-copy-btn:hover { opacity: 0.7; }

/* Countdown */
.xl-qr-countdown {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px; margin-bottom: 18px;
}
.xl-qr-countdown-label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.xl-qr-countdown-timer {
  font-size: 16px; font-weight: 700; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}
.xl-qr-timer-urgent {
  color: var(--error);
  animation: pulse 1s ease-in-out infinite;
}

/* ───────── plan picker (step 0 of Pay Now modal) ───────── */
.xl-pkg-sub   { font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 16px; }
.xl-pkg-list  { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

.xl-pkg-row {
  display: flex; align-items: center; gap: 11px;
  width: 100%; height: 52px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--white); cursor: pointer; font-family: inherit; text-align: left;
}
.xl-pkg-row.selected { border-color: var(--blue); background: #f5f9fe; }

.xl-pkg-radio {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #cbd5e1; display: inline-flex; align-items: center; justify-content: center;
}
.xl-pkg-row.selected .xl-pkg-radio { border-color: var(--blue); background: var(--blue); }
.xl-pkg-radio i { width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: 0; }
.xl-pkg-row.selected .xl-pkg-radio i { opacity: 1; }

.xl-pkg-name   { font-size: 13px; font-weight: 600; color: var(--ink); }

.xl-pkg-pill {
  font-size: 9px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.xl-pkg-pill.starter { background: #f1f5f9; color: #64748b; }
.xl-pkg-pill.pop     { background: var(--blue-light); color: var(--blue); }
.xl-pkg-pill.best    { background: #dcfce7; color: #16a34a; }

.xl-pkg-spacer { flex: 1 1 auto; }
.xl-pkg-prices { text-align: right; line-height: 1.2; white-space: nowrap; }
.xl-pkg-orig   { display: block; font-size: 10px; font-weight: 500; color: var(--muted); text-decoration: line-through; }
.xl-pkg-price  { font-size: 13px; font-weight: 700; color: var(--ink); }
