/* Base tool selector (tabs + search + panel filtering) */
.base-tool-selector {
  width: 100%;
}

.base-tool-selector .tab-list {
  display: flex;
  gap: 50px;
  margin: 0 auto 40px auto;
  position: relative;
  padding-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
  max-width: fit-content;
}

.base-tool-selector .tab-list::-webkit-scrollbar {
  display: none;
}

.base-tool-selector .tab {
  position: relative;
  padding: 16px 0;
  margin: 0;
  border: none;
  background: none;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  transition: color 200ms ease-in-out;
  z-index: 1;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
  outline: none;
  color: #1e293b;
}

.base-tool-selector .tab:focus {
  outline: 2px solid #6366f1;
  outline-offset: 4px;
  border-radius: 4px;
}

.base-tool-selector .tab i {
  font-size: 32px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 200ms ease-in-out;
  color: #1e293b;
}

.base-tool-selector .tab span {
  transition: color 200ms ease-in-out;
}

.base-tool-selector .tab:hover:not(.active) {
  color: #0f172a;
}

.base-tool-selector .tab:hover:not(.active) i {
  color: #0f172a;
}

.base-tool-selector .tab.active {
  color: #4f46e5;
  font-weight: 500;
}

.base-tool-selector .tab.active i {
  color: #4f46e5;
}

.base-tool-selector .tab.active span {
  color: #4f46e5;
}

.base-tool-selector .tab-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 1px;
  transition:
    left 300ms cubic-bezier(0.4, 0, 0.2, 1),
    width 300ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  background: #4f46e5;
}

body.theme-dark .base-tool-selector .tab,
[data-theme='dark'] .base-tool-selector .tab {
  color: #94a3b8;
}

body.theme-dark .base-tool-selector .tab i,
[data-theme='dark'] .base-tool-selector .tab i {
  color: #94a3b8;
}

body.theme-dark .base-tool-selector .tab:hover:not(.active),
[data-theme='dark'] .base-tool-selector .tab:hover:not(.active) {
  color: #cbd5e1;
}

body.theme-dark .base-tool-selector .tab:hover:not(.active) i,
[data-theme='dark'] .base-tool-selector .tab:hover:not(.active) i {
  color: #cbd5e1;
}

body.theme-dark .base-tool-selector .tab.active,
[data-theme='dark'] .base-tool-selector .tab.active {
  color: #a5b4fc;
  font-weight: 500;
}

body.theme-dark .base-tool-selector .tab.active i,
[data-theme='dark'] .base-tool-selector .tab.active i {
  color: #a5b4fc;
}

body.theme-dark .base-tool-selector .tab.active span,
[data-theme='dark'] .base-tool-selector .tab.active span {
  color: #a5b4fc;
}

body.theme-dark .base-tool-selector .tab-indicator,
[data-theme='dark'] .base-tool-selector .tab-indicator {
  background: #a5b4fc;
}

.base-tool-selector .tab-panels {
  padding: 0 0 32px 0;
}

.base-tool-selector .tab-panels .tab-panel {
  display: none;
}

.base-tool-selector .tab-panels .tab-panel.active {
  display: block;
}

.base-tool-selector .mobile-tab-label {
  display: none;
}

.base-tool-selector .tool-search-container {
  max-width: 980px;
  margin: 0 auto 40px auto;
  width: 100%;
}

.base-tool-selector .tool-search-container .search-field {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.base-tool-selector .tool-search-container .search-field__input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.base-tool-selector .tool-search-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: var(--muted-text);
}

.base-tool-selector .tool-search-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
  color: var(--muted-text);
}

.base-tool-selector .tool-search-empty p {
  font-size: 20px;
  margin: 0;
  color: var(--muted-text);
}

@media (max-width: 768px) {
  .base-tool-selector .tab-list {
    gap: 32px;
    margin: 12px auto 32px auto;
    padding-bottom: 10px;
  }

  .base-tool-selector .tab {
    font-size: 14px;
    padding: 14px 0;
  }

  .base-tool-selector .tab span {
    display: none;
  }

  .base-tool-selector .tab i {
    font-size: 28px;
    width: 28px;
    height: 28px;
  }

  .base-tool-selector .mobile-tab-label {
    display: block;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: var(--link);
    margin-bottom: 8px;
    padding: 8px 16px;
  }

  .base-tool-selector .tool-search-container {
    max-width: 100%;
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  .base-tool-selector .tab-list {
    gap: 24px;
  }

  .base-tool-selector .tab i {
    font-size: 26px;
    width: 26px;
    height: 26px;
  }

  .base-tool-selector .mobile-tab-label {
    font-size: 21px;
  }
}
