/* SPDX-License-Identifier: Apache-2.0 */

/* The language tabs around examples and install steps (tabs.js switches them), on the docs pages
   and the landing pages. Colours are the site's tokens, which the page has loaded: through
   docs.css on a docs page, through the site's /styles.css on a landing page. */
.tabs { margin: 0.75rem 0 1.5rem; border: 1px solid var(--rule, #d8d8d8); border-radius: 8px; overflow: hidden; }
.tablist { display: flex; flex-wrap: wrap; background: var(--chip, #f1f1f1); border-bottom: 1px solid var(--rule, #d8d8d8); }
.tablist [role="tab"] {
    appearance: none;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    padding: 0.5rem 0.9rem;
    font: inherit;
    font-size: 0.9rem;
    color: var(--ink-soft, #555);
    cursor: pointer;
}
.tablist [role="tab"][aria-selected="true"] { color: var(--ink, #1a1a1a); border-bottom-color: var(--accent, #0b5fff); font-weight: 600; }
.tablist [role="tab"]:focus-visible { outline: 2px solid var(--accent, #0b5fff); outline-offset: -2px; }
.tabs [role="tabpanel"][hidden] { display: none; }
.tabs pre { margin: 0; padding: 0.9rem 1rem; overflow-x: auto; background: var(--surface, #fafafa); font-size: 0.88rem; line-height: 1.5; }
.tabs pre code { background: none; padding: 0; }
/* What a panel says beside its code: what a package needs, and what each command is for */
.tabs .needs, .tabs .caption { margin: 0; padding: 0.7rem 1rem 0; font-size: 0.85rem; color: var(--ink-soft, #555); }
.tabs .caption { padding-top: 0.5rem; font-size: 0.78rem; letter-spacing: 0.02em; color: var(--muted, #677285); }
.tabs .needs:last-child { padding-bottom: 0.8rem; }
.tabs .needs code { font-family: var(--mono, ui-monospace, monospace); font-size: 0.92em; }

/* A panel is one surface: its captions and code share its background, a hairline between blocks */
.tabs [role="tabpanel"] { background: var(--surface, #fff); }
.tabs [role="tabpanel"] pre { background: transparent; }
.tabs .caption + pre, .tabs .needs + .caption { border-top: 0; }
.tabs pre + .caption, .tabs pre + .needs, .tabs .copy-wrap + .caption, .tabs .copy-wrap + .needs { border-top: 1px solid var(--rule, #d8d8d8); padding-top: 0.6rem; }
