/* ==========================================================================
   Mobile bottom tab bar
   ========================================================================== */
.sr-tabbar {
  display: none;
}

@media (max-width: 768px) {
  :root {
    --sr-tabbar-h: 52px;
    --sr-tabbar-float: 12px;
  }

  /* Search lives in the tab bar on mobile */
  .sr-search-toggle {
    display: none !important;
  }

  .sr-tabbar {
    display: flex;
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(var(--sr-tabbar-float) + env(safe-area-inset-bottom, 0px));
    z-index: 120;
    height: var(--sr-tabbar-h);
    padding: 0 8px;
    align-items: center;
    justify-content: space-around;
    background: rgba(18, 18, 18, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    box-sizing: border-box;
  }

  .sr-tabbar-item {
    position: relative;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 44px;
    height: 100%;
    margin: 0;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--sr-muted);
    font: inherit;
    font-size: 0.65rem;
    font-weight: 500;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .sr-tabbar-item:hover,
  .sr-tabbar-item:focus-visible {
    color: var(--sr-text);
    text-decoration: none;
    outline: none;
  }

  .sr-tabbar-item.is-active {
    color: var(--sr-accent);
  }

  .sr-tabbar-item.is-active .sr-tabbar-icon {
    filter: drop-shadow(0 0 8px rgba(230, 57, 0, 0.6));
  }

  .sr-tabbar-icon {
    position: relative;
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
  }

  .sr-tabbar-icon svg {
    display: block;
  }

  .sr-tabbar-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .sr-tabbar-dot {
    position: absolute;
    top: -1px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sr-accent);
    box-shadow: 0 0 0 2px var(--sr-dark);
  }

  .sr-tabbar-dot[hidden] {
    display: none !important;
  }

  /* Leave room for the floating tab bar and the home-indicator inset */
  body.sr-wrap {
    padding-bottom: calc(var(--sr-tabbar-h) + var(--sr-tabbar-float) + 8px + env(safe-area-inset-bottom, 0px));
  }

  .sr-footer {
    padding-bottom: calc(24px + var(--sr-tabbar-h) + var(--sr-tabbar-float) + 8px + env(safe-area-inset-bottom, 0px));
  }

  /* Sidebar drawer clears the tab bar */
  .sr-sidebar-left {
    bottom: calc(var(--sr-tabbar-h) + var(--sr-tabbar-float) + env(safe-area-inset-bottom, 0px));
  }
}
