/* Board selector widget (sidebar placement) */
.board-selector {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px 10px;
    margin: 8px 12px;
    text-align: left;
}
.board-selector label {
    display: block;
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 0.85em;
    color: #fff;
}
.board-selector select {
    width: 100%;
    padding: 4px 6px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: #fff;
    color: #333;
    font-size: 0.9em;
}

/* A board-neutral page renders no selector at all - see
   ``board_selector.js`` - so there is nothing to style for one. */

/* Recipe page: one board's commands end to end.

   Deliberately louder than the rest of the page furniture. A reader
   who misses this does not find out from the page - they find out
   part way through a build that does not work, having had no reason
   to suspect the commands were not theirs. */
.board-page-banner {
    border-left: 6px solid #4a90c4;
    background: #eef4fa;
    padding: 14px 18px;
    margin: 0 0 24px;
    border-radius: 0 4px 4px 0;
    /* Pinned, because the thing it warns about is below it. A
       cookbook runs for several screens and the reader is scrolling
       through command blocks; a banner that scrolled away would be
       out of sight for exactly the part of the page where acting on
       the wrong board costs them a build.

       Same stack as every other pinned layer: immediately below the
       breadcrumb bar (``breadcrumb_bar.css``) and the release-scope
       banner (``release_scope_banner.js``), each defaulting to
       ``0px`` where that layer is absent. The background must stay
       opaque or content scrolls through it. */
    position: sticky;
    top: calc(var(--breadcrumb-bar-h, 0px) +
              var(--release-scope-banner-h, 0px));
    z-index: 4;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Below the theme's mobile breakpoint the sidebar collapses and
   vertical space is scarce, so the banner scrolls with the page
   rather than eating a third of the viewport. This matches what
   ``release-scope-banner`` does at the same breakpoint. */
@media screen and (max-width: 768px) {
    .board-page-banner {
        position: static;
    }
}
.board-page-banner p {
    margin: 0;
}
.board-page-banner .board-page-scope {
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.4;
    color: #1b3c57;
}
/* ``only`` is upper-cased here rather than written in capitals in the
   source: a screen reader given literal capitals may spell the word
   out letter by letter, and ``em`` already carries the emphasis to
   anything that is not looking at the styling. */
.board-page-banner .board-page-only {
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #b3261e;
}

/* The reader's selection is a different board: the strongest thing
   the page says. */
.board-page-banner.board-page-mismatched {
    border-left-color: #b3261e;
    background: #fdeceb;
}
.board-page-banner.board-page-mismatched .board-page-scope {
    color: #7a1a14;
}
.board-page-banner .board-page-mismatch {
    margin-top: 12px;
    font-size: 1.1em;
    font-weight: 700;
    line-height: 1.45;
    color: #8c1d18;
}

/* "All Boards" mode: visible container around each board block */
.board.board-show-all {
    border-left: 4px solid #4a90c4;
    background: #f5f8fb;
    padding: 12px 12px 4px 16px;
    margin: 16px 0;
    border-radius: 0 4px 4px 0;
}

/* Board badge: header bar at top of each block in "All Boards" mode */
.board-badge {
    display: none;
    background: #4a90c4;
    color: #fff;
    padding: 4px 10px;
    margin: -12px -12px 12px -16px;
    border-radius: 0 4px 0 0;
    font-size: 0.82em;
    font-weight: 600;
    letter-spacing: 0.02em;
    /* Pin the badge to the top of the viewport while the reader
       scrolls through a long board block in "All Boards" mode, so
       the family / board context stays visible. The badge is
       hidden (display: none) when a specific board is selected,
       so this only takes effect in all-boards mode. */
    position: sticky;
    /* Sit immediately below the breadcrumb bar (defined in
       ``breadcrumb_bar.css``). When the bar is toggled off or
       not present, the variable defaults to ``0px`` and the
       badge pins to the very top as before. */
    /* ``--release-scope-banner-h`` (published by
       ``release_scope_banner.js``) adds the pinned release-scope
       banner where one is present; ``0px`` elsewhere. */
    top: calc(var(--breadcrumb-bar-h, 0px) +
              var(--release-scope-banner-h, 0px));
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Board-content admonition for PDF all-boards mode */
.admonition.board-content {
    border-left: 4px solid #4a90c4;
    background: #f5f8fb;
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 0 4px 4px 0;
}
.admonition.board-content > .admonition-title {
    background: #4a90c4;
    color: #fff;
    padding: 4px 10px;
    margin: -12px -16px 12px -16px;
    border-radius: 0 4px 0 0;
    font-size: 0.85em;
    font-weight: 600;
}
