.tabs {
	--outline-ofsset-tab-label: -0.2rem;
}

.tabs__title-list-wrapper {
	border-bottom: 0.1rem solid rgb(var(--color-foreground), 0.05);
}

.tabs__title-list {
  overflow: auto;
}

.tabs__title-list::-webkit-scrollbar {
	display: none;
}

.tab-item-label--has-line {
  cursor: pointer;
	font-size: 1.6rem;
}

.tabs__title-list li:first-child {
  margin-inline-start: 0.5rem;
}

.tabs__title-list li:last-child {
  margin-inline-end: 0.5rem;
}

.tabs__title-list .tabs__item-label {
  padding: 2rem 0;
}

.tab-item-label--has-line[aria-selected="true"] {
	border-bottom: 0.1rem solid rgb(var(--color-foreground));
}

.title__buttons__tab-list {
  gap: 1.2rem;
}

.tabs__title-list-wrapper--scroll {
  position: sticky;
  top: 0;
  background: rgb(var(--color-background));
  z-index: 1;
}

.tabs__item-label {
  padding: 1.2rem 1.4rem;
  letter-spacing: -0.42px;
  opacity: 0.3;
  transition: opacity 300ms ease;
  width: max-content;
}

.tabs__item-label[aria-selected="true"],
.tabs__item-label:hover {
	opacity: 1;
}

.tabs__tab-content--tabbed {
	opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none; /* tránh focus vào panel ẩn */
  height: 0;
  overflow: hidden;
}

.tabs__tab-content--tabbed.active {
	opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  height: auto;
  overflow: visible;
}

.tabs__title-list__content {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  column-gap: 2.5rem;
}

.tabs__tab-content__specification {
  width: 20rem;
}

.tabs__content-list--scroll {
  gap: 30px; 
}

/* Sticky tab navigation */

.tabs--use-offset {
  --offset: 0px;
}

.tabs__title-list-wrapper--sticky {
  position: sticky;
  top: var(--offset);
  transition: top 500ms ease;
  background: rgb(var(--color-background));
  z-index: 1;
}

.tabs__tab-content--scroll {
  scroll-margin-top: calc(var(--offset) + var(--offset-navigation, 0));
}

.lms-section-header-sticky.animate:not(.lms-section-header-hidden) ~ .content-for-layout .tabs--use-offset {
  --offset: calc(var(--header-height));
}

@media(min-width: 750px) {
	.tab-item-label--has-line {
		font-size: 1.8rem;
	}
}

@media(min-width: 990px) {
  .lms-section-header-sticky.animate:not(.lms-section-header-hidden) ~ .content-for-layout .tabs--use-offset {
    --offset: calc(var(--header-height) - var(--nav-height, 0rem) - 1rem);
  }

  .lms-section-header-sticky.animate:not(.lms-section-header-hidden).toggle-nav.open-nav ~ .content-for-layout .tabs--use-offset {
    --offset: calc(var(--header-height) - 1rem);
  } 
}

@media screen and (max-width: 1365px) {
  .title__buttons--has-tabs {
    width: 100%;
  }
  .title__buttons__tab-list {
    overflow-x: auto;
    width: 100%;
    white-space: nowrap;
  }
}