
.tk-mobile-bar {
  display: none;
}

@media (max-width: 767px) {
  /* The bar publishes its height, so whatever else is pinned to the bottom of
     the screen (a sticky buy button, a chat launcher) sits above it and the
     page keeps its end clear of it (see shared-block-styles). */
  :root:has(.tk-mobile-bar:not(.tk-hide-mobile)) {
    --tk-mobile-bar-offset: calc(62px + env(safe-area-inset-bottom));
  }

  :root:has(.tk-mobile-bar--mini:not(.tk-hide-mobile)) {
    --tk-mobile-bar-offset: calc(54px + env(safe-area-inset-bottom));
  }

  :root:has(.tk-mobile-bar--pill:not(.tk-hide-mobile)) {
    --tk-mobile-bar-offset: calc(74px + env(safe-area-inset-bottom));
  }

  .tk-mobile-bar {
    --mobile-bar-bg-default: var(--tk-color-surface);
    --mobile-bar-text-default: var(--tk-color-muted-foreground);
    --mobile-bar-accent-default: var(--tk-color-primary);
    --mobile-bar-radius-default: 0;
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: var(--tk-layer-fixed);
    display: block;
    padding-block-end: env(safe-area-inset-bottom);
    background: transparent;
    color: var(--mobile-bar-text, var(--mobile-bar-text-default));
    font-family: var(--tk-font-body);
  }

  .tk-mobile-bar__nav {
    display: flex;
    min-height: 62px;
    align-items: stretch;
    justify-content: space-around;
    border-block-start: 1px solid var(--tk-color-border);
    border-radius: var(--mobile-bar-radius, var(--mobile-bar-radius-default));
    background: var(--mobile-bar-bg, var(--mobile-bar-bg-default));
  }

  .tk-mobile-bar--shadow .tk-mobile-bar__nav {
    box-shadow: 0 -8px 28px rgb(17 24 39 / 14%);
  }

  .tk-mobile-bar__item {
    display: flex;
    min-width: 0;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: inherit;
    font-size: var(--mobile-bar-label-size, 11px);
    font-weight: 750;
    line-height: 1.1;
    text-decoration: none;
  }

  .tk-mobile-bar__icon {
    display: grid;
    width: var(--mobile-bar-icon-size, 20px);
    height: var(--mobile-bar-icon-size, 20px);
    place-items: center;
  }

  .tk-mobile-bar__icon svg {
    width: var(--mobile-bar-icon-size, 20px);
    height: var(--mobile-bar-icon-size, 20px);
  }

  .tk-mobile-bar__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tk-mobile-bar__dot {
    width: 4px;
    height: 4px;
    border-radius: var(--tk-round-radius, 999px);
    background: transparent;
  }

  .tk-mobile-bar__item.is-active {
    color: var(
      --mobile-bar-active,
      var(--mobile-bar-accent, var(--mobile-bar-accent-default))
    );
  }

  .tk-mobile-bar__item.is-active .tk-mobile-bar__dot {
    background: currentColor;
  }

  .tk-mobile-bar--pill {
    padding-inline: 14px;
    padding-block-end: calc(12px + env(safe-area-inset-bottom));
  }

  .tk-mobile-bar--pill .tk-mobile-bar__nav {
    --mobile-bar-radius-default: var(--tk-round-radius, 999px);
    border: 1px solid var(--tk-color-border);
  }

  .tk-mobile-bar--fab .tk-mobile-bar__item.is-floating {
    color: var(
      --mobile-bar-fab,
      var(--mobile-bar-accent, var(--mobile-bar-accent-default))
    );
  }

  .tk-mobile-bar--fab .tk-mobile-bar__item.is-floating .tk-mobile-bar__icon,
  .tk-mobile-bar--notch .tk-mobile-bar__item.is-floating .tk-mobile-bar__icon {
    width: 52px;
    height: 52px;
    margin-block-start: -28px;
    border-radius: var(--tk-round-radius, 999px);
  }

  .tk-mobile-bar--fab .tk-mobile-bar__item.is-floating .tk-mobile-bar__icon {
    background: var(
      --mobile-bar-fab,
      var(--mobile-bar-accent, var(--mobile-bar-accent-default))
    );
    box-shadow: 0 10px 22px color-mix(
        in srgb,
        var(
            --mobile-bar-fab,
            var(--mobile-bar-accent, var(--mobile-bar-accent-default))
          )
          42%,
        transparent
      );
    color: var(--tk-color-primary-foreground);
    outline: 4px solid var(--mobile-bar-bg, var(--mobile-bar-bg-default));
  }

  .tk-mobile-bar--dark {
    --mobile-bar-bg-default: #111225;
    --mobile-bar-text-default: rgb(255 255 255 / 66%);
    --mobile-bar-accent-default: #ffffff;
  }

  .tk-mobile-bar--dark .tk-mobile-bar__nav {
    border-block-start-color: rgb(255 255 255 / 10%);
  }

  .tk-mobile-bar--mini .tk-mobile-bar__nav {
    min-height: 54px;
  }

  .tk-mobile-bar--mini .tk-mobile-bar__label {
    display: none;
  }

  .tk-mobile-bar--notch .tk-mobile-bar__nav {
    --mobile-bar-radius-default: var(--tk-control-radius, 22px) var(--tk-control-radius, 22px) 0 0;
  }

  .tk-mobile-bar--notch .tk-mobile-bar__item.is-floating .tk-mobile-bar__icon {
    border: 1px solid var(--tk-color-border);
    background: var(--mobile-bar-bg, var(--mobile-bar-bg-default));
    box-shadow: 0 -6px 18px rgb(17 24 39 / 12%);
    color: var(
      --mobile-bar-fab,
      var(--mobile-bar-accent, var(--mobile-bar-accent-default))
    );
  }
}
