/* «Запросить счёт» — общее окно для юрлиц (partials/invoice-request.php).
   Лежит вне обёрток страниц, поэтому токены и кнопки — свои. */
.esc-ir{
  --ir-accent:#ff0004; --ir-accent-hover:#d40c10; --ir-bg:#1f1f1f; --ir-surface:#242424;
  --ir-border:rgba(255,255,255,.08); --ir-border-strong:rgba(255,255,255,.16);
  --ir-muted:#b3b3b3; --ir-muted-2:#8f8f8f; --ir-ok:#35c759; --ir-bad:#ff5a5d; --ir-bad-text:#ff6b6d;
  --ir-pad:clamp(24px,4vw,36px);
  position:fixed; inset:0; z-index:10240; display:flex; align-items:center; justify-content:center;
  padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  background:rgba(10,10,10,.88); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); overscroll-behavior:contain;
  font-family:'Ubuntu',Arial,sans-serif; color:#fff; -webkit-text-size-adjust:100%; }
.esc-ir[hidden]{ display:none !important; }
.esc-ir *,.esc-ir *::before,.esc-ir *::after{ box-sizing:border-box; }
.esc-ir :where(h3,p,fieldset,legend){ margin:0; padding:0; }
.esc-ir-box{ position:relative; width:100%; max-width:600px; max-height:calc(100dvh - 32px); overflow:auto; overscroll-behavior:contain;
  border-radius:24px; background:var(--ir-bg); border:1px solid var(--ir-border-strong); box-shadow:0 40px 120px rgba(0,0,0,.6);
  scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.18) transparent; }
.esc-ir-box:focus{ outline:none; }
.esc-ir-close{ position:sticky; top:12px; float:right; z-index:3; display:grid; place-items:center; width:44px; height:44px;
  margin:12px 12px -56px 0; padding:0; border-radius:12px; border:1px solid var(--ir-border-strong); background:rgba(31,31,31,.92);
  color:var(--ir-muted); cursor:pointer; transition:color .2s ease-in-out,border-color .2s ease-in-out; }
.esc-ir-close:hover,.esc-ir-close:focus-visible{ color:#fff; border-color:var(--ir-accent); }
.esc-ir-close svg{ width:18px; height:18px; }
.esc-ir-form{ display:flex; flex-direction:column; gap:20px; padding:var(--ir-pad); }
.esc-ir-hp{ position:absolute !important; left:-9999px; width:1px; height:1px; overflow:hidden; opacity:0; pointer-events:none; }
.esc-ir-head{ display:flex; flex-direction:column; gap:10px; padding-right:48px; }
.esc-ir-kick{ display:inline-flex; align-items:center; gap:8px; font-size:13px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--ir-accent); }
.esc-ir-kick::before{ content:''; width:22px; height:1px; background:var(--ir-accent); opacity:.7; }
.esc-ir-head h3{ font-size:clamp(22px,2.6vw,28px); font-weight:700; line-height:1.2; color:#fff; }
.esc-ir-lead{ font-size:15px; line-height:1.55; color:var(--ir-muted); text-wrap:pretty; }

.esc-ir-group{ display:flex; flex-direction:column; gap:14px; min-width:0; border:0; }
.esc-ir-group + .esc-ir-group{ padding-top:20px; border-top:1px solid var(--ir-border); }
.esc-ir-group legend{ float:left; width:100%; margin-bottom:2px; font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--ir-muted-2); }
.esc-ir-group legend + *{ clear:both; }
.esc-ir-fld{ display:flex; flex-direction:column; gap:6px; min-width:0; }
.esc-ir-fld > label,.esc-ir-lbl{ font-size:13px; line-height:1.4; color:var(--ir-muted); }
.esc-ir-fld > label small{ font-size:inherit; color:var(--ir-muted-2); }
.esc-ir input[type=text],.esc-ir input[type=tel],.esc-ir input[type=email],.esc-ir input[type=date],.esc-ir textarea{
  display:block; width:100%; height:48px; min-height:0; margin:0; padding:0 14px; border-radius:10px; border:1px solid var(--ir-border-strong);
  background:var(--ir-surface); color:#fff; font:400 16px/1.4 'Ubuntu',Arial,sans-serif; outline:none; box-shadow:none;
  transition:border-color .2s ease-in-out,box-shadow .2s ease-in-out; -webkit-appearance:none; appearance:none; }
