/* Bottom navigation shared by Taily and Storybook. */
.tabbar-reference body > .bottom {
  --dock-size: 62px;
  --dock-gap: 9px;
  --dock-inset: 4px;
  --tab-icon-size: 22px;
  --active-tab-padding: 12px;
  --active-tab-height: calc(var(--tab-icon-size) + 2 * var(--active-tab-padding));
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  gap: 0 !important;
  isolation: isolate;
  max-width: 388px !important;
  height: var(--dock-size) !important;
  min-height: var(--dock-size) !important;
  padding: 0 calc(var(--dock-size) + var(--dock-gap)) 0 0 !important;
  pointer-events: none;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.tabbar-reference body > .bottom > .taily-reference-tabs {
  --reference-tab-motion-ms: 130;
  --reference-tab-easing: cubic-bezier(.25, .65, .3, 1);
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--dock-inset) calc((var(--dock-size) - var(--active-tab-height)) / 2);
  border-radius: 999px;
  position: relative;
  isolation: isolate;
  background-color: #e5def7cc;
  pointer-events: auto;
  transition: transform 280ms cubic-bezier(.16, 1, .3, 1), opacity 220ms ease;
}

.taily-reference-tabs:has(> [aria-current="page"])::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 0;
  width: 100%;
  height: var(--active-tab-height);
  transform: translate(var(--reference-tab-x, 0px), -50%);
  clip-path: inset(0 calc(100% - var(--reference-tab-width, 0px)) 0 0 round 999px);
  background: #fff;
  pointer-events: none;
  z-index: -1;
  transition:
    transform var(--tab-indicator-duration) var(--tab-indicator-slide),
    clip-path var(--tab-indicator-duration) var(--reference-tab-easing);
}

.tabbar-reference-scrolled body > .bottom > .taily-reference-tabs:not(:focus-within) {
  transform: translateY(calc(100% + 12px + env(safe-area-inset-bottom, 0px)));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 250ms ease-in, opacity 240ms ease-in, visibility 0s 250ms;
}

.tabbar-reference body > .bottom > .taily-reference-tabs > button.v76-nav-item {
  display: flex !important;
  flex: 1 1 0 !important;
  flex-direction: row !important;
  justify-content: center;
  align-items: center;
  gap: 6px !important;
  width: auto !important;
  min-width: 44px !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 44px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #49494f !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: color 180ms ease !important;
}

.tabbar-reference body > .bottom > .taily-reference-tabs > button.v76-nav-item[aria-current="page"] {
  flex: 0 0 auto !important;
  align-self: center;
  height: var(--active-tab-height) !important;
  padding: var(--active-tab-padding) !important;
  padding-right: calc(var(--active-tab-padding) + 2px) !important;
  color: #202025 !important;
}

.tabbar-reference body > .bottom > .taily-reference-tabs > button[aria-current="page"]::after {
  content: attr(aria-label);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.tabbar-reference-switched .taily-reference-tabs > button[aria-current="page"]::after {
  animation: taily-reference-label-in 125ms var(--reference-tab-easing) calc(var(--reference-tab-motion-ms) * 1ms) both;
}

@keyframes taily-reference-label-in {
  from {
    opacity: 0;
    filter: blur(1px);
  }
}

.tabbar-reference body > .bottom > .taily-reference-tabs > button.v76-nav-item > .icon {
  flex: none;
  width: var(--tab-icon-size) !important;
  height: var(--tab-icon-size) !important;
  color: inherit !important;
  stroke: currentColor !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  border-radius: 0;
  overflow: visible;
  box-shadow: none !important;
}

.tabbar-reference body > .bottom > button.v76-nav-create {
  position: absolute !important;
  inset: 50% 0 auto auto;
  translate: 0 -50%;
  width: var(--dock-size) !important;
  min-width: var(--dock-size) !important;
  max-width: var(--dock-size) !important;
  height: var(--dock-size) !important;
  min-height: var(--dock-size) !important;
  max-height: var(--dock-size) !important;
  border: 1.5px solid var(--primary-action-bg) !important;
  background: var(--primary-action-bg) !important;
  box-shadow: inset 0 1px 3px #ffffff70, 0 5px 16px #6334cf38 !important;
  pointer-events: auto;
}

.tabbar-reference body > .bottom > button.v76-nav-create > .icon {
  width: 30px !important;
  height: 30px !important;
  overflow: visible;
}

.tabbar-reference body > .bottom button.v76-nav-item:focus-visible {
  outline: 2px solid #6334cf !important;
  outline-offset: 2px !important;
}

@media (max-width: 374px) {
  .tabbar-reference body > .bottom {
    --dock-size: 54px;
    --dock-gap: 7px;
    --tab-icon-size: 18px;
    --active-tab-padding: 11px;
    width: calc(100% - 8px) !important;
  }

  .tabbar-reference body > .bottom > .taily-reference-tabs > button.v76-nav-item[aria-current="page"] {
    gap: 4px !important;
  }

  .tabbar-reference body > .bottom > .taily-reference-tabs > button[aria-current="page"]::after {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .taily-reference-tabs:has(> [aria-current="page"])::before {
    transition: none;
  }

  .tabbar-reference body > .bottom > .taily-reference-tabs > button[aria-current="page"]::after {
    animation: none;
  }

  .tabbar-reference body > .bottom > .taily-reference-tabs > button {
    transition: none !important;
  }

  .tabbar-reference body > .bottom > .taily-reference-tabs,
  .tabbar-reference-scrolled body > .bottom > .taily-reference-tabs:not(:focus-within) {
    transform: none;
    transition: opacity 120ms ease;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .tabbar-reference body > .bottom > .taily-reference-tabs {
    background-color: #e5def7;
    background-image: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
