@layer components {
/* Главная: закреплённый CTA и выдвижная форма заявки */
.rg-home-sticky{position:fixed;z-index:900;bottom:0;left:50%;transform:translateX(-50%);width:min(100%,1100px);display:grid;grid-template-columns:minmax(100px,.65fr) minmax(0,1.35fr);gap:10px;background:rgba(255,255,255,.98);border:1px solid #d9e5f1;border-bottom:0;border-radius:19px 19px 0 0;padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px));box-shadow:0 -10px 35px rgba(4,22,42,.13);box-sizing:border-box}
.rg-home-sticky a,.rg-home-sticky button{min-height:53px;display:flex;align-items:center;justify-content:center;text-align:center;border-radius:14px;font:800 15px/1.2 Inter,system-ui,sans-serif;text-decoration:none;cursor:pointer;padding:8px 12px}
.rg-home-sticky a{background:#eef5fb;color:#0a315b;border:1px solid #d9e5f1}
.rg-home-sticky button{background:#0d6efd;color:#fff;border:1px solid #0d6efd}
.rg-home-sticky a:focus-visible,.rg-home-sticky button:focus-visible,.rg-home-hero-trigger:focus-visible{outline:3px solid #62c6f8;outline-offset:2px}
body:has(.rg-home-sticky) .phone{padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))}
button.rg-home-hero-trigger{width:100%;border:0;cursor:pointer;font-family:inherit}
button.rg-home-hero-trigger.cta.outline{border:1px solid rgba(255,255,255,.26)}
.rg-home-sheet[hidden]{display:none}
.rg-home-sheet{position:fixed;z-index:1100;inset:0;display:flex;align-items:flex-end;justify-content:center;overflow:hidden;background:rgba(3,15,30,.66);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.rg-home-panel{position:relative;box-sizing:border-box;width:min(100%,560px);max-height:min(92vh,92dvh);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;border-radius:22px 22px 0 0;background:#fff;color:#081b33;box-shadow:0 -20px 65px rgba(0,0,0,.24);padding:10px 21px calc(26px + env(safe-area-inset-bottom,0px))}
.rg-home-grip{width:46px;height:5px;border-radius:10px;background:#c5d5e5;margin:0 auto 18px}
.rg-home-sheet-header{display:flex;align-items:start;gap:8px;justify-content:space-between}
.rg-home-sheet-header h2{margin:0 0 8px;font-size:clamp(23px,5vw,29px);line-height:1.12;letter-spacing:-.035em;color:#081b33}
.rg-home-sheet-header p{margin:0 0 18px;font-size:13px;line-height:1.4;color:#66788b}
.rg-home-close{flex:none;display:grid;place-items:center;width:40px;height:40px;border:1px solid #d6e3ef;border-radius:50%;background:#f6f9fc;color:#113454;font-size:26px;cursor:pointer}
.rg-home-form{display:grid;gap:13px}
.rg-home-field{display:grid;gap:7px;font-size:13px;line-height:1.35;color:#193851;font-weight:750}
.rg-home-field>span{display:block}
.rg-home-form select,.rg-home-form input:not([type=checkbox]),.rg-home-form textarea{box-sizing:border-box;width:100%;max-width:100%;min-width:0;border:1px solid #cbdbea;border-radius:13px;padding:12px 13px;color:#0b2747;background:#fff;outline:none;font:400 16px/1.35 Inter,system-ui,sans-serif}
.rg-home-form textarea{resize:vertical;min-height:75px}
.rg-home-form select:focus,.rg-home-form input:not([type=checkbox]):focus,.rg-home-form textarea:focus{border-color:#0d6efd;box-shadow:0 0 0 3px rgba(13,110,253,.12)}
.rg-home-form .rg-consent{margin:2px 0 0}
.rg-home-form .rg-consent .rg-consent-input{width:20px;min-width:20px;max-width:20px;height:20px;min-height:20px;max-height:20px;padding:0;margin:2px 0 0;flex:0 0 20px;accent-color:#0d6efd}
.rg-home-form .rg-consent .rg-consent-text{display:block;width:auto;min-width:0;flex:1;white-space:normal;overflow-wrap:anywhere;line-height:1.5;font-size:12px}
.rg-home-submit{border:0;border-radius:14px;min-height:53px;background:#0d6efd;color:#fff;font:800 16px/1.3 Inter,system-ui,sans-serif;cursor:pointer}
.rg-home-submit:disabled{opacity:.65;cursor:wait}
.rg-home-result{min-height:19px;margin:0;font-size:13px;line-height:1.4;color:#b42318}
.rg-home-result[data-state=ok]{color:#146947}
.rg-home-fallback{font-size:12px;color:#66788b;margin:0 0 4px;line-height:1.45}
.rg-home-fallback a{color:#095eaf;text-decoration:underline}
.rg-home-success[hidden]{display:none}
.rg-home-success{padding:16px 0 20px}
.rg-home-success h3{margin:0 0 8px;font-size:24px;color:#0b3158}
.rg-home-success p{color:#406180;line-height:1.5}
.rg-home-success button{width:100%;min-height:50px;border:0;border-radius:13px;background:#0d6efd;color:#fff;font-size:15px;font-weight:800;cursor:pointer}
@media(max-width:420px){.rg-home-sticky{gap:7px;padding-left:10px;padding-right:10px}.rg-home-sticky a,.rg-home-sticky button{font-size:14px;padding:8px}.rg-home-panel{padding-left:16px;padding-right:16px}}
@media(prefers-reduced-motion:no-preference){.rg-home-panel{animation:rgHomeSlide .24s ease-out}@keyframes rgHomeSlide{from{transform:translateY(32px);opacity:.5}to{transform:translateY(0);opacity:1}}}

/* Contextual mobile CTA: hidden during the first viewport, revealed after the visitor scrolls. */
.rg-home-sticky{width:min(100%,560px);grid-template-columns:54px minmax(0,1fr);gap:9px;padding:9px 12px calc(9px + env(safe-area-inset-bottom,0px));opacity:0;visibility:hidden;pointer-events:none;transform:translate(-50%,calc(100% + 8px));transition:opacity .24s ease,transform .24s ease,visibility .24s}
.rg-home-sticky.is-visible{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,0)}
.rg-home-sticky a,.rg-home-sticky button{min-height:50px;font-size:14px}
.rg-home-sticky a{padding:0;display:grid;place-items:center}
.rg-home-sticky button{white-space:normal}
body:has(.rg-home-sticky) .phone{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
@media(max-width:420px){.rg-home-sticky{grid-template-columns:50px minmax(0,1fr);gap:8px;padding-left:10px;padding-right:10px}}
@media(prefers-reduced-motion:reduce){.rg-home-sticky{transition:none}}

/* Ensure an acknowledged CRM submission hides the form even against layout display rules. */
.rg-home-form[hidden]{display:none}

}
