:root {
  --ifx-font-family: "Source Sans 3", "Arial, sans-serif";
}

:host {
  display: flex;
}

.tabs {
  display: flex;
  font-family: var(--ifx-font-family);
  width: 100%;
}

.tabs.horizontal {
  flex-direction: column;
}

.tabs-container {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  gap: 8px;
}

.scroll-button {
  flex-shrink: 0;
  z-index: 10;
  transition: all 0.3s ease-in-out;
}
.scroll-button.hidden {
  pointer-events: none;
}
.scroll-button.scroll-left.hidden {
  width: 0;
  min-width: 0;
  max-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
}
.scroll-button.scroll-right.hidden {
  visibility: hidden;
  pointer-events: none;
}

.tabs.vertical {
  flex-direction: row;
}

.tabs-list {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  font-weight: 600;
}
.tabs-list.scrollable {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs-list.scrollable::-webkit-scrollbar {
  display: none;
}

.tabs-list:focus-within .active-border {
  display: none;
}

.active-border {
  content: "";
  position: absolute;
  transition: left 0.3s ease-in-out, top 0.3s ease-in-out, height 0.3s ease-in-out;
}

.tabs.horizontal .active-border {
  bottom: 0;
  left: 0;
  height: 2px;
  background-color: #0A8276;
}

.tabs.vertical .tabs-list {
  flex-direction: column;
  border-bottom: none;
}

.tabs.vertical .tab-content {
  padding-top: 0px;
  padding-left: 32px;
}

.tabs:not(.vertical) .tab-item.full-width {
  flex: 1;
}
.tabs:not(.vertical).full-width-enabled .scroll-button {
  display: none;
}
.tabs:not(.vertical).full-width-enabled .tabs-list {
  flex: 1;
}
.tabs:not(.vertical).full-width-enabled .tabs-list.scrollable {
  overflow-x: visible;
}

.tab-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 768px) {
  .tab-item {
    font-size: 0.875rem;
    padding: 8px 8px;
  }
}
.tab-item.icon__right {
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.tab-item:hover {
  color: #0A8276;
}
.tab-item:active, .tab-item.active {
  color: #0A8276;
}
.tab-item:focus, .tab-item.focus {
  outline: 2px solid #0A8276;
  outline-offset: -2px;
  border-radius: 2px;
}
.tab-item:focus + .active-border, .tab-item.focus + .active-border {
  display: none;
}
.tab-item.disabled {
  color: #BFBBBB;
  pointer-events: none;
}

.tabs.vertical .tab-item {
  border-right: 2px solid transparent;
  min-width: 7em;
}

.tabs.vertical .active-border {
  left: 0;
  top: 0;
  width: 2px;
  background-color: #0A8276;
}

.tab-content {
  padding-top: 24px;
  padding-left: 0px;
  flex-grow: 1;
}

.tabs.small .tab-item {
  font-size: 0.875rem;
}