.custom-tabs-v1 {
  display: block;
  width: 100%;
  background: rgb(var(--color-background));
}
.custom-tabs-v1,
.custom-tabs-v1 *,
.custom-tabs-v1 *::before,
.custom-tabs-v1 *::after {
  box-sizing: border-box;
}
.custom-tabs-v1__layout { width: 100%; min-width: 0; }
.custom-tabs-v1__list {
  display: flex;
  align-items: stretch;
  gap: var(--desktop-gap);
  width: 100%;
  min-width: 0;
  padding: var(--desktop-container-padding);
  scroll-padding-inline: var(--desktop-container-padding);
  border-radius: var(--container-radius);
  background: rgb(var(--container-bg));
  overflow-x: hidden;
  overflow-y: visible;
  scrollbar-width: none;
}
.custom-tabs-v1__list::-webkit-scrollbar { display: none; }
.custom-tabs-v1__item {
  flex: 0 0 var(--desktop-basis);
  min-width: 0;
  min-height: var(--desktop-min-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--desktop-icon-text-gap);
  padding: var(--desktop-tab-padding-y) var(--desktop-tab-padding-x);
  border-radius: var(--tab-radius);
  background: rgb(var(--tab-bg));
  color: rgb(var(--text-color));
  text-align: center;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  scroll-snap-align: start;
}
.custom-tabs-v1__item:hover { background: rgb(var(--hover-bg)); color: rgb(var(--hover-text)); }
.custom-tabs-v1__item.is-active {
  background: rgb(var(--active-bg));
  color: rgb(var(--active-text));
  box-shadow: 0 1px 5px #0001;
}
.custom-tabs-v1__icon {
  display: flex;
  flex: 0 0 var(--iw);
  width: var(--iw);
  height: var(--iw);
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.custom-tabs-v1__icon svg,
.custom-tabs-v1__icon img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* Desktop: Long titles are allowed to wrap. No ellipsis. */
.custom-tabs-v1__label {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.25;
  text-align: center;
}
/* Desktop slider */
.custom-tabs-v1[data-desktop-swipe="true"] .custom-tabs-v1__list {
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.custom-tabs-v1[data-desktop-swipe="false"] .custom-tabs-v1__list { overflow-x: hidden; scroll-snap-type: none; }
/* Mobile */
@media (max-width: 959px) {
  .custom-tabs-v1__list {
    gap: var(--mobile-gap);
    padding: var(--mobile-container-padding);
    scroll-padding-inline: var(--mobile-container-padding);
  }
  .custom-tabs-v1__item {
    flex-basis: var(--mobile-basis);
    min-height: var(--mobile-min-height);
    gap: var(--mobile-icon-text-gap);
    padding: var(--mobile-tab-padding-y) var(--mobile-tab-padding-x);
  }
  .custom-tabs-v1__icon { flex-basis: var(--im); width: var(--im); height: var(--im); }
  /* Mobile stays single-line. Long titles use ellipsis. */
  .custom-tabs-v1__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
  .custom-tabs-v1[data-mobile-swipe="true"] .custom-tabs-v1__list {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .custom-tabs-v1[data-mobile-swipe="false"] .custom-tabs-v1__list { overflow-x: hidden; scroll-snap-type: none; }
}
/* v1.0.8 mouse dragging */
@media (min-width: 960px) {
  .custom-tabs-v1[data-desktop-swipe="true"] .custom-tabs-v1__list { cursor: grab; }
  .custom-tabs-v1[data-desktop-swipe="true"] .custom-tabs-v1__list.is-dragging { cursor: grabbing; user-select: none; scroll-snap-type: none; }
  .custom-tabs-v1__list.is-dragging * { cursor: grabbing; user-select: none; }
}
