.model-nav-bar {
  position: fixed;
  bottom: 16px;
  left: 48px;
  width: calc(100% - 96px);
  box-sizing: border-box;
  padding: 12px 40px;
  border-radius: 666px;
  background-color: #fff;
  color: #252728;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: rgba(0, 0, 0, 0.14) 0 4px 11px 0;
  overflow: hidden;
  z-index: 999998;
  transform: translateY(98px);
  transition: transform 0.3s ease-in-out;
}

.model-nav-bar.show {
  transform: translateY(0);
}

.model-nav-bar__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #eaebec;
  overflow: hidden;
}

.model-nav-bar__progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(to left, #d70c19 0%, rgba(215, 12, 25, 0) 100%);
  transition: width 0.1s ease-out;
}

.model-nav-bar__anchors {
  display: flex;
  align-items: center;
  column-gap: 40px;
  min-width: 0;
}

.model-nav-bar__model-name {
  display: block;
  width: fit-content;
  height: fit-content;
  font-size: 20px;
  font-weight: 700;
  line-height: 26px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.model-nav-bar__list {
  display: flex;
  align-items: flex-start;
  column-gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.model-nav-bar__anchor {
  display: block;
  width: fit-content;
  height: fit-content;
  padding: 4px 16px;
  border-radius: 666px;
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  color: inherit;
  text-decoration: none;
}

.model-nav-bar__anchor:hover {
  text-decoration: underline;
}

.model-nav-bar__anchor.is-active {
  background-color: #eaebec;
}

.model-nav-bar__buttons {
  display: flex;
  align-items: center;
  column-gap: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  flex-shrink: 0;
}

.model-nav-bar__button {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  row-gap: 4px;
  padding: 6px;
  text-align: center;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.model-nav-bar__button:hover {
  background-color: #eaebec;
  border-radius: 4px;
}

.model-nav-bar__button-text {
  font-size: 9px;
  line-height: 18px;
}

.model-nav-bar__button-icon {
  display: block;
  width: 24px;
  height: 24px;
}

@media (max-width: 767px) {
  /* Mobile replaces the single bottom pill with two independent floating
     pills (top anchor pill + bottom icon pill), matching the original's
     mob-container template. The <nav> itself stops being a positioned pill. */
  .model-nav-bar,
  .model-nav-bar.show {
    position: static;
    background: none;
    box-shadow: none;
    padding: 0;
    left: auto;
    width: auto;
    transform: none;
    transition: none;
    overflow: visible;
  }

  .model-nav-bar__progress {
    display: none;
  }

  .model-nav-bar__anchors {
    position: fixed;
    top: 17px;
    left: 16px;
    max-width: 0;
    box-sizing: border-box;
    border-radius: 666px;
    background-color: transparent;
    color: transparent;
    overflow: hidden;
    z-index: 999998;
    transition: max-width 0.3s ease-in-out, background-color 0.3s ease-in-out, color 0.3s ease-in-out;
    column-gap: 0;
  }

  .model-nav-bar.show .model-nav-bar__anchors {
    max-width: calc(100% - 80px);
    background-color: rgba(201, 201, 201, 0.5);
    -webkit-backdrop-filter: blur(6px) brightness(1.15) contrast(0.92) saturate(1.15);
    backdrop-filter: blur(6px) brightness(1.15) contrast(0.92) saturate(1.15);
    color: #000;
  }

  .model-nav-bar__model-name {
    display: none;
  }

  .model-nav-bar__list {
    column-gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 1px;
  }

  .model-nav-bar__list::-webkit-scrollbar {
    display: none;
  }

  .model-nav-bar__anchor {
    flex-shrink: 0;
    padding: 12px;
    font-size: 13px;
    line-height: 24px;
    white-space: nowrap;
    border-radius: 666px;
  }

  .model-nav-bar__anchor.is-active {
    background-color: #fff;
  }

  .model-nav-bar__buttons {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 0;
    box-sizing: border-box;
    border-radius: 666px;
    background-color: transparent;
    color: transparent;
    overflow: hidden;
    z-index: 999998;
    transition: max-width 0.3s ease-in-out, background-color 0.3s ease-in-out, color 0.3s ease-in-out;
    column-gap: 0;
  }

  .model-nav-bar.show .model-nav-bar__buttons {
    max-width: calc(100% - 32px);
    background-color: rgba(201, 201, 201, 0.5);
    -webkit-backdrop-filter: blur(6px) brightness(1.15) contrast(0.92) saturate(1.15);
    backdrop-filter: blur(6px) brightness(1.15) contrast(0.92) saturate(1.15);
    color: #000;
  }

  .model-nav-bar__button {
    flex-shrink: 0;
    padding: 8px 12px;
    row-gap: 0;
  }

  .model-nav-bar__button-icon {
    width: 20px;
    height: 20px;
  }

  .model-nav-bar__button-text {
    font-size: 8px;
    font-weight: 600;
    line-height: 16px;
  }
}
