.onedd-tabs {
  margin-top: 2rem;
  margin-bottom: 2rem;
  position: relative;
}

.onedd-tabs__content {
  border: 2px solid var(--color-primary, #303181);
  border-radius: 0 10px 10px 10px;
  padding: 2rem;
  @media screen and (max-width: 600px) {
    padding: 1rem;
  }
}

.onedd-tabs__nav {
  display: flex;
  flex-direction: row;
  list-style: none;
  position: relative;
  gap: 8px;
}

.onedd-tabs__nav {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: calc(100% - 14px);
  -webkit-overflow-scrolling: touch;
  position: relative;
  bottom: -2px;

  &:before {
    content: "";
    position: absolute;
    width: fit-content;
    height: 2px;
    bottom: 0;
    left: 0;
    z-index: 0;
    background-color: var(--color-primary, #303181);
  }
}
.shadow-tab {
  position: absolute;
  top: 0;
  height: 44px;
  width: 80px;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 30;
}

.shadow--left {
  left: -34px;
  background: linear-gradient(90deg, #fff 52%, rgba(255, 255, 255, 0) 100%);
}

.shadow--right {
  right: -34px;
  background: linear-gradient(-90deg, #fff 60%, rgba(255, 255, 255, 0) 100%);
}

/* สร้าง styles สำหรับปุ่ม arrow */
.shadow-arrow {
  position: absolute;
  width: 24px;
  height: 24px;
  top: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-secondary, #b4bd34);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 12px;
}

.shadow-arrow--left {
  left: 40px;
}

.shadow-arrow--left::before {
  content: "\f053";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.shadow-arrow--right {
  right: 40px;
}

.shadow-arrow--right::before {
  content: "\f054";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
}

.shadow--visible {
  opacity: 1;
}

@media (max-width: 768px) {
  .onedd-tabs__nav {
    width: calc(100vw - 60px);
  }

  .shadow--left {
    left: -34px;
    background: linear-gradient(90deg, #fff 52%, rgba(255, 255, 255, 0) 100%);
  }

  .shadow--right {
    right: -34px;
    background: linear-gradient(-90deg, #fff 60%, rgba(255, 255, 255, 0) 100%);
  }
}

.onedd-tabs__nav-item {
  position: relative;
  .btn-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 100;
    background: #fff;
    border: 1px solid;
    border-radius: 999px;

    @media (min-width: 1200px) {
      opacity: 0;
    }
  }

  &:hover {
    .btn-remove {
      opacity: 1;
    }
  }
}

.btn-add {
  position: absolute;
  top: 6px;
  right: 0;
  z-index: 10;
}

.onedd-tabs__nav-link {
  display: block;
  padding: 0.5rem 1.5rem;
  border: 2px solid var(--color-primary, #303181);
  text-decoration: none;
  color: #fff;
  border-radius: 10px 10px 0 0;
  background-color: var(--color-primary, #303181);
  font-weight: 700;
  white-space: nowrap !important;
}

.onedd-tabs__nav-item.active .onedd-tabs__nav-link {
  color: #495057;
  background-color: #fff;
  border: 2px solid var(--color-primary, #303181);
  border-radius: 10px 10px 0 0;
  position: relative;
  cursor: pointer;

  &:after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    background: #ffff;
    height: 5px;
    width: 100%;
    z-index: 10;
  }
}

.onedd-tabs__pane {
  display: none;
}

.onedd-tabs__pane.active {
  display: block;
}

.onedd-tabs__pane {
  display: none;
}

.onedd-tabs__pane[aria-hidden="false"] {
  display: block;
}
