/* ============================================================
   Flash Sim — checkout extras (overlay: phone field, consents, Stripe block, free offer, promo/price lines),
   order page (order-confirm.php) and eSIM top-up (recharge.php). Builds on the tokens of assets/css/style.css.
   ============================================================ */

#ckoutOverlay [hidden],
.ocf-page [hidden],
.tpu-page [hidden] { display: none !important; }

/* ---------- Shared: alerts, promo, price lines ---------- */
.ckx-alert {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 14px 0 0;
}
.ckx-alert a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ckx-alert--error { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; }
.ckx-alert--error a { color: #B91C1C; }
.ckx-alert--info { background: #EFF6FF; border: 1px solid #BFDBFE; color: #1E40AF; }
.ckx-alert--info a { color: #1E40AF; }

.ckx-promo-applied {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.ckx-promo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #047857;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ckx-promo-chip::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10B981;
}
.ckx-promo-msg { font-size: 0.8125rem; margin-top: 8px; color: var(--color-text-muted); min-height: 0; }
.ckx-promo-msg:empty { display: none; }
.ckx-promo-msg.is-success { color: #047857; font-weight: 600; }
.ckx-promo-msg.is-error { color: var(--color-error); }

.ckx-price-lines {
  border-top: 1px solid var(--color-border-subtle);
  padding: 12px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ckx-price-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}
.ckx-price-line--discount { color: #047857; font-weight: 600; }
.ckx-price-lines + .ckout-total-row { border-top-style: dashed; }

.ckx-simulate { width: 100%; margin-top: 10px; }

.tpu-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-accent);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tpu-link:hover { color: var(--color-accent-light); }

/* The floating support chat button would cover the overlay's pay button on phones */
body.ckx-overlay-open #chatWidget { display: none !important; }

/* ---------- Checkout overlay: plan bar ---------- */
.ckx-plan-bar__text { min-width: 0; }
.ckx-plan-bar__price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.ckx-plan-bar__regular { font-size: 0.78rem; color: var(--color-text-dim); }
.ckout-plan-bar__price.is-free { color: #059669; letter-spacing: 0.02em; }

/* ---------- Step 1: "validity starts at purchase" note (plans.validity_from_purchase) ---------- */
.ckx-validity-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 18px;
  padding: 10px 12px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: var(--radius-md);
  color: #92400E;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
}
.ckx-validity-note[hidden] { display: none; }
.ckx-validity-note svg { flex: 0 0 auto; margin-top: 2px; }

/* ---------- Phone: calling-code select (shown as "RO +40") + number ---------- */
.ckx-phone { display: flex; align-items: stretch; gap: 8px; }
.ckx-phone__cc {
  position: relative;
  flex: 0 0 auto;
  min-width: 92px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 30px 0 14px;
  background: var(--color-surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") right 10px center / 14px no-repeat;
  border: 1.5px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ckx-phone__cc:focus-within { border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-dim); }
.ckx-phone__select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px; /* no zoom on iOS */
}
.ckx-phone__input { flex: 1; min-width: 0; }
.ckx-free-hint { color: #047857; font-weight: 600; }

/* ---------- Phone type: iPhone / Android segmented control (native radios, one tab stop, arrow keys) ---------- */
.ckx-os { border: 0; padding: 0; min-width: 0; margin-inline: 0; }
.ckx-os__legend { display: block; width: 100%; padding: 0; float: none; }
.ckx-os__seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  background: var(--color-surface-2);
  border: 1.5px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.ckx-os__opt { position: relative; display: block; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ckx-os__opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.ckx-os__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  pointer-events: none;
}
.ckx-os__btn svg { flex-shrink: 0; margin-top: -1px; }
.ckx-os__opt:hover .ckx-os__btn { color: var(--color-text); }
.ckx-os__opt input:checked + .ckx-os__btn {
  background: #fff;
  color: var(--color-text);
  box-shadow: 0 0 0 1.5px var(--color-accent), 0 1px 4px rgba(15, 23, 42, 0.12);
}
.ckx-os__opt input:checked + .ckx-os__btn svg { color: var(--color-accent); }
.ckx-os__opt input:focus-visible + .ckx-os__btn { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.ckx-os.error .ckx-os__seg { border-color: var(--color-error); }
@media (forced-colors: active) {
  .ckx-os__opt input:checked + .ckx-os__btn { outline: 2px solid Highlight; }
}

/* Honeypot: off-screen, not display:none (some bots skip hidden fields) */
.ckx-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Consents ---------- */
.ckx-optins { margin-bottom: 8px; }
.ckx-consent-note {
  display: block;
  margin-top: 3px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--color-text-dim);
}

/* ---------- Step 2: Stripe block ---------- */
.ckx-stripe {
  border: 1.5px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #fff 0%, var(--color-surface) 100%);
}
.ckx-stripe__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ckx-stripe__lock {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(99, 91, 255, 0.10);
  color: #635BFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ckx-stripe__title { font-size: 0.975rem; font-weight: 700; color: var(--color-text); }
.ckx-stripe__logos { margin-bottom: 10px; }
.ckx-stripe__logos .pm-logo { font-size: 0.6875rem; padding: 3px 7px; }
/* Apple mark as inline SVG (the U+F8FF glyph only exists in Apple fonts: a box on Android / Windows) */
.pm-apple { display: inline-flex; align-items: center; gap: 2px; }
.pm-apple svg { width: 1.05em; height: 1.05em; flex-shrink: 0; margin-top: -0.1em; }
.ckx-stripe__text { font-size: 0.8125rem; color: var(--color-text-muted); line-height: 1.55; margin: 0; }

/* ---------- Step 2: free offer ---------- */
.ckx-free {
  border: 1.5px solid #A7F3D0;
  background: #ECFDF5;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 16px;
}
.ckx-free__badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: #059669;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.ckx-free__text { font-size: 0.85rem; color: #065F46; line-height: 1.6; margin: 0; }
#ckoutFreeBlock .ckx-price-lines { border-top: none; padding-top: 0; }

/* ============================================================
   Order page
   ============================================================ */
.ocf-page {
  background: linear-gradient(180deg, var(--color-surface) 0%, #fff 420px);
  padding: 48px 16px 80px;
  min-height: 70vh;
}
.ocf-wrap {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hero */
.ocf-hero {
  background: #fff;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  padding: 40px 32px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ocf-hero::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--ocf-tone, var(--color-accent));
}
.ocf-hero--success  { --ocf-tone: #10B981; --ocf-tone-bg: rgba(16, 185, 129, 0.12); --ocf-tone-fg: #059669; }
.ocf-hero--progress { --ocf-tone: #1B5BDB; --ocf-tone-bg: rgba(27, 91, 219, 0.10); --ocf-tone-fg: #1B5BDB; }
.ocf-hero--warn     { --ocf-tone: #F59E0B; --ocf-tone-bg: rgba(245, 158, 11, 0.12); --ocf-tone-fg: #B45309; }
.ocf-hero--muted    { --ocf-tone: #94A3B8; --ocf-tone-bg: #F1F5F9; --ocf-tone-fg: #475569; }
.ocf-hero--info     { --ocf-tone: #1B5BDB; --ocf-tone-bg: rgba(27, 91, 219, 0.10); --ocf-tone-fg: #1B5BDB; }

.ocf-hero__icon {
  width: 76px; height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--ocf-tone-bg);
  color: var(--ocf-tone-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scaleIn 0.4s ease both;
}
.ocf-ring {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(27, 91, 219, 0.18);
  border-top-color: #1B5BDB;
  animation: spin 0.9s linear infinite;
}
.ocf-chip {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}
.ocf-hero__title {
  font-size: clamp(1.4rem, 3.4vw, 1.85rem);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.25;
  margin-bottom: 10px;
}
.ocf-hero__text {
  color: var(--color-text-muted);
  font-size: 0.975rem;
  line-height: 1.65;
  max-width: 520px;
  margin: 0 auto;
}
.ocf-hero__hint {
  color: var(--color-text-dim);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 520px;
  margin: 14px auto 0;
}
.ocf-hero__btn { margin-top: 24px; max-width: 100%; white-space: normal; }
.ocf-simulate { margin-top: 4px; }
.ocf-simulate .ocf-small { margin-top: 10px; }

/* Progress (paid → preparing → ready) */
.ocf-progress {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 26px auto 0;
  padding: 0;
  max-width: 520px;
  counter-reset: none;
}
.ocf-progress li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-dim);
  position: relative;
}
.ocf-progress li + li::before {
  content: '';
  position: absolute;
  top: 7px;
  right: calc(50% + 12px);
  width: calc(100% - 16px);
  height: 2px;
  background: var(--color-surface-3);
}
.ocf-progress li.is-done + li::before { background: #10B981; }
.ocf-progress__dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-surface-3);
  background: #fff;
  position: relative;
  z-index: 1;
}
.ocf-progress li.is-done { color: #059669; }
.ocf-progress li.is-done .ocf-progress__dot { border-color: #10B981; background: #10B981; box-shadow: inset 0 0 0 3px #fff; }
.ocf-progress li.is-active { color: var(--color-text); }
.ocf-progress li.is-active .ocf-progress__dot { border-color: #1B5BDB; animation: ocfPulse 1.6s ease-in-out infinite; }
@keyframes ocfPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(27, 91, 219, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(27, 91, 219, 0); }
}

.ocf-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--color-text-dim);
}
.ocf-refresh__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #10B981;
  animation: ocfBlink 1.4s ease-in-out infinite;
}
@keyframes ocfBlink { 50% { opacity: 0.25; } }

/* Cards */
.ocf-card {
  background: #fff;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.ocf-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 18px;
}
.ocf-card__tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--color-accent-dim);
  color: var(--color-accent);
}
.ocf-h3 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 6px;
}
.ocf-h3--caps {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.ocf-small { font-size: 0.85rem; color: var(--color-text-muted); line-height: 1.6; margin: 0; }
.ocf-small--muted { color: var(--color-text-dim); margin-top: 14px; font-size: 0.8rem; }
.ocf-mono { font-family: SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; font-size: 0.85rem; word-break: break-all; }
.ocf-note {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Installation */
.ocf-install__grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
}
.ocf-install__qr { text-align: center; }
.ocf-qr {
  width: 232px;
  max-width: 100%;
  margin: 0 auto 14px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--color-surface-3);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
.ocf-qr img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.ocf-install__opts { min-width: 0; }

.ocf-tabs {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}
.ocf-tab {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.ocf-tab:hover { color: var(--color-text); }
.ocf-tab.is-active { background: #fff; color: var(--color-text); box-shadow: 0 1px 4px rgba(15, 23, 42, 0.12); }
.ocf-tab:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.ocf-tabpane { animation: ckoutFadeIn 0.2s ease both; }

.ocf-btn-apple {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: #0F172A;
  color: #fff;
  font-weight: 700;
  font-size: 0.975rem;
  transition: background var(--transition), transform var(--transition);
}
.ocf-btn-apple:hover { background: #1E293B; color: #fff; transform: translateY(-1px); }

.ocf-steps {
  margin: 8px 0 0;
  padding-left: 0;
  list-style: none;
  counter-reset: ocfstep;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ocf-steps li {
  counter-increment: ocfstep;
  position: relative;
  padding-left: 34px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text);
}
.ocf-steps li::before {
  content: counter(ocfstep);
  position: absolute;
  left: 0; top: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-accent-dim);
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ocf-manual {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--color-surface-3);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ocf-field__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.ocf-field__row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.ocf-field__value {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  background: var(--color-surface);
  border: 1px solid var(--color-surface-3);
  border-radius: 10px;
  font-family: SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 0.8125rem;
  color: var(--color-text);
  word-break: break-all;
  user-select: all;
}
.ocf-copy {
  flex-shrink: 0;
  border: 1.5px solid var(--color-accent);
  background: #fff;
  color: var(--color-accent);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 40px;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.ocf-copy:hover { background: var(--color-accent-dim); }
.ocf-copy.is-copied { border-color: #10B981; color: #047857; background: #ECFDF5; }
.ocf-copy--inline { min-height: 0; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; margin-left: 6px; vertical-align: middle; }

.ocf-warning {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  color: #92400E;
  font-size: 0.85rem;
  line-height: 1.55;
}
.ocf-warning svg { flex-shrink: 0; margin-top: 2px; }

/* Details */
.ocf-dl { margin: 0; }
.ocf-dl__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--color-border-subtle);
}
.ocf-dl__row:last-child { border-bottom: none; padding-bottom: 0; }
.ocf-dl__row:first-child { padding-top: 0; }
.ocf-dl dt { font-size: 0.85rem; color: var(--color-text-muted); flex-shrink: 0; }
.ocf-dl dd { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--color-text); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ocf-dl__row--total dd { font-size: 1.125rem; font-weight: 800; }
.ocf-discount { color: #047857 !important; }

.ocf-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.ocf-status--pending    { background: #FEF3C7; color: #92400E; }
.ocf-status--paid,
.ocf-status--processing { background: #DBEAFE; color: #1E40AF; }
.ocf-status--delivered  { background: #D1FAE5; color: #065F46; }
.ocf-status--failed     { background: #FEF3C7; color: #92400E; }
.ocf-status--refunded   { background: #EDE9FE; color: #5B21B6; }

.ocf-tips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ocf-tips li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.55;
}
.ocf-tips li::before {
  content: '';
  position: absolute;
  left: 2px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #D1FAE5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* Help */
.ocf-help {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
}
.ocf-help__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-accent-dim);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ocf-help__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 0.85rem; color: var(--color-text-muted); }
.ocf-help__body strong { color: var(--color-text); font-size: 0.95rem; }
.ocf-help__btn { flex-shrink: 0; }

/* Tutorial video (TutorialVideo::embedHtml renders its own card; the page grid provides the spacing) */
.ocf-video { min-width: 0; }
.ocf-video .fs-tv { margin: 0; }
.ocf-video video, .ocf-video img, .ocf-video iframe { max-width: 100%; }

/* Tutorial video inside an iPhone / Android install tab (order-confirm.php ocf_tab_video) */
.ocf-tv { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--color-surface-3); }
.ocf-tv__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 10px;
}
.ocf-tv__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--color-accent-dim);
  color: var(--color-accent);
  flex-shrink: 0;
}
.ocf-tv__title .ocf-card__tag { font-size: 0.7rem; padding: 2px 8px; }
.ocf-tv__media { border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #0F2A5C, #1B5BDB); }
.ocf-tv__video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; max-height: 70vh; object-fit: contain; background: transparent; }
.ocf-tv__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.8125rem; font-weight: 600; color: var(--color-accent); }
.ocf-tv__link:hover { text-decoration: underline; }
.ocf-tv__card {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #0F2A5C, #1B5BDB);
}
.ocf-tv__card:hover { color: #fff; }
.ocf-tv__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ocf-tv__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #1B5BDB;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition);
}
.ocf-tv__card:hover .ocf-tv__play, .ocf-tv__card:focus-visible .ocf-tv__play { transform: translate(-50%, -50%) scale(1.08); }
.ocf-tv__cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* "Your order was updated" bar (shown instead of reloading while the tutorial video plays) */
.ocf-update {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 32px);
  padding: 12px 14px 12px 18px;
  border-radius: var(--radius-md);
  background: #0F172A;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
  animation: ckoutFadeIn 0.25s ease both;
}
.ocf-update .btn { flex-shrink: 0; }

/* Pending payment: second action under the main button */
.ocf-hero__link { display: inline-block; margin-top: 14px; font-size: 0.875rem; font-weight: 600; color: var(--color-accent); }

/* ============================================================
   Top-up page
   ============================================================ */
.tpu-page { background: linear-gradient(180deg, var(--color-surface) 0%, #fff 360px); }
.tpu-shell { width: 100%; max-width: 520px; }
.tpu-card { max-width: 520px; background: #fff; }
.tpu-header { display: flex; gap: 16px; align-items: flex-start; }
.tpu-header__icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-gold);
}
.tpu-header .rch-card__subtitle { color: var(--color-text-muted); line-height: 1.55; }

.tpu-steps {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 14px 28px;
  gap: 6px;
  border-bottom: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
}
.tpu-steps__item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-dim);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tpu-steps__item span {
  width: 22px; height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  border: 2px solid var(--color-surface-3);
  background: #fff;
}
.tpu-steps__item.is-active { color: var(--color-text); }
.tpu-steps__item.is-active span { border-color: var(--color-accent); color: var(--color-accent); }
.tpu-steps__item.is-done { color: #059669; }
.tpu-steps__item.is-done span { border-color: #10B981; background: #10B981; color: #fff; }

.tpu-pane { padding: 24px 28px 28px; }
.tpu-pane .ckout-btn-proceed { margin-top: 20px; }
.tpu-mono { font-family: SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace; letter-spacing: 0.04em; }
.tpu-pane .form-hint { line-height: 1.5; }

.tpu-soon { text-align: center; padding-top: 32px; }
.tpu-soon__icon {
  width: 68px; height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tpu-soon__title { font-size: 1.25rem; font-weight: 700; color: var(--color-text); margin-bottom: 10px; }
.tpu-soon__text { font-size: 0.9rem; color: var(--color-text-muted); line-height: 1.65; }
.tpu-soon .ckout-btn-proceed { text-decoration: none; }

.tpu-verified {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  font-size: 0.85rem;
  color: #166534;
  margin-bottom: 20px;
}
.tpu-verified__icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #10B981;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tpu-verified__text { flex: 1; min-width: 0; }
.tpu-h2 { font-size: 1.05rem; font-weight: 700; color: var(--color-text); margin-bottom: 12px; }

.tpu-plans { display: flex; flex-direction: column; gap: 10px; }
.tpu-plan {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.tpu-plan:hover { border-color: var(--color-accent-light); }
.tpu-plan input { position: absolute; opacity: 0; pointer-events: none; }
.tpu-plan__radio {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-surface-3);
  flex-shrink: 0;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.tpu-plan:has(input:checked) {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent);
  background: rgba(27, 91, 219, 0.03);
}
.tpu-plan input:checked + .tpu-plan__radio { border-color: var(--color-accent); box-shadow: inset 0 0 0 4px #fff; background: var(--color-accent); }
.tpu-plan input:focus-visible + .tpu-plan__radio { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.tpu-plan__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tpu-plan__name { font-size: 0.925rem; font-weight: 600; color: var(--color-text); }
.tpu-plan__meta { font-size: 0.8rem; color: var(--color-text-muted); }
.tpu-plan__price { font-size: 1.05rem; font-weight: 800; color: var(--color-text); flex-shrink: 0; }

.tpu-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 14px 0 18px;
  line-height: 1.5;
}
.tpu-note svg { flex-shrink: 0; margin-top: 2px; color: var(--color-accent); }

.tpu-help {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 18px;
}
.tpu-help a { color: var(--color-accent); font-weight: 600; margin-left: 4px; }

/* Plan family with durations (Unlimited Lite): one block, durations as chips */
.tpu-group {
  border: 1.5px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.tpu-group:has(input:checked) { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); }
.tpu-group__head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.tpu-group__label { font-size: 0.75rem; font-weight: 600; color: var(--color-text-muted); margin-bottom: 8px; }
.tpu-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; }
.tpu-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  border: 1.5px solid var(--color-border-subtle);
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition), background var(--transition);
}
.tpu-chip:hover { border-color: var(--color-accent-light); }
.tpu-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tpu-chip:has(input:checked) { border-color: var(--color-accent); background: rgba(27, 91, 219, 0.06); }
.tpu-chip:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.tpu-chip__days { font-size: 0.8125rem; font-weight: 700; color: var(--color-text); }
.tpu-chip__price { font-size: 0.78rem; color: var(--color-text-muted); }
/* After the eSIM check only its compatible packages stay (checkout.js filterPlans) */
.tpu-plans[hidden], .tpu-plan[hidden], .tpu-group[hidden], .tpu-chip[hidden] { display: none !important; }
#tpuNoPlansEsim { margin-bottom: 12px; }

.tpu-contact { margin-top: 18px; }
.tpu-contact .form-group { margin-bottom: 12px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 680px) {
  .ocf-page { padding: 24px 16px 60px; }
  .ocf-hero { padding: 32px 20px 26px; }
  .ocf-card { padding: 22px 18px; }
  .ocf-install__grid { grid-template-columns: 1fr; gap: 24px; }
  /* On a phone the install options come first (a QR cannot be scanned from the same screen) */
  .ocf-install__opts { order: -1; }
  .ocf-tabs { display: flex; }
  .ocf-tab { flex: 1; }
  .ocf-help { flex-wrap: wrap; padding: 16px; }
  .ocf-help__btn { width: 100%; }
  .ocf-progress li { font-size: 0.7rem; text-align: center; }
}
@media (max-width: 520px) {
  /* Checkout overlay on phones: compact plan bar, full-width actions */
  .ckout-plan-bar { gap: 10px; }
  .ckout-plan-bar__left { gap: 10px; }
  .ckout-plan-bar__flag { width: 34px; height: 25px; }
  .ckout-plan-bar__right { gap: 10px; }
  /* The name carries the duration ("Unlimited Lite · 60 de zile"): wrap to 2 lines instead of cutting it off */
  .ckout-plan-bar__name {
    font-size: 0.875rem; line-height: 1.25;
    white-space: normal; overflow-wrap: break-word;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  }
  .ckout-plan-bar__meta { font-size: 0.75rem; }
  .ckout-plan-bar__price { font-size: 1.05rem; }
  .ckx-phone__cc { min-width: 86px; padding: 0 26px 0 12px; background-position: right 8px center; }
  .ckx-stripe, .ckx-free { padding: 14px; }
  .ocf-update { left: 16px; right: 16px; transform: none; max-width: none; justify-content: space-between; }
  .tpu-steps { padding: 12px 20px; }
  .tpu-pane { padding: 20px; }
  .tpu-header { gap: 12px; }
  .tpu-header__icon { width: 40px; height: 40px; border-radius: 12px; }
  .tpu-help { padding: 0 16px; }
  .tpu-plan { padding: 12px 14px; gap: 12px; }
  .ocf-dl__row { flex-wrap: wrap; gap: 4px 16px; }
}
@media (max-width: 380px) {
  .tpu-steps__item { font-size: 0.72rem; gap: 6px; }
  /* Very narrow phones: the long "free" word (NEMOKAMAI / ZA DARMO) must not squeeze the plan name off */
  .ckout-plan-bar__price.is-free { font-size: 0.9rem; letter-spacing: 0; }
  .ckout-plan-bar__name { -webkit-line-clamp: 3; line-clamp: 3; }
}
@media (max-width: 340px) {
  .ocf-field__row { flex-direction: column; }
  .ocf-copy { min-height: 36px; }
}
