/* Нижняя панель и мобильная шапка (docs/lk-redesign.md, решения 24–29, 41). Размеры и цвета — из копии /lk-dev/.
   Только телефон и планшет: до 991px, где тема показывает свою мобильную шапку #mobileheader. */
.ss-mbar,.ss-mchat{display:none}
@keyframes ss-chat-breath{0%,75%,100%{transform:scale(1.12);color:#737373}37%{transform:scale(1.37);color:#3669fd}}

@media (max-width:991px){
  /* ── шапка Aspro в одну строку: бургер · логотип · поиск · написать · позвонить ── */
  #mobileheader{transition:transform .22s ease}
  #mobileheader.ss-away{transform:translateY(-100%)}
  #mobileheader .mobileheader-v1{display:flex;align-items:center;height:60px;padding:0 16px 0 6px}
  #mobileheader .burger{float:none;flex:0 0 auto}
  #mobileheader .logo-block{float:none;flex:0 1 162px;min-width:120px;margin:0 8px;height:60px;display:flex;align-items:center}
  #mobileheader .logo-block .logo{max-width:none;width:100%;height:auto;display:flex;align-items:center} /* тема держит логотип в 112px */
  #mobileheader .logo-block .logo img{width:100%;max-width:none;height:auto;max-height:none}
  #mobileheader .right-icons{float:none;margin-left:auto;display:flex;align-items:center;height:60px}
  #mobileheader .right-icons > .pull-right{display:none}           /* значки Aspro: корзина и профиль — в нижней панели */
  #mobileheader .right-icons > .pull-right.ss-keep{display:block;position:absolute;width:0;height:0;overflow:hidden} /* поиск Aspro — нажимаем из своей кнопки */
  .ss-mhead-ic{display:flex;align-items:center;gap:6px}
  .ss-mhead-ic__btn{width:44px;height:44px;flex:0 0 auto;padding:0;border:0;border-radius:10px;background:#f5f5f5;color:#2e2e2e;
    display:flex;align-items:center;justify-content:center;cursor:pointer}
  .ss-mhead-ic__btn svg{width:22px;height:22px}

  /* ── нижняя панель: 6 пунктов, значки серые, текущий раздел — тёмный, цифры синие ── */
  body:has(#ssMbar){padding-bottom:calc(64px + env(safe-area-inset-bottom))}
  .ss-mbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:998;
    padding:4px 4px env(safe-area-inset-bottom);background:#fff;box-shadow:0 -1px 0 #e3e3e3}
  .ss-mbar__item{position:relative;flex:1 1 0;min-width:0;height:56px;padding:0;border:0;background:none;font:inherit;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#737373;text-decoration:none;cursor:pointer}
  .ss-mbar__item:hover,.ss-mbar__item:focus{color:#737373;text-decoration:none}
  .ss-mbar__item svg{width:26px;height:26px}
  .ss-mbar__item span{font-size:11px;line-height:14px;white-space:nowrap}
  .ss-mbar__item--on,.ss-mbar__item--on:hover{color:#141414}
  .ss-mbar__item--chat svg{transform-origin:50% 50%;transform:scale(1.12)}
  .ss-mbar__item--chat.is-pulsing svg{animation:ss-chat-breath 1.6s ease-in-out 4} /* серия из 4 вдохов, повтор раз в 2 минуты — скрипт */
  .ss-badge{position:absolute;top:3px;left:calc(50% + 5px);min-width:16px;height:16px;padding:0 4px;border-radius:8px;
    background:#3669fd;color:#fff;font-size:10px;line-height:16px;font-style:normal;text-align:center}
  .ss-badge--ok{padding:0;width:16px}
  .ss-badge--ok svg{width:16px;height:16px}

  /* две версии панели — A/B (решения 29, 69): «Чат» или «Бонусы» (класс ss-bar-bonus на <html>, ставит ss-goals.js), в «Бонусах» синяя кнопка Битрикс24 как на проде */
  .ss-mbar .ss-mbar__item--bonus{display:none}
  .ss-bar-bonus .ss-mbar .ss-mbar__item--bonus{display:flex}
  .ss-bar-bonus .ss-mbar .ss-mbar__item--chat{display:none}

  /* чат Битрикс24: в версии «Чат» своя кнопка не нужна — список открывает «Чат» в панели; открытый список — над панелью */
  html:not(.ss-bar-bonus) .b24-widget-button-wrapper:not(.b24-widget-button-bottom){display:none!important}
  html:not(.ss-bar-bonus) .b24-widget-button-wrapper.b24-widget-button-bottom{bottom:calc(66px + env(safe-area-inset-bottom))!important;right:calc(25% - 33px)!important}
  .ss-bar-bonus .b24-widget-button-wrapper{bottom:calc(72px + env(safe-area-inset-bottom))!important}
  /* в карточке товара — над плашкой «цена · В корзину» (55px над панелью), иначе кнопка закрывает «В корзину» */
  .ss-bar-bonus:has(#main .catalog_detail .counter_wrapp.fixed) .b24-widget-button-wrapper{bottom:calc(127px + env(safe-area-inset-bottom))!important}

  /* запасной список мессенджеров, если виджет Битрикс24 не загрузился */
  .ss-mchat:not([hidden]){display:flex;position:fixed;z-index:999;right:calc(25% - 24px);bottom:calc(72px + env(safe-area-inset-bottom));flex-direction:column;gap:10px}
  .ss-mchat img{width:48px;height:48px;border-radius:50%;box-shadow:0 6px 16px rgba(20,20,20,.16)}

  /* плашка покупки в карточке товара («цена · В корзину · ♡») — над панелью вплотную, без просвета (панель 4 + 56 = 60px; Роман, 13.10) */
  #main .catalog_detail .counter_wrapp.fixed{bottom:calc(60px + env(safe-area-inset-bottom))!important}
}

@media (max-width:991px) and (prefers-reduced-motion:reduce){.ss-mbar__item--chat svg{animation:none!important}}
@media (max-width:359px){
  #mobileheader .logo-block{min-width:100px;margin-left:6px}
  .ss-mhead-ic{gap:4px}
}
/* боковое меню: синяя точка темы у текущего пункта — убрана (Роман, 14.10, решение 67) */
#mobilemenu li.selected > a::before{display:none}
