/* Виджеты (layouts/_widgets): «Сейчас на сайте», «Напишите нам», модалка заявки. Поведение — widgets.js */
/* «N человек на сайте» — как на auto-quick.ru: белая плашка, точка без пульса, число жирным (настоящие посетители за час, Visit) */
.online-badge{position:fixed;left:20px;bottom:20px;z-index:70;display:inline-flex;align-items:center;gap:8px;padding:9px 14px;border-radius:999px;background:var(--sf);border:1px solid var(--ln);font-size:13px;line-height:1.2;color:var(--mu);box-shadow:0 10px 30px rgba(0,0,0,.12);white-space:nowrap;font-family:var(--fb)}
.online-badge b{color:var(--tx);font-weight:800}
.online-badge__dot{width:7px;height:7px;border-radius:50%;background:#34c759;flex:none}

/* страница машины: «За 3 дня этот автомобиль посмотрели N человек» (catalog/show, site.js) — слева снизу, как .online-badge */
.views-toast{position:fixed;left:20px;bottom:20px;z-index:71;width:min(340px,calc(100vw - 40px));display:flex;align-items:flex-start;gap:14px;padding:16px 46px 16px 16px;border-radius:18px;background:var(--sf);border:1px solid var(--ln);box-shadow:0 18px 50px rgba(0,0,0,.16);font-family:var(--fb);color:var(--tx);opacity:0;visibility:hidden;transform:translateY(16px);transition:opacity .35s ease,transform .45s cubic-bezier(.2,.7,.2,1),visibility 0s linear .45s}
.views-toast.is-visible{opacity:1;visibility:visible;transform:none;transition-delay:0s}
.views-toast svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.views-toast__icon{flex:none;width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:rgba(232,51,58,.1);color:var(--red,#e8333a)}
.views-toast__icon svg{width:20px;height:20px}
.views-toast__body{min-width:0}
.views-toast__text{margin:0;font-size:14px;line-height:1.4;color:var(--mu)}
.views-toast__text b{color:var(--tx);font-weight:800;white-space:nowrap}
.views-toast__action{margin-top:8px;padding:0;border:0;background:none;font:700 13px/1.2 var(--fb);color:var(--red,#e8333a);cursor:pointer;display:inline-flex;align-items:center;gap:6px}
.views-toast__action svg{width:15px;height:15px;transition:transform .25s ease}
.views-toast__action:hover svg{transform:translateX(3px)}
.views-toast__close{position:absolute;top:10px;right:10px;width:28px;height:28px;padding:0;border:0;border-radius:50%;background:none;color:var(--mu);cursor:pointer;display:grid;place-items:center;transition:background .2s ease,color .2s ease}
.views-toast__close:hover{background:var(--ln);color:var(--tx)}
.views-toast__close svg{width:16px;height:16px}
@media (max-width:700px){.views-toast{left:12px;right:12px;bottom:calc(84px + env(safe-area-inset-bottom,0px));width:auto;padding:12px 38px 12px 12px;gap:10px;border-radius:16px}.views-toast__icon{width:34px;height:34px}.views-toast__text{font-size:13px}.views-toast__close{top:6px;right:6px}}
@media (prefers-reduced-motion:reduce){.views-toast{transform:none}}

.contact-fab{pointer-events:none;position:fixed;right:20px;bottom:20px;z-index:70;display:flex;flex-direction:column;align-items:flex-end;gap:10px;font-family:var(--fb)}
.contact-fab__list{display:flex;flex-direction:column;gap:8px;opacity:0;transform:translateY(12px);pointer-events:none;transition:opacity .3s ease,transform .4s cubic-bezier(.2,.7,.2,1)}
.contact-fab.is-open .contact-fab__list{opacity:1;transform:translateY(0);pointer-events:auto}
.contact-fab__wa,.contact-fab__tg,.contact-fab__max,.contact-fab__call{height:48px;padding:0 20px;border-radius:999px;display:flex;align-items:center;gap:10px;font-weight:700;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.contact-fab__wa svg,.contact-fab__tg svg,.contact-fab__max svg,.contact-fab__call svg{width:22px;height:22px;flex:none}.contact-fab__max svg{width:24px;height:24px}
.contact-fab__call svg{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.contact-fab__wa{background:#25d366;color:#fff}
.contact-fab__tg{background:#2aa3e0;color:#fff}
.contact-fab__max{background:linear-gradient(135deg,#2f8cff,#8e3cff);color:#fff}
.contact-fab__wa:hover,.contact-fab__tg:hover,.contact-fab__max:hover{color:#fff}
.contact-fab__call{background:var(--sf);border:1px solid var(--ln);color:var(--tx)}
.contact-fab:not(.is-tucked) .contact-fab__btn{pointer-events:auto}
.contact-fab__btn{height:58px;padding:0 10px 0 24px;border-radius:999px;border:0;background:#d52d35;color:#fff;font-family:inherit;cursor:pointer;display:flex;align-items:center;gap:14px;box-shadow:0 14px 34px rgba(130,20,29,.35),inset 0 1px rgba(255,255,255,.12)}
.contact-fab__btn[data-fx="btn"]{box-shadow:0 14px 34px rgba(130,20,29,.75),inset 0 1px rgba(255,255,255,.2)}
.contact-fab__btn[data-fx="btn"]:hover{box-shadow:0 18px 38px rgba(130,20,29,.42),0 0 0 4px rgba(213,45,53,.15),inset 0 1px rgba(255,255,255,.14)}
.contact-fab__text{text-align:left}
.contact-fab__text b{display:block;font-size:15px}
.contact-fab__text span{font-size:12px;opacity:.85}
.contact-fab__plus{width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.14);box-shadow:inset 0 1px rgba(255,255,255,.16);display:grid;place-items:center;font-size:18px;transition:transform .35s ease}
.contact-fab.is-open .contact-fab__plus{transform:rotate(45deg)}
@media (max-width:700px){.contact-fab__text span{display:none}}
/* телефон (19.11.2026): вместо широкой плашки — круглая кнопка со значком чата; открыта — крестик (тот же «+», повёрнутый) */
.contact-fab__icon{display:none}
.contact-fab{transition:opacity .3s ease,transform .35s cubic-bezier(.2,.7,.2,1),visibility 0s linear 0s}
.contact-fab.is-tucked{opacity:0;visibility:hidden;transform:translateY(16px) scale(.9);pointer-events:none;transition:opacity .25s ease,transform .3s ease,visibility 0s linear .3s}
@media (max-width:700px){
  .contact-fab{right:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px))}
  .contact-fab__btn{width:56px;height:56px;padding:0;justify-content:center;gap:0}
  .contact-fab__text{display:none}
  .contact-fab__icon{display:grid;place-items:center}
  .contact-fab__icon svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
  .contact-fab__plus{display:none;background:none;font-size:26px}
  .contact-fab.is-open .contact-fab__icon{display:none}
  .contact-fab.is-open .contact-fab__plus{display:grid}
}

/* формы заявок: после отправки вместо полей — «Спасибо» (класс sent ставит widgets.js) */
.lead-form__thanks{display:none}
.lead-form.is-sent .lead-form__thanks{display:block}
.lead-form.is-sent>:not(.lead-form__thanks){display:none}

.lead-modal{position:fixed;inset:0;z-index:110;background:rgba(0,0,0,.6);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);display:none;place-items:center;padding:20px;font-family:var(--fb)}
.lead-modal.is-open{display:grid}
html.is-lightbox-open .lead-modal{z-index:140}
.lead-modal__window{width:min(480px,100%);background:var(--sf);color:var(--tx);border:1px solid var(--ln);border-radius:30px;padding:32px;position:relative}
.lead-modal__close{position:absolute;right:18px;top:18px;width:38px;height:38px;border-radius:50%;border:1px solid var(--ln);background:transparent;color:var(--tx);cursor:pointer;font-size:16px}
.lead-modal__form{display:flex;flex-direction:column;gap:14px}
.lead-modal__form.is-sent .lead-modal__thanks{padding:30px 0;display:flex;flex-direction:column;gap:12px}
.lead-modal__thanks-title{font-family:var(--fh);font-size:40px}
.lead-modal__thanks-text{color:var(--mu);line-height:1.5}
.lead-modal__kicker{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:#e8333a;font-weight:800}
.lead-modal__topic{align-self:flex-start;padding:8px 14px;border-radius:999px;background:var(--sf2);border:1px solid rgba(232,51,58,.5);font-size:13px;font-weight:700}
.lead-modal__topic:empty{display:none}
.lead-modal__title{font-family:var(--fh);font-size:34px;line-height:1.05}
.lead-modal__title em{color:#e8333a;font-style:normal}
.lead-modal__text{color:var(--mu);font-size:14px;line-height:1.5}
.lead-modal__input{height:54px;border-radius:16px;border:1px solid var(--ln);background:var(--sf2);color:var(--tx);padding:0 18px;font:inherit;font-size:16px;outline:none}
.lead-modal__input:focus{border-color:#e8333a}
.lead-modal__submit{height:56px;border-radius:18px;border:0;background:#e8333a;color:#fff;font-family:inherit;font-weight:800;font-size:16px;cursor:pointer}
.lead-modal__submit:hover{background:#ff464d}
.lead-modal__agree{font-size:12px;color:#8d8b92;line-height:1.5}
.lead-modal__agree a{text-decoration:underline}

/* Плашка «Читать канал» (shared/_telegram_banner): спокойная карточка во всю ширину контейнера, как у revocars.ru */
.telegram-banner-wrap{max-width:var(--wrap,1480px);margin:32px auto;padding:0 var(--gut,clamp(16px,3vw,40px));box-sizing:border-box}
.telegram-banner{display:flex;align-items:center;gap:16px;padding:14px 14px 14px 16px;border-radius:18px;border:1px solid var(--ln,rgba(12,12,14,.1));background:var(--sf2,#f4f4f4);color:var(--tx,#121214);text-decoration:none;font-family:var(--fb,'Manrope',sans-serif);transition:border-color .25s ease,box-shadow .25s ease}
.telegram-banner:hover{border-color:rgba(36,90,138,.35);box-shadow:0 10px 26px rgba(36,90,138,.12)}
.telegram-banner__icon{width:40px;height:40px;flex-shrink:0;border-radius:50%;background:#245a8a;display:grid;place-items:center}
.telegram-banner__icon svg{width:19px;height:19px;fill:#fff;margin-left:-2px}
.telegram-banner__text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.telegram-banner__text b{font-size:15px;font-weight:800;line-height:1.2}
.telegram-banner__text span{font-size:13px;color:var(--mu,#6b6a70)}
.telegram-banner__button{flex-shrink:0;display:flex;align-items:center;gap:8px;height:46px;padding:0 24px;border-radius:999px;background:#245a8a;color:#fff;font-weight:800;font-size:14px;box-shadow:0 8px 18px rgba(36,90,138,.28);transition:background .25s ease,transform .25s ease}
.telegram-banner__button i{font-style:normal}
.telegram-banner:hover .telegram-banner__button{background:#1d4b74;transform:translateY(-1px)}
@media (max-width:560px){
  .telegram-banner{display:grid;grid-template-columns:40px minmax(0,1fr);gap:12px;padding:14px}
  .telegram-banner__button{grid-column:1/-1;justify-content:center}
}

/* просмотр роликов и фото выдач (widgets.js, shared/_reels) */
.media-viewer{position:fixed;inset:0;z-index:1000;display:none;align-items:center;justify-content:center;background:rgba(8,8,10,.94);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.media-viewer.is-open{display:flex}
.media-viewer__stage{display:flex;align-items:center;justify-content:center;width:min(92vw,1200px);height:calc(100vh - 140px)}
.media-viewer__stage video,.media-viewer__stage img{max-width:100%;max-height:100%;border-radius:18px;background:#000;box-shadow:0 30px 80px rgba(0,0,0,.5)}
.media-viewer__title{position:absolute;left:0;right:0;bottom:24px;text-align:center;color:#fff;font-weight:800;font-size:16px;font-family:var(--fb,'Manrope',sans-serif)}
.media-viewer__close,.media-viewer__nav{position:absolute;width:52px;height:52px;border-radius:50%;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.08);color:#fff;font-size:20px;cursor:pointer;display:grid;place-items:center;transition:background .2s ease}
.media-viewer__close:hover,.media-viewer__nav:hover{background:#e8333a;border-color:#e8333a}
.media-viewer__close{top:20px;right:20px}
.media-viewer__nav{top:50%;margin-top:-26px}
.media-viewer__nav--prev{left:20px}.media-viewer__nav--next{right:20px}
.media-viewer.is-single .media-viewer__nav{display:none}
@media (max-width:760px){.media-viewer__stage{width:100vw;height:calc(100vh - 120px)}.media-viewer__stage video,.media-viewer__stage img{border-radius:0}.media-viewer__nav{top:auto;bottom:16px;margin:0;width:46px;height:46px}.media-viewer__title{bottom:28px;padding:0 70px;font-size:14px}}
button.video-card{display:block;width:100%;padding:0;border:0;cursor:pointer;font-family:inherit;text-align:left}

/* ===== Окно при уходе «Не нашли подходящий автомобиль?» (20.11.2026, проба с A/B; layouts/_leave_offer, leave_offer.js) =====
   Компьютер — карточка по центру: фото шоурума слева, текст и форма справа. Телефон (≤700 px) — панель снизу не выше 62 % экрана
   (полноэкранные окна на телефоне поисковики штрафуют), без фото. */
.leave-offer{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:20px;font-family:var(--fb)}
.leave-offer[hidden]{display:none}
.leave-offer__backdrop{position:absolute;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);opacity:0;transition:opacity .3s ease}
.leave-offer__card{position:relative;width:min(860px,100%);display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);background:var(--sf);color:var(--tx);border:1px solid var(--ln);border-radius:30px;overflow:hidden;box-shadow:0 40px 90px rgba(0,0,0,.35);opacity:0;transform:translateY(18px) scale(.98);transition:opacity .3s ease,transform .3s cubic-bezier(.2,.8,.2,1)}
.leave-offer.is-open .leave-offer__backdrop{opacity:1}
.leave-offer.is-open .leave-offer__card{opacity:1;transform:none}
.leave-offer__close{position:absolute;right:16px;top:16px;z-index:2;width:38px;height:38px;border-radius:50%;border:1px solid var(--ln);background:var(--sf);color:var(--tx);display:grid;place-items:center;cursor:pointer}
.leave-offer__close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.leave-offer__media{position:relative;min-height:100%;background:#121214}
.leave-offer__image{position:absolute;inset:0;background:#121214 center 40%/cover no-repeat}
.leave-offer__media:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,rgba(0,0,0,.75))}
.leave-offer__note{position:absolute;left:22px;right:22px;bottom:20px;z-index:1;color:#fff;display:flex;flex-direction:column;gap:4px}
.leave-offer__note b{font-family:var(--fh);font-weight:400;font-size:20px}
.leave-offer__note span{font-size:13px;color:rgba(255,255,255,.8)}
.leave-offer__body{display:flex;flex-direction:column;gap:14px;padding:34px 32px 26px}
.leave-offer__handle{display:none}
.leave-offer__eyebrow{font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:#e8333a;font-weight:800}
.leave-offer__title{font-family:var(--fh);font-size:30px;line-height:1.08;padding-right:30px}
.leave-offer__title em{display:block;color:#e8333a;font-style:normal}
.leave-offer__text{margin:0;color:var(--mu);font-size:14px;line-height:1.5}
.leave-offer__perks{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:9px}
.leave-offer__perks li{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.35}
.leave-offer__perks i{flex:0 0 22px;height:22px;border-radius:50%;background:rgba(232,51,58,.12);color:#e8333a;display:grid;place-items:center}
.leave-offer__perks i svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.leave-offer__perks small{font-size:13px;color:var(--mu)}
.leave-offer__form{display:flex;flex-direction:column;gap:8px}
.leave-offer__row{display:flex;gap:8px}
.leave-offer__input{flex:1;min-width:0;height:52px;border-radius:16px;border:1px solid var(--ln);background:var(--sf2);color:var(--tx);padding:0 16px;font:inherit;font-size:16px;outline:none}
.leave-offer__input:focus{border-color:#e8333a}
.leave-offer__submit{height:52px;padding:0 22px;border-radius:16px;border:0;background:#e8333a;color:#fff;font-family:inherit;font-weight:800;font-size:15px;cursor:pointer;white-space:nowrap}
.leave-offer__submit:hover{background:#ff464d}
.leave-offer__agree{font-size:11.5px;color:#8d8b92;line-height:1.45}
.leave-offer__agree a{text-decoration:underline}
.leave-offer__messengers{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:13px;color:var(--mu)}
.leave-offer__messengers a{display:inline-flex;align-items:center;height:34px;padding:0 14px;border-radius:999px;border:1px solid var(--ln);color:var(--tx);font-weight:700}
.leave-offer__messengers a:hover{border-color:#e8333a}
.leave-offer__skip{align-self:flex-start;border:0;background:none;color:var(--mu);font:inherit;font-size:13px;text-decoration:underline;cursor:pointer;padding:0}
.leave-offer__done{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;gap:10px;padding:56px 28px;text-align:center}
.leave-offer__done[hidden]{display:none}
.leave-offer__done i{width:56px;height:56px;border-radius:50%;background:rgba(47,181,86,.14);color:#2fb556;display:grid;place-items:center}
.leave-offer__done i svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.leave-offer__done b{font-family:var(--fh);font-weight:400;font-size:28px}
.leave-offer__done span{color:var(--mu)}
.leave-offer.is-done .leave-offer__card{grid-template-columns:1fr;width:min(480px,100%)}
html.is-leave-offer-open{overflow:hidden}
@media (max-width:700px){
  .leave-offer{place-items:end center;padding:0}
  .leave-offer__card{grid-template-columns:1fr;width:100%;max-height:62vh;max-height:62dvh;overflow-y:auto;border-radius:24px 24px 0 0;border-bottom:0;transform:translateY(100%)}
  .leave-offer.is-open .leave-offer__card{transform:none}
  .leave-offer__media{display:none}
  .leave-offer__body{gap:10px;padding:10px 18px calc(16px + env(safe-area-inset-bottom))}
  .leave-offer__handle{display:block;align-self:center;width:42px;height:4px;border-radius:4px;background:var(--ln);margin-bottom:4px}
  .leave-offer__close{top:12px;right:12px;width:34px;height:34px}
  .leave-offer__title{font-size:23px}
  .leave-offer__text{font-size:13px}
  .leave-offer__perks{gap:6px}
  .leave-offer__perks li{font-size:13px}
  .leave-offer__row{flex-direction:column}
  .leave-offer__submit{height:48px}
  .leave-offer__input{flex:none;height:48px}
  .leave-offer.is-done .leave-offer__card{width:100%}
  html.is-leave-offer-open{overflow:auto}
}
