/* =============== EXPANDABLE TABS STYLING =============== */

:root {
  --expandable-gap: 0.5rem;
  --expandable-radius: 0.75rem;
  --expandable-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --expandable-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Container */
.expandable-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(111, 66, 193, 0.2);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 0.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.expandable-tabs.dark-mode {
  background: rgba(30, 30, 30, 0.9);
  border-color: rgba(111, 66, 193, 0.3);
}

/* Button Base */
.expandable-tab-button {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  gap: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--expandable-radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--expandable-transition);
  position: relative;
  color: rgba(100, 116, 139, 0.8);
  min-height: 36px;
  white-space: nowrap;
  overflow: hidden;
}

.expandable-tab-button:hover {
  background: rgba(111, 66, 193, 0.1);
  color: rgba(100, 116, 139, 1);
}

/* Button Active State */
.expandable-tab-button.active {
  background: rgba(111, 66, 193, 0.15);
  color: #6f42c1;
  font-weight: 600;
  gap: 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.expandable-tabs.dark-mode .expandable-tab-button.active {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.2);
}

/* Button Icon */
.expandable-tab-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Button Label */
.expandable-tab-label {
  display: inline-block;
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: all var(--expandable-transition);
  max-width: 200px;
}

.expandable-tab-button.active .expandable-tab-label {
  opacity: 1;
  width: auto;
}

/* Separator */
.expandable-separator {
  width: 1.2px;
  height: 24px;
  background: rgba(111, 66, 193, 0.2);
  margin: 0 0.25rem;
  border-radius: 1px;
}

.expandable-tabs.dark-mode .expandable-separator {
  background: rgba(167, 139, 250, 0.3);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .expandable-tabs {
    max-width: calc(100vw - 2rem);
  }

  .expandable-tab-button {
    min-height: 40px;
    padding: 0.375rem;
  }

  .expandable-tab-button.active {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }
}

/* Focus Styles (Accessibility) */
.expandable-tab-button:focus-visible {
  outline: 2px solid #6f42c1;
  outline-offset: 2px;
}

/* Scrollbar Styling */
.expandable-tabs::-webkit-scrollbar {
  height: 6px;
}

.expandable-tabs::-webkit-scrollbar-track {
  background: transparent;
}

.expandable-tabs::-webkit-scrollbar-thumb {
  background: rgba(111, 66, 193, 0.3);
  border-radius: 3px;
}

.expandable-tabs::-webkit-scrollbar-thumb:hover {
  background: rgba(111, 66, 193, 0.5);
}
