/* INFO-STATUS-SEARCH (I2): the collapsible information bar. The layout loads this sheet (and js/atacs-infobars.js) only on a
   page whose information bar is collapsible (ATACS.Web/Code/InfoBars.cs), so a page that is not gets nothing from it.

   The page's information box (div / p.msgBox.mbInfo with its info icon) is not rebuilt: the script puts a slim bar in front of
   it - one button over its whole width - and hides the box itself until the user opens it. Opened, the box is the one the
   view rendered, untouched, so every page family's own rules for it still apply.

   INSTRUCTIONS-LOOK: the bar is a plain line - no background, no border, no tinted hover - holding, from its start, a small
   solid triangle (right while closed, down while opened), the info icon and the word "Instructions". The Modern dashboard
   shows the same line as the summary of its own details (Views/DashBoard/Index_V1.cshtml links this sheet for it; the bar's
   script never runs there), so the rules of the line below are written once, for the button and for the summary. */

/* Before the script has run (the head's inline script set .atacs-infobars-js; without scripts nothing here applies and the
   text stays visible): the box holds the line's place, unseen, so the text never flashes and nothing below it moves. The same
   boxes the script collapses or leaves alone: an information box carries its info icon (Manage Users keeps it beside the box). */
html.atacs-infobars-js:not(.atacs-infobars-ready) main :is(.msgBox.mbInfo:has(img[src*="icon_Info"]), .atacs-admin-info:has(> .msgBox.mbInfo)):not([data-report-message], [role="status"], [role="alert"]) {
    visibility: hidden !important;
    box-sizing: border-box !important;
    height: 24px !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden !important;
}

/* The collapsed box: gone, whatever display its page family gives it. */
[data-atacs-infobar-text][hidden] {
    display: none !important;
}

/* The bar: the line's place on the page (the script gives it the box's margins and text face). No box of its own. */
.atacs-infobar {
    display: flex;
    box-sizing: border-box;
    min-height: 24px;
    margin: 10px 0;
    padding: 0;
    line-height: 1.3;
}

/* The line, the one control (the bar's button; the Modern dashboard's summary): the triangle first, then the icon and the
   word, on one line, 24px high at least, over the whole width. Plain: the page's own background shows through. */
.atacs-infobar__toggle {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
    min-width: 0;
    min-height: 24px;
    margin: 0;
    padding: 0 4px;
    color: #333;
    font: inherit;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    white-space: nowrap;
    list-style: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    cursor: pointer;
}

/* A summary's own triangle is not drawn: the line draws the one below. */
.atacs-infobar__toggle::-webkit-details-marker {
    display: none;
}

/* The hover cue: the word underlined (no fill, no frame). */
.atacs-infobar__toggle:hover .atacs-infobar__title {
    text-decoration: underline;
}

.atacs-infobar__toggle:focus-visible {
    outline: 2px solid #1a5a96;
    outline-offset: -2px;
}

/* The triangle: the Modern dashboard's own of before (the browser's, 7px by 8px in #284b75), drawn - right while the line
   is closed, down while it is opened. #284b75 on white is 9.0 : 1. */
.atacs-infobar__triangle {
    flex: 0 0 auto;
    width: 7px;
    height: 8px;
    fill: #284b75;
    transition: transform .15s ease;
}

.atacs-infobar__toggle[aria-expanded="true"] .atacs-infobar__triangle,
details[open] > .atacs-infobar__toggle .atacs-infobar__triangle {
    transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
    .atacs-infobar__triangle {
        transition: none;
    }
}

.atacs-infobar__icon {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
}

.atacs-infobar__title {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Opened: the bar keeps its place above the box; the box's icon overlaps its own top-left corner by 7px, so the bar ends
   at least that far above it. */
.atacs-infobar[data-atacs-infobar="open"] {
    margin-bottom: 8px !important;
}
