/* Closed owner preview only. Never rescale native document typography or project074 popups. */
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup) {
  --ks-popup-ink:#132d51;--ks-popup-navy:#102d61;--ks-popup-muted:#657183;
  color:var(--ks-popup-ink);background:#0d203d99;backdrop-filter:blur(4px);
  padding:16px;box-sizing:border-box;
  font:16px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup):not(.hide-popup) {
  display:flex;align-items:center;justify-content:center;
}
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup) .section-popup-custom__container {
  position:relative;display:flex;flex-direction:column;flex-wrap:nowrap;
  width:min(560px,100%);max-width:100%;min-width:0;margin:0;padding:36px;
  max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;
  color:var(--ks-popup-ink);background:#fff;border:1px solid #e2e7ed;border-radius:22px;
  box-shadow:0 24px 80px #071e3d33;box-sizing:border-box;scrollbar-gutter:stable;
}
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup) .section-popup-custom__container > * { flex-shrink:0;min-width:0;max-width:100%; }
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup) .section-popup-custom__title {
  margin:0 42px 24px 0;color:#132d51;font:650 28px/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing:-.035em;text-transform:none;overflow-wrap:anywhere;
}
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup) .section-popup-custom__popup-custom-icon {
  position:absolute;inset:12px 12px auto auto;z-index:2;display:block;width:44px;height:44px;min-width:44px;padding:12px;
  box-sizing:border-box;color:#102d61;background:#f0f4f9;border-radius:50%;cursor:pointer;touch-action:manipulation;
}
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup) .section-popup-custom__popup-custom-icon [stroke] { stroke:#102d61; }
/* Form-only Bricks styling: its own modal/open/close/focus lifecycle is untouched. */
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) .brx-popup-content:has(form) {
  position:relative;width:min(920px,calc(100vw - 32px));max-width:calc(100vw - 32px);min-width:0;
  max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain;
  color:#132d51;background:#fff;border:1px solid #e2e7ed;border-radius:22px;
  box-sizing:border-box;box-shadow:0 24px 80px #071e3d33;
  font:16px/1.5 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) .brx-popup .section-popup-sertificat__containter { width:100%;max-width:none;margin:0;padding:36px;box-sizing:border-box;background:#fff;border:0;border-radius:0; }
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) .brx-popup .section-popup-sertificate__close { position:absolute;inset:12px 12px auto auto;z-index:5;width:44px;height:44px;padding:12px;box-sizing:border-box;background:#f0f4f9;border-radius:50%;color:#102d61;cursor:pointer;touch-action:manipulation; }
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) .brx-popup .section-popup-sertificate__close [stroke] { stroke:#102d61; }
/* Only these native popup form descendants receive controls/spacing. Hidden fields retain native behavior. */
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup,.brx-popup-content) form { width:100%;min-width:0;font-family:inherit; }
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup,.brx-popup-content) .form-group { min-width:0;max-width:100%; }
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup,.brx-popup-content) :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),textarea,select) {
  width:100%;max-width:100%;min-width:0;min-height:52px;padding:13px 15px;box-sizing:border-box;
  font:400 16px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color:#132d51;background:#fff;border:1px solid #ccd8e6;border-radius:12px;box-shadow:none;
}
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup,.brx-popup-content) textarea { min-height:112px;resize:vertical; }
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup,.brx-popup-content) :is(button[type="submit"],input[type="submit"]) {
  width:100%;min-height:52px;padding:14px 20px;box-sizing:border-box;
  color:#fff;background:#102d61;border:1px solid #102d61;border-radius:12px;
  font:650 15px/1.4 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;text-transform:none;letter-spacing:0;touch-action:manipulation;
}
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup,.brx-popup-content) :is(button,input,textarea,select,a,[role="button"]):focus-visible { outline:3px solid #81a4cf;outline-offset:3px; }
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup,.brx-popup-content) .options-wrapper { color:#657183;font-size:12px;line-height:1.5;overflow-wrap:anywhere; }
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup,.brx-popup-content) .options-wrapper label { min-height:44px;align-items:center; }
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup,.brx-popup-content) .options-wrapper a { color:#102d61;text-decoration:underline;text-underline-offset:3px; }
html:has(body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup):not(.hide-popup)),
body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty):has(:is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup):not(.hide-popup)) { overflow:hidden; }
@media(max-width:480px) {
  body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup) { padding:12px; }
  body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup) .section-popup-custom__container { padding:58px 22px 24px;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:18px; }
  body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) :is(.section-popup-custom.footer-popup,.section-popup-smeta.footer-popup) .section-popup-custom__title { margin-right:0;font-size:25px; }
  body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) .brx-popup-content:has(form) { width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border-radius:18px; }
  body.ks-site-pilot-active.ks-site-pilot-shell:not(.single-proekty) .brx-popup .section-popup-sertificat__containter { padding:58px 22px 24px; }
}
