/* Tab labels are <button> elements, which keep the default arrow cursor. Give
   every tab a pointer, selected one included, so the whole strip reads as
   clickable. Applies to all tab sets in the docs, not just one page. */
.sphinx-tabs-tab {
    cursor: pointer;
}

/* Selected tab: mark it with weight and an underline only — no filled panel.
   sphinx-tabs gives the selected tab `background: white` (rgb(50,50,50) in dark)
   plus `margin: -1px`, which paints an opaque box that bleeds 1px outside the
   button. When a tab strip wraps onto two rows, a selected tab on row 2 covers
   the bottom edge of the tabs above it, so their hover underline is invisible.
   Dropping the background and the negative margin fixes that without changing
   which tab looks selected.
   Deliberately generic — every .sphinx-tabs-tab in the docs, not one page — so
   any future tab set behaves the same.
   Both sphinx-tabs' tabs.css and the theme's gurobi-tabs.css load AFTER this
   file, so each selector below is prefixed to outrank theirs: [role=main] beats
   the plain `.sphinx-tabs-tab[aria-selected=true]`, and the data-theme variants
   need body[data-theme=…] to beat their dark/auto equivalents. */
[role="main"] .sphinx-tabs-tab[aria-selected="true"],
body[data-theme="dark"] [role="main"] .sphinx-tabs-tab[aria-selected="true"],
body[data-theme="auto"] [role="main"] .sphinx-tabs-tab[aria-selected="true"] {
    background: none;
    /* The theme sets margin:-1px to tuck the tab over the tablist's border; with
       no fill to align there is nothing to tuck, and it is what let the tab
       overlap the row above. Must match the margin every other tab state uses
       (see the rule at the end of this block) or the row shifts on selection. */
    margin: 0 0 0.2rem;
    border: none;
    /* Keep the accent underline the theme intends. gurobi-tabs.css points this at
       --color-brand-secondary, which the theme never defines, so it silently
       resolves to currentColor; name a real variable instead. */
    border-bottom: 2px solid var(--color-brand-content);
}

/* Hover on an unselected tab previews the same underline, in a quieter color so
   it never reads as selected. The theme's own :hover rule also re-applies
   margin:-1px, which would put the overlap back for as long as the pointer is
   down a tab, so the margin is restated here too. */
[role="main"] .sphinx-tabs-tab:hover,
body[data-theme="dark"] [role="main"] .sphinx-tabs-tab:hover {
    margin: 0 0 0.2rem;
    background: none;
}

[role="main"] .sphinx-tabs-tab[aria-selected="false"]:hover,
body[data-theme="dark"] [role="main"] .sphinx-tabs-tab[aria-selected="false"]:hover {
    border-bottom: 2px solid var(--color-foreground-border);
}

/* Margins for every tab, in every state. This has to be the full shorthand and
   the same value as the selected and hover rules above: gurobi-tabs.css sets
   `margin: -1px` on the base tab, so setting only margin-bottom here would leave
   unselected tabs at margin-top:-1px while hover and selected sat at 0. The tabs
   are inline-block in a wrapping line box, so that 1px difference made the whole
   row grow and shrink as the pointer moved across it.
   The bottom value gives wrapped rows a little breathing room so one row's
   underline never touches the row below — the tablist is display:block, so
   row-gap does not apply and the spacing has to come from the tabs. */
[role="main"] .sphinx-tabs-tab {
    margin: 0 0 0.2rem;
}
