/* КРИТ ТОРО — пользовательские стили (master для https://toro.krit.pro/custom.css)
   Обновление: мобильная конверсия + UX, сент 2026 */

ul {
  list-style-image: url("https://static.tildacdn.com/tild3164-3561-4537-b234-626438373033/KRIT_TORO_3.svg");
}

:root {
  --color-primary: #389BFF;
  --color-text: #1a2332;
  --touch-min: 44px;
  --toro-sticky-h: 56px;
  --toro-cookie-gap: 8px;
}

/* Куки: ниже попапов, но выше sticky CTA; на узком экране — во всю ширину (в Tilda wrapper inline width:600px) */
@media (max-width: 960px) {
  #rec2287734551,
  #rec2287734551 .t886 {
    z-index: 99999 !important;
  }
  #rec2287734551 .t886 {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
  }
  #rec2287734551 .t886__wrapper {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  #rec2287734551 .t886__text {
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: var(--color-text);
  }
  #rec2287734551 .t886__btn,
  #rec2287734551 button,
  #rec2287734551 a.t-btn {
    min-width: var(--touch-min) !important;
    min-height: var(--touch-min) !important;
    padding: 10px 16px !important;
  }
}

@media (max-width: 640px) {
  #rec2287734551 {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(
      var(--toro-sticky-h) + var(--toro-cookie-gap) + env(safe-area-inset-bottom, 0px)
    ) !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    pointer-events: none;
  }
  #rec2287734551 .t886 {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    pointer-events: auto;
  }
  #rec2287734551 .t886__wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px 14px !important;
  }
  #rec2287734551 .t886__btn {
    width: 100% !important;
    margin: 0 !important;
  }
  #rec2287734551 .t886__btn .t-btnflex {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Контент не уезжает под sticky + открытые куки */
  body.toro-has-sticky:has(#rec2287734551 .t886:not(.t886_closed)) {
    padding-bottom: calc(
      var(--toro-sticky-h) + 130px + env(safe-area-inset-bottom, 0px)
    ) !important;
  }

  /* Мессенджер выше sticky и баннера куки */
  #rec2287764331 .t898__btn {
    bottom: calc(24px + var(--toro-sticky-h) + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.toro-has-sticky:has(#rec2287734551 .t886:not(.t886_closed)) #rec2287764331 .t898__btn {
    bottom: calc(
      24px + var(--toro-sticky-h) + 120px + env(safe-area-inset-bottom, 0px)
    ) !important;
  }
}

/* Бургер и зона нажатия в шапке */
@media (max-width: 960px) {
  #rec2154515781 .t-menu-burger,
  #rec2154515781 .t-menuburger {
    min-width: var(--touch-min) !important;
    min-height: var(--touch-min) !important;
    padding: 14px !important;
    box-sizing: border-box !important;
  }
  #rec2154515781 .t-menu-burger__icon,
  #rec2154515781 .t-menu-burger__icon_small {
    width: 22px !important;
    height: 16px !important;
  }
  #rec2154515781 .t-menu-base__button .t-btn,
  #rec2154515781 .t-menu-base__button .t-btnflex {
    min-height: var(--touch-min) !important;
  }
}

/* Виджет мессенджеров — базовый отступ (с куками см. блок выше) */
@media (max-width: 640px) {
  #rec2287764331 .t898__btn {
    left: 16px !important;
  }
  #rec2287764331 .t898__btn_label {
    width: var(--touch-min) !important;
    height: var(--touch-min) !important;
  }
}