.esc-ir input[type=date]{ color-scheme:dark; }
.esc-ir input[type=date]::-webkit-date-and-time-value{ text-align:left; }
.esc-ir textarea{ height:auto; min-height:72px; padding:12px 14px; line-height:1.5; resize:vertical; }
.esc-ir input::placeholder,.esc-ir textarea::placeholder{ color:rgba(255,255,255,.32); }
.esc-ir input:focus,.esc-ir textarea:focus{ border-color:var(--ir-accent); box-shadow:0 0 0 3px rgba(255,0,4,.16); }
.esc-ir .is-bad input,.esc-ir .is-bad textarea{ border-color:var(--ir-bad); }
.esc-ir-err-f{ margin:0; font-size:13px; line-height:1.4; color:var(--ir-bad-text); }
.esc-ir-hint{ font-size:13px; line-height:1.4; color:var(--ir-muted-2); }
.esc-ir-hint[hidden]{ display:none; }
.esc-ir-hint b{ color:#fff; font-weight:700; }
.esc-ir-two{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.esc-ir-row{ display:grid; grid-template-columns:minmax(0,1fr) auto; gap:14px; align-items:start; }

/* карточка компании по ИНН */
.esc-ir-party{ display:flex; gap:12px; align-items:flex-start; padding:12px 14px; border-radius:10px; border:1px solid var(--ir-border);
  background:rgba(255,255,255,.03); font-size:13px; line-height:1.45; color:var(--ir-muted); }
.esc-ir-party[hidden]{ display:none; }
.esc-ir-party .pi{ flex:0 0 auto; display:grid; place-items:center; width:22px; height:22px; margin-top:1px; border-radius:50%; background:rgba(255,255,255,.08); }
.esc-ir-party .pi svg{ width:13px; height:13px; }
.esc-ir-party b{ display:block; font-size:14px; font-weight:700; color:#fff; overflow-wrap:anywhere; }
.esc-ir-party span:not(.pi){ display:block; overflow-wrap:anywhere; }
.esc-ir-party.is-ok{ border-color:rgba(53,199,89,.35); background:rgba(53,199,89,.06); }
.esc-ir-party.is-ok .pi{ background:rgba(53,199,89,.16); color:var(--ir-ok); }
.esc-ir-party.is-dead{ border-color:rgba(255,90,93,.45); background:rgba(255,90,93,.07); }
.esc-ir-party.is-dead .pi{ background:rgba(255,90,93,.16); color:var(--ir-bad-text); }
.esc-ir-party.is-wait .pi{ animation:escIrSpin 1s linear infinite; }
@keyframes escIrSpin{ to{ transform:rotate(360deg); } }

/* пилюли: клуб и длительность */
.esc-ir-pills{ display:flex; flex-wrap:wrap; gap:8px; }
.esc-ir-pills--club{ display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr)); }
.esc-ir-pill{ position:relative; display:block; cursor:pointer; }
.esc-ir-pill input{ position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
.esc-ir-pill span{ display:flex; flex-direction:column; gap:2px; justify-content:center; min-height:48px; height:100%; padding:10px 14px; border-radius:10px;
  border:1px solid var(--ir-border-strong); background:var(--ir-surface); transition:border-color .2s ease-in-out,background-color .2s ease-in-out; }
.esc-ir-pill b{ font-size:15px; font-weight:700; color:#fff; white-space:nowrap; }
.esc-ir-pill i{ font-style:normal; font-size:13px; line-height:1.35; color:var(--ir-muted); }
.esc-ir-pill--sm span{ align-items:center; padding:10px 16px; }
.esc-ir-pill:hover span{ border-color:rgba(255,255,255,.28); }
.esc-ir-pill input:checked + span{ border-color:var(--ir-accent); background:rgba(255,0,4,.09); }
.esc-ir-pill input:focus-visible + span{ box-shadow:0 0 0 3px rgba(255,0,4,.25); }

/* гости */
.esc-ir-line{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 10px 10px 16px;
  border:1px solid var(--ir-border-strong); border-radius:12px; background:var(--ir-surface); }
.esc-ir-line-t{ display:flex; flex-direction:column; gap:2px; min-width:0; }
.esc-ir-line-t b{ font-size:15px; font-weight:700; }
.esc-ir-line-t i{ font-style:normal; font-size:13px; color:var(--ir-muted); }
.esc-ir-qty{ flex:0 0 auto; display:flex; align-items:center; height:44px; border-radius:10px; border:1px solid var(--ir-border-strong); background:var(--ir-bg); overflow:hidden; }
.esc-ir-qty button{ width:44px; height:100%; padding:0; border:0; background:none; color:#fff; font-size:20px; line-height:1; cursor:pointer; touch-action:manipulation; }
.esc-ir-qty button:hover{ background:rgba(255,255,255,.06); }
.esc-ir-qty button:disabled{ color:rgba(255,255,255,.25); cursor:default; background:none; }
.esc-ir .esc-ir-qty input[type=text]{ width:48px; height:100%; padding:0; border:0; border-radius:0; background:none; text-align:center;
  font-weight:700; font-variant-numeric:tabular-nums; box-shadow:none; }

/* согласие */
.esc-ir-agree{ position:relative; display:flex; align-items:flex-start; gap:12px; font-size:13px; line-height:1.5; color:var(--ir-muted); cursor:pointer; }
.esc-ir-agree input{ position:absolute; top:0; left:0; width:22px; height:22px; margin:0; opacity:0; cursor:pointer; }
.esc-ir-box-chk{ flex:0 0 auto; display:grid; place-items:center; width:22px; height:22px; border-radius:6px; border:1px solid var(--ir-border-strong);
  background:var(--ir-surface); color:transparent; transition:background-color .2s ease-in-out,border-color .2s ease-in-out; }
.esc-ir-box-chk svg{ width:14px; height:14px; }
.esc-ir-agree input:checked + .esc-ir-box-chk{ background:var(--ir-accent); border-color:var(--ir-accent); color:#fff; }
.esc-ir-agree input:focus-visible + .esc-ir-box-chk{ box-shadow:0 0 0 3px rgba(255,0,4,.25); }
.esc-ir-agree.is-bad .esc-ir-box-chk{ border-color:var(--ir-bad); }
.esc-ir-agree a{ color:#fff; text-decoration:underline; text-decoration-color:rgba(255,255,255,.35); text-underline-offset:3px; }
.esc-ir-agree a:hover{ text-decoration-color:var(--ir-accent); }
.esc-ir .esc-captcha-note{ margin:0; font-size:13px; color:var(--ir-muted-2); }

.esc-ir-err{ padding:10px 14px; border-radius:10px; border:1px solid rgba(255,90,93,.4); background:rgba(255,90,93,.08);
  font-size:14px; line-height:1.45; color:#ffb3b4; }
.esc-ir-err[hidden]{ display:none; }
.esc-ir-err a{ color:#fff; }

/* кнопки */
.esc-ir-btn{ display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:52px; padding:16px 28px; border:0;
  border-radius:6px; font:500 16px/1.1 'Ubuntu',Arial,sans-serif; white-space:nowrap; text-decoration:none; cursor:pointer;
  transition:background-color .2s ease-in-out,border-color .2s ease-in-out,color .2s ease-in-out; }
.esc-ir-btn--primary{ background:var(--ir-accent); color:#fff; }
.esc-ir-btn--primary:hover{ background:var(--ir-accent-hover); color:#fff; }
.esc-ir-btn--line{ border:1px solid var(--ir-border-strong); background:rgba(255,255,255,.04); color:#fff; }
.esc-ir-btn--line:hover{ color:var(--ir-accent); border-color:var(--ir-accent); }
.esc-ir-btn:focus-visible{ outline:2px solid #fff; outline-offset:2px; }
.esc-ir-btn[disabled]{ opacity:.6; cursor:default; }

/* итог и кнопка прилипают к низу окна */
.esc-ir-foot{ position:sticky; bottom:0; z-index:2; display:flex; align-items:center; gap:16px; margin:0 calc(-1 * var(--ir-pad));
  padding:14px var(--ir-pad); background:rgba(31,31,31,.96); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); border-top:1px solid var(--ir-border); }
.esc-ir-sum{ display:flex; flex-direction:column; gap:2px; min-width:0; font-size:13px; line-height:1.3; color:var(--ir-muted); }
.esc-ir-sum b{ font-size:20px; font-weight:700; color:#fff; font-variant-numeric:tabular-nums; white-space:nowrap; }
.esc-ir-submit{ flex:1 1 auto; margin-left:auto; max-width:280px; }

/* альтернатива: оплата онлайн */
.esc-ir-alt{ display:flex; flex-direction:column; gap:12px; }
.esc-ir-alt-h{ display:flex; align-items:center; gap:12px; font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--ir-muted-2); }
.esc-ir-alt-h::before,.esc-ir-alt-h::after{ content:''; flex:1 1 0; height:1px; background:var(--ir-border); }
.esc-ir-alt-card{ display:flex; align-items:center; gap:14px; padding:14px 16px; border-radius:14px; border:1px solid var(--ir-border-strong);
  background:rgba(255,255,255,.03); color:#fff; text-decoration:none; transition:border-color .2s ease-in-out,background-color .2s ease-in-out; }
.esc-ir-alt-card:hover,.esc-ir-alt-card:focus-visible{ border-color:var(--ir-accent); background:rgba(255,0,4,.06); color:#fff; }
.esc-ir-alt-ic{ flex:0 0 auto; display:grid; place-items:center; width:42px; height:42px; border-radius:12px; background:rgba(255,0,4,.12); color:var(--ir-accent); }
.esc-ir-alt-ic svg{ width:22px; height:22px; }
.esc-ir-alt-t{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.esc-ir-alt-t b{ font-size:15px; font-weight:700; }
.esc-ir-alt-t small{ font-size:13px; line-height:1.45; color:var(--ir-muted); text-wrap:pretty; }
.esc-ir-alt-go{ flex:0 0 auto; width:18px; height:18px; margin-left:auto; color:var(--ir-muted); }
.esc-ir-alt-note{ font-size:13px; line-height:1.5; color:var(--ir-muted-2); text-align:center; }
.esc-ir-alt-note a{ color:var(--ir-muted); }

/* экран «отправлено» */
.esc-ir-done{ display:none; flex-direction:column; align-items:center; gap:14px; text-align:center; outline:none; padding:clamp(40px,6vw,56px) clamp(20px,4vw,40px); }
.esc-ir.is-sent .esc-ir-done{ display:flex; }
.esc-ir.is-sent .esc-ir-form{ display:none; }
.esc-ir-done-ic{ display:grid; place-items:center; width:56px; height:56px; border-radius:50%; background:rgba(53,199,89,.14); border:1px solid rgba(53,199,89,.4); color:var(--ir-ok); }
.esc-ir-done-ic svg{ width:26px; height:26px; }
.esc-ir-done > b{ font-size:clamp(21px,2.4vw,26px); font-weight:700; }
.esc-ir-done p{ margin:0; font-size:16px; line-height:1.55; color:var(--ir-muted); max-width:420px; text-wrap:pretty; }
.esc-ir-done .esc-ir-done-sum{ font-size:15px; color:#fff; }
.esc-ir-done-sum[hidden]{ display:none; }
.esc-ir-done-acts{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:6px; }

@media (max-width:520px){
  .esc-ir{ --ir-pad:16px; align-items:flex-end; padding:0; }
  .esc-ir-box{ max-height:calc(100dvh - 24px); border-radius:20px 20px 0 0; border-bottom:0; padding-bottom:env(safe-area-inset-bottom); }
  .esc-ir-form{ gap:18px; padding-top:22px; padding-bottom:20px; }
  .esc-ir-two,.esc-ir-row{ grid-template-columns:1fr; }
  .esc-ir-foot{ gap:12px; }
  .esc-ir-submit{ max-width:none; padding:16px 18px; }
  .esc-ir-sum b{ font-size:18px; }
  .esc-ir-done-acts{ flex-direction:column; align-self:stretch; }
}
@media (prefers-reduced-motion:reduce){
  .esc-ir *{ transition:none !important; animation:none !important; }
}
@media print{ .esc-ir{ display:none !important; } }
