/* eSIM365 v3 — окно проверки eSIM (esim-check-v3.php).
   Переменные — из home-v3.css (--font, --brand, --ink-*, --line, --radius); значения после запятой — запасные,
   если файл подключён на странице без home-v3.css. Сброс стилей нужен, чтобы style.css темы
   (заглавные буквы и тени у кнопок, отступы у заголовков) не влиял на окно. */

.v3chk{
  --v3chk-brand: var(--brand, #593196);
  --v3chk-ink: var(--ink-hero, #1d1626);
  --v3chk-muted: var(--ink-muted, #5f5870);
  --v3chk-subtle: var(--ink-subtle, #8f839c);
  --v3chk-line: var(--line, #e6e0ee);
  --v3chk-radius: var(--radius, 10px);
  --v3chk-lav: #f6f3fb;
  --v3chk-lav-2: #efeaf6;
  --v3chk-green: #2f8a5f;

  position:fixed; inset:0; z-index:100000;
  display:flex; align-items:center; justify-content:center; padding:16px;
  background:rgba(29,22,38,.55);
  font-family:var(--font, 'Manrope', system-ui, sans-serif); color:var(--v3chk-ink);
  -webkit-font-smoothing:antialiased;
  animation:v3chkFade .2s ease;
}
.v3chk[hidden]{ display:none; }
/* style.css темы задаёт section{display:block} и перебивает атрибут hidden: без этого правила все шаги видны одновременно */
.v3chk [hidden]{ display:none !important; }
.v3chk *{ box-sizing:border-box; }
.v3chk :where(h2,p,ol,li){ margin:0; padding:0; }
.v3chk :where(button){
  font:inherit; color:inherit; margin:0; border:0; background:none; box-shadow:none;
  text-transform:none; letter-spacing:0; cursor:pointer; -webkit-tap-highlight-color:transparent;
}
.v3chk a{ text-decoration:none; }
.v3chk :where(button,a):focus-visible{ outline:3px solid rgba(89,49,150,.35); outline-offset:3px; }

.v3chk-modal{
  position:relative; width:100%; max-width:460px; max-height:calc(100vh - 32px); overflow:auto;
  padding:30px 28px 26px; border-radius:calc(var(--v3chk-radius) * 2); background:#fff;
  box-shadow:0 30px 70px -20px rgba(45,30,80,.45);
  animation:v3chkUp .25s ease;
}
.v3chk .v3chk-h{
  margin-bottom:12px; font-family:inherit; font-size:24px; line-height:1.2; font-weight:800;
  letter-spacing:-.03em; color:var(--v3chk-ink); text-transform:none; text-wrap:balance;
}
.v3chk-text{ margin-bottom:12px !important; font-size:15px; line-height:1.6; font-weight:500; color:var(--v3chk-muted); }
.v3chk-text b{ color:var(--v3chk-ink); font-weight:700; }
.v3chk-kicker{ margin-bottom:8px !important; color:var(--v3chk-brand); font-size:12px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }

.v3chk-close{
  position:absolute; top:14px; right:14px; display:flex; align-items:center; justify-content:center;
  width:38px; height:38px; border-radius:50% !important; background:var(--v3chk-lav) !important; color:var(--v3chk-muted) !important;
}
.v3chk-close:hover{ background:var(--v3chk-lav-2) !important; color:var(--v3chk-ink) !important; }
.v3chk-close svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }

.v3chk-progress{ display:flex; gap:6px; width:96px; margin-bottom:18px; }
.v3chk-progress i{ flex:1; height:4px; border-radius:2px; background:var(--v3chk-lav-2); }
.v3chk-progress i.on{ background:var(--v3chk-brand); }

.v3chk-code{
  margin:4px 0 16px; padding:18px; border:1px solid #e4daf0; border-radius:calc(var(--v3chk-radius) * 1.4);
  background:var(--v3chk-lav); color:var(--v3chk-brand); text-align:center;
  font:800 36px/1 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing:.18em;
}

/* Вкладки — как .cv3-tabs в блоке «Совместимость» */
.v3chk-tabs{ display:flex; gap:6px; margin:6px 0 16px; padding:4px; border-radius:var(--v3chk-radius); background:var(--v3chk-lav-2); }
.v3chk-tabs button{ flex:1; min-height:40px; padding:8px 16px; border-radius:6px; font-size:14px; font-weight:700; color:#6b6376; }
.v3chk-tabs button.is-selected{ background:var(--v3chk-brand); color:#fff; }

.v3chk-path{ list-style:none; margin-bottom:16px !important; counter-reset:v3chk; }
.v3chk-path li{
  counter-increment:v3chk; position:relative; min-height:46px; padding:12px 0 12px 40px;
  font-size:15px; line-height:1.45; font-weight:500; color:var(--v3chk-muted);
}
.v3chk-path li + li{ border-top:1px solid var(--v3chk-line); }
.v3chk-path li::before{
  content:counter(v3chk); position:absolute; left:0; top:9px; display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:var(--v3chk-radius); background:var(--v3chk-lav-2);
  font-size:13px; font-weight:800; color:var(--v3chk-brand);
}
.v3chk-path b{ color:var(--v3chk-ink); font-weight:700; }

.v3chk-actions{ display:flex; flex-direction:column; gap:10px; margin-top:18px; }
.v3chk-btn{
  display:flex; align-items:center; justify-content:center; width:100%; min-height:52px; padding:14px 22px;
  border:1.5px solid var(--v3chk-brand) !important; border-radius:var(--v3chk-radius) !important;
  background:var(--v3chk-brand) !important; color:#fff !important;
  font-size:16px !important; font-weight:700 !important; line-height:1.2; text-align:center;
  transition:filter .15s ease, background-color .15s ease;
}
.v3chk-btn:hover{ filter:brightness(1.08); }
.v3chk-btn--ghost{ border-color:var(--v3chk-line) !important; background:#fff !important; color:var(--v3chk-ink) !important; }
.v3chk-btn--ghost:hover{ filter:none; border-color:#cfc3e0 !important; background:var(--v3chk-lav) !important; }
.v3chk-help{ margin-top:16px !important; font-size:14px; line-height:1.5; font-weight:500; color:var(--v3chk-subtle); text-align:center; }
.v3chk-help button{ font-weight:700; color:var(--v3chk-brand); text-decoration:underline; text-underline-offset:3px; }
.v3chk-help button:hover{ text-decoration-thickness:2px; }
.v3chk-foot{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:14px; }
.v3chk-foot .v3chk-back, .v3chk-foot .v3chk-help{ margin:0 !important; }
.v3chk-back{ margin-top:14px; padding:4px 0; font-size:14px; font-weight:600; color:var(--v3chk-subtle); }
.v3chk-back:hover{ color:var(--v3chk-brand); }

.v3chk-result{ text-align:center; }
.v3chk-result .v3chk-text{ max-width:340px; margin-left:auto !important; margin-right:auto !important; }
.v3chk-icon{
  display:flex; align-items:center; justify-content:center; width:72px; height:72px; margin:8px auto 18px;
  border-radius:50%; font-size:34px; font-weight:800;
}
.v3chk-icon svg{ width:36px; height:36px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.v3chk-icon--ok{ background:#e3f3ea; color:var(--v3chk-green); }
.v3chk-icon--no{ background:var(--v3chk-lav-2); color:var(--v3chk-brand); }
.v3chk-note{ margin-top:16px !important; font-size:13px; line-height:1.55; color:var(--v3chk-subtle); }

/* Телефон: окно выезжает снизу */
@media (max-width:680px){
  .v3chk{ align-items:flex-end; padding:0; }
  .v3chk-modal{
    max-width:none; max-height:92vh; padding:26px 20px calc(22px + env(safe-area-inset-bottom));
    border-radius:calc(var(--v3chk-radius) * 2) calc(var(--v3chk-radius) * 2) 0 0;
    animation:v3chkSheet .25s ease;
  }
  .v3chk .v3chk-h{ font-size:22px; padding-right:40px; }
  .v3chk-result .v3chk-h{ padding-right:0; }
}
@keyframes v3chkFade{ from{ opacity:0; } }
@keyframes v3chkUp{ from{ opacity:0; transform:translateY(12px); } }
@keyframes v3chkSheet{ from{ transform:translateY(100%); } }
@media (prefers-reduced-motion:reduce){ .v3chk, .v3chk-modal{ animation:none; } }

/* Кнопка-триггер в стиле v3 (по желанию): <button class="v3chk-trigger" data-esim-check>…</button> */
.v3chk-trigger{
  display:inline-flex; align-items:center; gap:10px; min-height:48px; padding:12px 20px;
  border:1.5px solid var(--brand, #593196); border-radius:var(--radius, 10px); background:#fff; box-shadow:none;
  font-family:var(--font, 'Manrope', sans-serif); font-size:15px; font-weight:700; color:var(--brand, #593196);
  text-transform:none; letter-spacing:0; cursor:pointer;
}
.v3chk-trigger:hover{ background:#f6f3fb; }
