/**
 * sphinx-tabs extension
 * Improves contrast and readability in dark mode
 * Fixes: https://github.com/executablebooks/sphinx-book-theme/issues/743
 */

// Ensure sphinx-tabs have proper contrast in dark mode
html[data-theme="dark"] {
  .sphinx-tabs {
    // Tab buttons
    .sphinx-tabs-tab {
      background-color: var(--pst-color-surface);
      color: var(--pst-color-text-muted);
      border-color: var(--pst-color-border);

      &[aria-selected="true"] {
        background-color: var(--pst-color-background);
        color: var(--pst-color-text-base);
        border-bottom-color: var(--pst-color-background);
      }

      &:hover {
        color: var(--pst-color-text-base);
      }
    }

    // Tab panel content area
    .sphinx-tabs-panel {
      background-color: var(--pst-color-background);
      color: var(--pst-color-text-base);
      border-color: var(--pst-color-border);
    }
  }
}
