/**
 * TabNavigation Component Styles
 * 
 * Follows shadcn design patterns with a gray background and white sliding indicator.
 * Uses only var(--base-*) design tokens for utility/neutral styling.
 * 
 * Design Spec:
 * - Container: base-100 with 4px padding and 8px border radius
 * - Active Tab: white with subtle shadow, 6px border radius
 * - Inactive Tabs: transparent, base-600 text
 * - Hover: text darkens to base-900
 * - Animation: 300ms ease-out slide transition
 */

/* Tab Navigation Container */
.dc-tab-nav {
  position: relative;
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  background-color: var(--base-100);
  border-radius: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--base-300) transparent;
}

.dc-tab-nav::-webkit-scrollbar {
  height: 6px;
}

.dc-tab-nav::-webkit-scrollbar-track {
  background: transparent;
}

.dc-tab-nav::-webkit-scrollbar-thumb {
  background-color: var(--base-300);
  border-radius: 3px;
}

/* Sliding Indicator */
.dc-tab-nav__indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: left 300ms ease-out, width 300ms ease-out;
  pointer-events: none;
  z-index: 0;
}

/* Tab Button — uses .dc-tab-nav scoping to beat Kadence's global button styles */
.dc-tab-nav .dc-tab-nav__tab {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--base-600);
  background: transparent;
  border: none;
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
  transition: color 150ms ease-out;
  outline: none;
}

/* Override Kadence's button:hover/focus/active which sets
   color, background (shorthand), and box-shadow on all <button> elements */
.dc-tab-nav .dc-tab-nav__tab:hover,
.dc-tab-nav .dc-tab-nav__tab:focus,
.dc-tab-nav .dc-tab-nav__tab:active {
  color: var(--base-900);
  background: transparent;
  box-shadow: none;
}

.dc-tab-nav .dc-tab-nav__tab:focus-visible {
  outline: 2px solid var(--base-400);
  outline-offset: 2px;
}

.dc-tab-nav .dc-tab-nav__tab--active {
  color: var(--base-900);
}

/* Tab Label */
.dc-tab-nav__label {
  font-size: 14px;
  line-height: 1.25;
}

/* Count Badge */
.dc-tab-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--base-600);
  background-color: var(--base-200);
  border-radius: 9999px;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}

.dc-tab-nav__badge--active {
  color: var(--base-700);
  background-color: var(--base-100);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .dc-tab-nav {
    padding: 3px;
    gap: 2px;
  }
  
  .dc-tab-nav__tab {
    padding: 6px 12px;
    font-size: 13px;
  }
  
  .dc-tab-nav__label {
    font-size: 13px;
  }
  
  .dc-tab-nav__badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 11px;
  }
  
  .dc-tab-nav__indicator {
    top: 3px;
    bottom: 3px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .dc-tab-nav {
    border: 2px solid var(--base-700);
  }
  
  .dc-tab-nav__tab:focus-visible {
    outline-width: 3px;
  }
  
  .dc-tab-nav__indicator {
    border: 2px solid var(--base-700);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .dc-tab-nav__indicator {
    transition: none;
  }
  
  .dc-tab-nav__tab {
    transition: none;
  }
  
  .dc-tab-nav__badge {
    transition: none;
  }
}

/* Print styles - hide tabs */
@media print {
  .dc-tab-nav {
    display: none;
  }
}

