/**
 * srazuvvazu-bottom-nav.css — нижняя мобильная панель (Figma Frame 148)
 * /test/ и USE_SV_NEW_FOOTER (body.page-test-srazuvvazu, body.page-sv-new-footer)
 */

:is(body.page-test-srazuvvazu, body.page-sv-new-footer) {
  --sv-mobile-bottom-nav-h: 80px;
  --sv-mobile-bottom-nav-safe: env(safe-area-inset-bottom, 0px);
  --sv-mobile-bottom-nav-total-h: calc(var(--sv-mobile-bottom-nav-h) + var(--sv-mobile-bottom-nav-safe));
  --sv-mobile-bottom-nav-bg: #d6e5ff;
  --sv-mobile-bottom-nav-fg: #0b1839;
}

/* Старую панель из админки не показываем */
@media (max-width: 991px) {
  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) {
    overflow-x: hidden;
  }

  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .bottom-mobile-menu {
    display: none !important;
  }
}

.sv-mobile-bottom-nav {
  display: none;
}

@media (max-width: 991px) {
  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 120;
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    min-height: var(--sv-mobile-bottom-nav-h);
    height: var(--sv-mobile-bottom-nav-total-h);
    margin: 0;
    padding: 10px env(safe-area-inset-right, 0px) calc(10px + var(--sv-mobile-bottom-nav-safe)) env(safe-area-inset-left, 0px);
    background: var(--sv-mobile-bottom-nav-bg);
    border: 0;
    box-shadow: none;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent;
  }

  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav__item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 1px;
    text-decoration: none;
    color: var(--sv-mobile-bottom-nav-fg);
    -webkit-tap-highlight-color: transparent;
  }

  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav__item:hover,
  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav__item:focus-visible {
    color: var(--sv-mobile-bottom-nav-fg);
    text-decoration: none;
    opacity: 0.85;
  }

  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav__item--active .sv-mobile-bottom-nav__label {
    font-weight: 500;
  }

  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav__icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--sv-mobile-bottom-nav-fg);
  }

  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav__icon svg {
    display: block;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav__icon img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    object-position: center;
  }

  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav__icon--cart {
    position: relative;
  }

  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav__badge {
    position: absolute;
    top: -5px;
    right: -9px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-family: var(--sv-font-ui, "Inter", sans-serif);
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
    pointer-events: none;
  }

  :is(body.page-test-srazuvvazu, body.page-sv-new-footer) .sv-mobile-bottom-nav__label {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--sv-font-ui, "Inter", sans-serif);
    font-size: 12px;
    font-weight: 400;
    font-style: normal;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    color: inherit;
  }

  /* Бургер-меню /test/: не перекрывать панель */
  :is(body.page-test-srazuvvazu, body.page-sv-new-header).sv-test-mobile-menu-open .sv-mobile-bottom-nav {
    z-index: 130;
  }
}

@media (min-width: 992px) {
  .sv-mobile-bottom-nav {
    display: none !important;
  }
}
