/*
 * Tab row of a service page (Hibot Services, hibot_services_tabs_html()).
 *
 * Sizes follow the theme: 1rem = 10px at 1440px wide on desktop and at
 * 390px wide on mobile.
 */

/*
 * The theme sets main { overflow: hidden }. That makes <main> a scroll
 * container, and position: sticky never sticks inside one. clip cuts the
 * overflow the same way without creating a scroll container.
 */
main:has(> .hb-tabs) {
  overflow: clip;
}

.hb-tabs {
  position: sticky;
  top: calc(var(--hibot-top-offset) + 7rem); /* right below the fixed header */
  z-index: 98; /* under the header (99) and its menus */
  background-color: #37414F;
  border-bottom: .1rem solid rgba(255, 255, 255, .12);
  transition: box-shadow .3s;
}

.hb-tabs.is-stuck {
  box-shadow: 0 .4rem 1.2rem rgba(0, 0, 0, .3);
}

.hb-tabs__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  height: 6.4rem;
  padding: 0 5rem 0 3rem;
}

.hb-tabs__list {
  display: flex;
  height: 100%;
}

.hb-tabs__list li {
  height: 100%;
}

.hb-tabs__link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: .3rem 2rem 0;
  border-bottom: .3rem solid transparent;
  color: rgba(255, 255, 255, .7);
  font-size: 1.5rem;
  white-space: nowrap;
  transition: color .3s, border-color .3s;
}

.hb-tabs__link:hover {
  color: #fff;
}

.hb-tabs__link[aria-current] {
  color: #fff;
  border-bottom-color: #FF521C;
}

.hb-tabs .hb-badge {
  margin-left: .8rem;
}

.hb-tabs__button {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: .8rem;
  height: 4rem;
  padding: 0 2rem;
  background-color: #FF521C;
  box-shadow: 0 .4rem .4rem rgba(0, 0, 0, .25);
  color: #fff;
  font-size: 1.4rem;
  transition: opacity .4s;
}

.hb-tabs__button:hover {
  opacity: .7;
}

/* The theme sets a font size on every span: repeat it. */
.hb-tabs__button span {
  font-size: 1.4rem;
}

.hb-tabs__button img {
  width: 1.6rem;
}

.hb-tabs__button-short {
  display: none;
}

@media (max-width: 767px) {
  .hb-tabs {
    top: calc(var(--hibot-top-offset) + 6rem);
  }

  .hb-tabs__inner {
    gap: 0;
    height: 5rem;
    padding: 0;
  }

  /* The tabs scroll sideways; the button stays visible on the right. */
  .hb-tabs__list {
    flex: 1;
    min-width: 0;
    padding-left: .8rem;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .hb-tabs__list::-webkit-scrollbar {
    display: none;
  }

  .hb-tabs__link {
    padding: .3rem 1.2rem 0;
    font-size: 1.4rem;
  }

  .hb-tabs__button {
    height: 100%;
    padding: 0 1.6rem;
    box-shadow: none;
  }

  .hb-tabs__button span {
    font-size: 1.3rem;
  }

  .hb-tabs__button-long {
    display: none;
  }

  .hb-tabs__button-short {
    display: inline;
  }
}

/* The orange "NEW" label (also styled by the theme for its header menu). */
.hb-badge {
  display: inline-block;
  padding: .3rem .6rem .2rem;
  background-color: #FF521C;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .08em;
}
