/* ============================================================
   Нижняя мобильная панель NomadCar — Каталог | WhatsApp | Позвонить (v2)
   Файл: /css/mobile-bar.css. Подключается из чанка mobile (id 9):
   <link rel="stylesheet" href="https://nomadcar.kg/css/mobile-bar.css?v=4">
   Разметка не меняется (.mobile__widget > .widgets__block > .box > a > .icon + текст).
   Стиль: как в мобильных приложениях — белая панель, иконки в цветных кружках,
   WhatsApp — большая круглая кнопка над панелью, кромка огибает её дугой. v4, 28.08.2026
   ============================================================ */

@media screen and (max-width: 992px) {

  /* контент не прячется под панелью */
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

  /* кнопка «наверх» на мобильных скрыта: в любом положении она наезжает на кнопки карточек */
  #button-up { display: none !important; }

  /* панель: сама прозрачная, фон рисует ::before с «выемкой» под кружок WhatsApp,
     чтобы верхняя кромка огибала кнопку (кружок и тень — снаружи выемки) */
  .mobile__widget {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 97;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .mobile__widget::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,247,249,0.98));
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.12);   /* панель сплошная: под кружком ничего не просвечивает */
  }
  /* линия кромки: прямая с разрывом под выемку… */
  .mobile__widget::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0; height: 1px;
    background: rgba(0, 0, 0, 0.10);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(50% - 41px), transparent calc(50% - 40px), transparent calc(50% + 40px), #000 calc(50% + 41px));
    mask-image: linear-gradient(90deg, #000 calc(50% - 41px), transparent calc(50% - 40px), transparent calc(50% + 40px), #000 calc(50% + 41px));
    pointer-events: none;
  }
  /* …и дуга, огибающая кружок (нижняя часть окружности r=42 с центром в 11px от кромки) */
  .mobile__widget .widgets__block { position: relative; }
  .mobile__widget .widgets__block::before {
    content: "";
    position: absolute;
    width: 84px; height: 84px;
    left: calc(50% - 42px);
    top: -37px;                                   /* центр на 5px ниже верха ul = 11px ниже кромки панели */
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.10);
    box-sizing: border-box;
    clip-path: inset(31px 0 0 0);                 /* оставить только часть ниже кромки панели */
    pointer-events: none;
    z-index: 0;
  }
  .mobile__widget .widgets__block .box { position: relative; z-index: 1; }

  .mobile__widget .widgets__block {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 0;
    margin: 0; padding: 0;
    list-style: none;
    max-width: 100%;
    border-top: 0;
  }

  .mobile__widget .widgets__block .box {
    flex: 1 1 0;
    width: auto; max-width: none;
    border: 0;
    background: transparent !important;   /* у сайта li WhatsApp закрашен зелёным — снимаем */
  }
  .mobile__widget .widgets__block .box:not(:last-child) { border-right: 0; }

  /* обычный пункт: иконка в кружке + подпись */
  .mobile__widget .widgets__block .box > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-height: 58px;
    padding: 4px 2px 2px;
    background: transparent;
    color: var(--body-color, #2c2c2c);
    font-family: var(--body-font, Montserrat), sans-serif;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile__widget .widgets__block .box span:not(.icon) {
    font-size: 11.5px; line-height: 1; padding: 0; color: inherit;
  }

  .mobile__widget .widgets__block .box .icon {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 40px !important; height: 40px !important;   /* у сайта .icon = 30px, перебиваем */
    min-width: 40px;
    border-radius: 50%;
    background: #fff1f1;                 /* лёгкий красный фон под фирменную иконку */
    color: var(--color-1, #fd161e);
    transition: transform .15s ease, background-color .15s ease;
  }
  .mobile__widget .widgets__block .box .icon svg { width: 20px; height: 20px; fill: currentColor; }
  .mobile__widget .widgets__block .box > a:active .icon { transform: scale(.92); background: #ffe3e3; }

  /* WhatsApp — «плавающая» круглая кнопка, приподнята над панелью */
  .mobile__widget .widgets__block .box:nth-child(2) > a {
    color: #1b9e52;
    margin-top: -26px;                   /* кружок выходит за верх панели */
  }
  .mobile__widget .widgets__block .box:nth-child(2) > a .icon {
    width: 62px !important; height: 62px !important;
    min-width: 62px;
    background: linear-gradient(180deg, #34e07f 0%, #1fb85f 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(31, 184, 95, 0.40), 0 0 0 4px #fff;
  }
  .mobile__widget .widgets__block .box:nth-child(2) > a .icon svg { width: 30px; height: 30px; }
  .mobile__widget .widgets__block .box:nth-child(2) > a:active .icon { background: #1aa354; transform: scale(.94); }
}

@media (prefers-reduced-motion: reduce) {
  .mobile__widget .widgets__block .box .icon,
  .mobile__widget .widgets__block .box > a:active .icon { transition: none; transform: none; }
}