/* AMD brand overrides for sphinx_rtd_theme.

   This file collects the small set of color tweaks that take the
   stock sphinx_rtd_theme chrome and align it with AMD brand
   styling. It is intentionally narrow: we stay on live upstream
   sphinx_rtd_theme and apply only the overrides we need, rather
   than vendoring a forked theme.

   Loaded after custom.css in conf.py so these rules win where
   they overlap. */

/* Chrome-frame backgrounds: match amd.com.

   The sphinx_rtd_theme ships three different background colors for
   the three chrome surfaces that frame the content: the top-left
   search / boards header (.wy-side-nav-search) is bright blue
   (#2980b9), the sidebar ToC (.wy-nav-side) is near-black
   (#343131), and the breadcrumb bar (.breadcrumb-bar in
   breadcrumb_bar.css) was originally dark slate (#2c3e50). Three
   different darks framing the content read as accidental rather
   than intentional.

   Pin the search / boards header (and its rounded logo plate, and
   the mobile-collapsed top bar / its logo plate) to pure black
   (#000), which is the background-color amd.com itself uses on its
   primary navbar (header.common-header .navbar). The breadcrumb
   bar is pinned to the same color in breadcrumb_bar.css. The
   result is one continuous black frame around the content area
   that visually anchors the docs to the parent brand.

   The translucent-white overlays inside the search header (board
   selector widget, search input border, etc.) keep enough contrast
   against pure black, and the AMD-red header logo pops against it
   just as well as it did against the previous theme blue. */
.wy-side-nav-search,
.wy-side-nav-search img,
.wy-nav-side,
.wy-nav-top,
.wy-nav-top img {
    background-color: #000;
}

/* Sidebar section captions: AMD teal.

   sphinx_rtd_theme renders ``.. rubric::``-style caption text in
   the left navigation (the labels that group toctree entries) in
   a pale blue (#55a5d9) that was chosen to contrast against the
   theme's default near-black sidebar. Against our pure-black
   chrome it still works, but the legal-reviewed AMD palette uses
   teal (#007C97) for the same accent role, so adopt it here to
   keep the sidebar consistent with the rest of the brand. */
.wy-menu-vertical header,
.wy-menu-vertical p.caption {
    color: #007C97;
}

/* Version picker: readable contrast.

   On Read the Docs the theme renders a version `<select>` in the
   search header (`switch-menus > version-switch`, populated by the
   theme's own `_static/js/versions.js` from the RTD addons data).
   It is where a reader looks to identify the release they are
   reading, and the theme colors it `hsla(0,0%,100%,.3)` -- white at
   30% alpha.
   That resolves to #4d4d4d over our black header, a contrast ratio
   of 2.49:1, which fails WCAG AA for normal text (4.5:1) and fails
   even the large-text threshold (3:1). Readers have reported being
   unable to tell which release they are reading.

   RTD's own flyout tab carries the same information, but it sits in
   a screen corner, it is not part of the sidebar a reader is already
   using to navigate, and its styling is not ours to change. This
   widget is: the markup, the script that fills it and the stylesheet
   that colors it are all shipped by the theme inside our own build.

   The black is not what made it dim: over the theme's own #2980b9
   the same rule measures 1.63:1. The widget is low-contrast by
   design, and a docs site cannot afford that on the one element
   that answers "which version is this?".

   Adopt the color and the bold weight of the "AMD EDF Documentation"
   title that sits directly above it: #fcfcfc at 700, which is 20.5:1
   against black. Both elements are already set in Lato by the theme,
   so taking the title's weight and color is what makes the picker
   read as a sibling of the title rather than as incidental chrome.
   Which release you are reading is worth that much prominence, which
   is the whole of the complaint behind this rule.

   The hover and focus states are pinned to white as well. Left
   alone they inherit the theme's hsla(0,0%,100%,.5), which is much
   darker than the resting state set here, so the widget would appear
   to dim when pointed at. The theme's own hover background tint
   still supplies the interaction cue.

   The caret glyph is a `:after` on the wrapping div and takes its
   color by inheritance, so the wrapper is set too. Option text is
   left alone: the theme paints it #000 against the browser's own
   white popup. */
.wy-side-nav-search > div.switch-menus > div.language-switch,
.wy-side-nav-search > div.switch-menus > div.version-switch,
.wy-side-nav-search > div.switch-menus > div.language-switch select,
.wy-side-nav-search > div.switch-menus > div.version-switch select {
    color: #fcfcfc;
    font-weight: 700;
}
.wy-side-nav-search > div.switch-menus > div.language-switch select:hover,
.wy-side-nav-search > div.switch-menus > div.language-switch select:focus,
.wy-side-nav-search > div.switch-menus > div.language-switch select:active,
.wy-side-nav-search > div.switch-menus > div.version-switch select:hover,
.wy-side-nav-search > div.switch-menus > div.version-switch select:focus,
.wy-side-nav-search > div.switch-menus > div.version-switch select:active {
    color: #fff;
}
