/* ---- 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 {
  position: relative;
  background: var(--white);
  border-radius: 16px;
  padding: 28px 24px;
  max-width: 380px;
  width: 100%;
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.25);
}
.xl-subs-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.xl-subs-close:hover { background: var(--bg); color: var(--ink); }
.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: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: 8px;
  color: var(--ink);
}
.xl-subs-days {
  font-size: var(--fs-display);
  font-weight: var(--fw-bold);
  color: var(--blue);
  margin: 8px 0;
}
.xl-subs-days.warning { color: #c47a1f; }
.xl-subs-days.danger { color: var(--error); }
.xl-subs-text {
  font-size: var(--fs-md);
  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: var(--fs-base);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  font-family: inherit;
}
.xl-subs-btn:hover { background: var(--blue-dark); }
.xl-subs-card .sa-btn { margin-top: 12px; }
.xl-subs-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: var(--fs-base);
  color: #128C7E;
  text-decoration: none;
  font-weight: var(--fw-semibold);
}
.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: var(--fs-xl);
  font-weight: var(--fw-bold);
  margin-bottom: 4px;
  color: var(--ink);
}
.xl-paynow-sub {
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  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: var(--fs-xs);
  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: var(--fs-md);
  font-weight: var(--fw-semibold);
  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 {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}
/* ───────── 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: var(--fs-md); color: var(--slate); line-height: 1.55;
  max-width: 268px; margin-bottom: 14px;
}
.xl-paynow-success-body strong { color: var(--ink); font-weight: var(--fw-bold); }
.xl-paynow-success-wa-hint {
  font-size: var(--fs-base); color: var(--muted); line-height: 1.5;
  max-width: 268px; margin-bottom: 22px;
}
.xl-paynow-success-wa-hint a {
  color: var(--blue); font-weight: var(--fw-bold); 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: var(--fs-md); font-weight: var(--fw-medium); 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: var(--fs-4xl); font-weight: var(--fw-bold);
  display: flex; align-items: center; justify-content: center;
}
.xl-qr-error-msg {
  font-size: var(--fs-md); color: var(--slate); line-height: 1.5;
  max-width: 240px; text-align: center;
}

/* Amount block */
.xl-qr-amount-label {
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--slate);
  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: var(--fs-display); font-weight: var(--fw-extrabold); color: var(--ink);
  line-height: 1;
}
.xl-qr-code-highlight {
  color: var(--blue); background: var(--blue-light);
  border-radius: 6px; padding: 1px 5px; margin-left: 1px;
}
/* Copy button sits next to the price, but a mirrored spacer before the
   figure cancels its width so the price itself lands dead centre. */
.xl-qr-amount-row::before {
  content: ''; flex: 0 0 auto;
  width: 30px; /* copy btn: 16px icon + 4px padding x2 + 6px gap */
}
.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: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--muted);
}
.xl-qr-countdown-timer {
  font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.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: var(--fs-base); font-weight: var(--fw-medium); 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: var(--fs-md); font-weight: var(--fw-semibold); color: var(--ink); }

.xl-pkg-pill {
  font-size: var(--fs-3xs); font-weight: var(--fw-bold);
  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: var(--fs-2xs); font-weight: var(--fw-medium); color: var(--muted); text-decoration: line-through; }
.xl-pkg-price  { font-size: var(--fs-md); font-weight: var(--fw-bold); color: var(--ink); }