/* Sticky CTA (разметка добавляется скриптом из HEAD) */
.toro-mobile-sticky {
  display: none;
}
@media (max-width: 640px) {
  .toro-mobile-sticky {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(30, 30, 30, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
  }
  .toro-mobile-sticky a {
    flex: 1 1 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: var(--touch-min);
    padding: 10px 12px;
    border-radius: 4px;
    font-family: var(--t-text-font, Arial), sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
  }
  .toro-mobile-sticky__demo {
    color: #fff !important;
    background: var(--color-primary);
  }
  .toro-mobile-sticky__phone {
    color: var(--color-text) !important;
    background: #f2f2f2;
  }
  body.toro-has-sticky {
    padding-bottom: calc(var(--toro-sticky-h) + env(safe-area-inset-bottom, 0px));
  }
}

/* Попапы демо / чек-лист */
@media (max-width: 640px) {
  .t-popup_show .t-popup__container,
  #rec2256269521 .t-popup__container,
  #rec2429232041 .t-popup__container,
  #rec2476417581 .t-popup__container {
    padding-bottom: calc(24px + var(--toro-sticky-h)) !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
  }

  #rec2256269521 .t-popup__close,
  #rec2429232041 .t-popup__close,
  #rec2476417581 .t-popup__close {
    width: var(--touch-min) !important;
    height: var(--touch-min) !important;
    min-width: var(--touch-min) !important;
    min-height: var(--touch-min) !important;
  }

  #rec2256269521 .t-popup__close-icon,
  #rec2256269521 .t-popup__close-icon svg,
  #rec2429232041 .t-popup__close-icon,
  #rec2429232041 .t-popup__close-icon svg,
  #rec2476417581 .t-popup__close-icon,
  #rec2476417581 .t-popup__close-icon svg {
    width: 20px !important;
    height: 20px !important;
  }

  #rec2256269521 .t-checkbox__indicator,
  #rec2256269521 input[type="checkbox"],
  #rec2429232041 .t-checkbox__indicator,
  #rec2429232041 input[type="checkbox"],
  #rec2476417581 .t-checkbox__indicator,
  #rec2476417581 input[type="checkbox"] {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
  }

  #rec2256269521 .t702__title,
  #rec2429232041 .t702__title,
  #rec2476417581 .t702__title {
    font-size: 22px !important;
    line-height: 1.25 !important;
  }

  #rec2256269521 .t-input,
  #rec2429232041 .t-input,
  #rec2476417581 .t-input {
    min-height: 48px !important;
    font-size: 16px !important;
  }

  #rec2429232041 .t-btnflex_type_submit,
  #rec2476417581 .t-btnflex_type_submit,
  #rec2256269521 .t-btnflex_type_submit {
    min-height: var(--touch-min) !important;
    width: 100% !important;
  }

  /* Не показывать авто-попап чек-листа на узком экране (дублирует CTA) */
  #rec2483686071 {
    display: none !important;
  }
}

/* Мегаменю: HTML-панель #rec2401784141-mobile (T123) до 960px — брейкпоинт бургера Tilda */
@media (max-width: 960px) {
  #rec2401784141.is-active {
    display: none !important;
  }
  #rec2401784141-mobile.is-active .toro-mm-links a {
    min-height: var(--touch-min);
  }
}

@media (min-width: 961px) {
  #rec2401784141-mobile {
    display: none !important;
  }
}

/* Hero: бейджи и высота artboard на 320 */
@media (max-width: 479px) {
  #rec2405399841 .t396__artboard,
  #rec2405399841 .t396__filter,
  #rec2405399841 .t396__carrier {
    height: 560px !important;
    min-height: 560px !important;
  }
  #rec2405399841 [data-elem-id="1782135325707000019"] {
    top: 338px !important;
    left: 16px !important;
    width: calc(100% - 32px) !important;
    max-width: 280px !important;
  }
  #rec2405399841 [data-elem-id="1782134738690000004"] {
    top: 386px !important;
    left: 16px !important;
  }
  #rec2405399841 [data-elem-id="1782134895635000012"] {
    top: 434px !important;
    left: 16px !important;
  }
  #rec2405399841 [data-elem-id="1782134882335000010"] {
    top: 482px !important;
    left: 16px !important;
  }
}

/* Hero: 480px — CTA и бейджи в видимой зоне */
@media (min-width: 480px) and (max-width: 639px) {
  #rec2405399841 .t396__artboard,
  #rec2405399841 .t396__filter,
  #rec2405399841 .t396__carrier {
    height: 520px !important;
    min-height: 520px !important;
  }
  #rec2405399841 [data-elem-id="1778394394755000001"] {
    top: 190px !important;
    left: 16px !important;
    max-width: calc(100% - 32px) !important;
  }
  #rec2405399841 [data-elem-id="1782134738690000004"] { top: 248px !important; left: 16px !important; }
  #rec2405399841 [data-elem-id="1782134895635000012"] { top: 296px !important; left: 16px !important; }
  #rec2405399841 [data-elem-id="1782134882335000010"] { top: 344px !important; left: 16px !important; }
  #rec2405399841 [data-elem-id="1782135325707000019"] { top: 392px !important; left: 16px !important; }
}

/* «Два приложения» и схема ТОиР: планшетные брейкпоинты — показываем 320-макет с масштабом */
@media (min-width: 481px) and (max-width: 959px) {
  #rec2157953331,
  #rec2287322661 {
    overflow: hidden !important;
  }
  #rec2157953331 .t396__artboard,
  #rec2287322661 .t396__artboard {
    transform-origin: top left;
    width: 320px !important;
    max-width: 320px !important;
  }
}

@media (min-width: 481px) and (max-width: 639px) {
  #rec2157953331 .t396__artboard,
  #rec2287322661 .t396__artboard {
    transform: scale(calc((100vw - 32px) / 320));
  }
  #rec2157953331,
  #rec2287322661 {
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 8px !important;
  }
}

@media (min-width: 640px) and (max-width: 959px) {
  #rec2157953331 .t396__artboard,
  #rec2287322661 .t396__artboard {
    transform: scale(calc((100vw - 48px) / 320));
  }
}

/* Футер: кликабельный телефон */
#rec2243957431 .t420__text a.toro-tel-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}