/*
 * Page furniture that every page shares: the rail down the left, the shell it sits in, and the
 * flash messages. The admin pages' own styling lives in admin.css, on top of Bootstrap, and is
 * loaded only there.
 */

/*
 * The shell the admin pages hang in: the rail down the left, the page beside it. The board is its
 * own shell (.board-page in board.css) because its grid scrolls inside itself and the window's
 * height is the whole of it; an admin page is as tall as its content, and the rail runs the length
 * of it rather than stopping at the fold.
 */
.app-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
}

.app-shell > .admin-page {
    flex: 1 1 auto;
    min-width: 0;
}

/*
 * The rail: where you can go, as opposed to what you can do on the page you are on. Ink, so it
 * reads as page furniture and not as part of what is on the page; the icons are quiet until you
 * are on that page. The board and every admin page draw the same one — see templates/_rail.html.twig.
 */
.app-rail {
    flex: 0 0 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 0;
    background: var(--nb-ink);
}

.app-rail__mark {
    width: 28px;
    height: 28px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: var(--nb-salmon);
    color: var(--nb-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 14px;
}

.app-rail__ico {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: var(--r-xs);
    background: none;
    color: rgba(240, 234, 228, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}

.app-rail__ico:hover { background: rgba(240, 234, 228, 0.10); color: var(--nb-beige); }
.app-rail__ico--on { background: rgba(240, 234, 228, 0.14); color: var(--nb-white); }
.app-rail__ico:focus-visible { outline: 2px solid var(--nb-beige); outline-offset: -2px; }
.app-rail__spacer { flex: 1 1 auto; }

.app-rail__av {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(240, 234, 228, 0.14);
    color: var(--nb-beige);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--tool-fs-12);
    font-weight: 600;
    text-decoration: none;
}

.flashes {
    max-width: 60rem;
    margin: var(--sp-20) auto 0;
    padding: 0 var(--sp-24);
}

.flash {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--border-1);
    border-radius: var(--r-xs);
    background: var(--bg-2);
}

.flash-success { border-left-color: var(--fg-accent); }
.flash-error { border-left-color: var(--tool-alert-fg); }

/* Bootstrap gives the admin pages this; the board does not load Bootstrap and needs it too. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* The last thing a page can say when its script never ran: readable on its own, over anything. */
.noscript {
    margin: 0;
    padding: var(--sp-20);
    border-bottom: 1px solid var(--border-1);
    background: var(--tool-alert-bg);
    color: var(--fg-1);
    font-family: var(--font-body);
    text-align: center;
}
