/* ============================================
   Tabs Component
   Uses theme variables from website.css
   ============================================ */

.tabs-container {
  margin: 24px 0;
  border: 1px solid var(--fil-border);
  border-radius: var(--fil-radius-lg);
  background: var(--fil-bg-elevated);
  overflow: hidden;
}

/* Tab Header / Tab List */
.tabs-header {
  display: flex;
  flex-wrap: wrap;
  background: var(--fil-bg);
  border-bottom: 1px solid var(--fil-border-subtle);
  gap: 0;
}

/* Individual Tab Button */
.tabs-header .tab {
  padding: 12px 20px;
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--fil-text-muted);
  font-family: var(--fil-font);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  outline: none;
}

.tabs-header .tab:hover {
  background: var(--fil-bg-hover);
  color: var(--fil-text-secondary);
}

.tabs-header .tab:focus-visible {
  outline: 2px solid var(--fil-primary);
  outline-offset: -2px;
  background: var(--fil-bg-hover);
}

.tabs-header .tab.active {
  background: var(--fil-bg-elevated);
  border-bottom-color: var(--fil-primary);
  color: var(--fil-text);
  font-weight: 600;
}

/* Tab Content Panel */
.tabs-body {
  padding: 16px;
  background: var(--fil-bg-elevated);
}

.tabs-body .tab-content {
  display: none;
  color: var(--fil-text-secondary);
  font-size: 16px;
  line-height: var(--fil-leading-relaxed);  /* 1.625 - match theme.css */
}

.tabs-body .tab-content.active {
  display: block;
}

/* Nested content styling */
.tabs-body .tab-content p {
  margin: 12px 0;
}

.tabs-body .tab-content p:first-child {
  margin-top: 0;
}

.tabs-body .tab-content p:last-child {
  margin-bottom: 0;
}

.tabs-body .tab-content code {
  background: var(--fil-bg);
  padding: 2px 6px;
  border-radius: var(--fil-radius-sm);
  font-family: var(--fil-font-mono);
  font-size: 14px;
  color: var(--fil-text);
  border: 1px solid var(--fil-border);
}

.tabs-body .tab-content pre {
  background: var(--fil-bg-code);
  border: 1px solid var(--fil-border-subtle);
  border-radius: var(--fil-radius);
  padding: 16px;
  margin: 16px 0;
  overflow-x: auto;
}

.tabs-body .tab-content pre code {
  background: transparent;
  padding: 0;
  border: none;
  /* Let syntax highlighting determine text color */
  color: inherit;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .tabs-header .tab {
    transition: none;
  }
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 767px) {
  .tabs-header .tab {
    padding: 10px 16px;
    font-size: 13px;
  }

  .tabs-body {
    padding: 12px;
  }
}
