/**
 * Tailwind CSS-inspired styling for Primary Tabs
 */

/* Base tabs container */
nav.tabs {
  margin: 1.5rem 0;
}

/* Primary tabs list */
.tabs.primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
  list-style: none;
  border-bottom: 1px solid #e5e7eb;
}

/* Individual tab items */
.tabs.primary li {
  margin: 0;
}

/* Tab links */
.tabs.primary a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-bottom: none;
  border-top-left-radius: 0.375rem;
  border-top-right-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* Hover state */
.tabs.primary a:hover {
  background-color: #f3f4f6;
  color: #111827;
}

/* Active tab */
.tabs.primary a.is-active {
  background-color: #ffffff;
  color: #1d4ed8;
  border-color: #e5e7eb;
  border-bottom: 1px solid #ffffff;
  margin-bottom: -1px;
  font-weight: 600;
}

/* Focus state with accessible outline */
.tabs.primary a:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .tabs.primary {
    flex-direction: column;
    gap: 0.5rem;
    border-bottom: none;
  }
  
  .tabs.primary a,
  .tabs.primary a.is-active {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    margin-bottom: 0;
  }
}

/* Dark mode support */
.tw-dark .tabs.primary {
  border-bottom-color: #4b5563;
}

.tw-dark .tabs.primary a {
  color: #d1d5db;
  background-color: #1f2937;
  border-color: #4b5563;
}

.tw-dark .tabs.primary a:hover {
  background-color: #374151;
  color: #f9fafb;
}

.tw-dark .tabs.primary a.is-active {
  background-color: #111827;
  color: #60a5fa;
  border-color: #4b5563;
  border-bottom-color: #111827;
}

.tw-dark .tabs.primary a:focus {
  outline-color: #60a5fa;
}

@media (max-width: 640px) {
  .tw-dark .tabs.primary a.is-active {
    border: 1px solid #4b5563;
  }
}
