/*
 * The frontend's part of the application shell (the shared part is in
 * common/templates/app-shell/app-shell.css). Loaded after custom.css, so it wins over it.
 */

/* the header's items are list items in a plain box: no bullets beside the icons */
.frontend-topbar-right > li {
    list-style: none;
}

/* ---- footer: a quiet line under the page, not a website footer ---------------------------- */
.frontend-footer {
    padding: .6rem 1.25rem;
    background: transparent;
    border-top-color: rgba(219, 229, 239, .7);
}

.frontend-footer-brand,
.frontend-footer-copy,
.frontend-footer-meta {
    display: inline;
    margin: 0;
    font-size: .78rem;
    font-weight: 600;
    color: #7b8ea5;
}

.frontend-footer-copy {
    font-weight: 400;
    margin-left: .35rem;
}

/* ---- phones, tablets and small laptops: the header ---------------------------------------- */
/* Up to 1279px, not only on phones: between 768 and 991 custom.css still stretched both halves
   to full width, so the header broke into two rows with its icons spread across the second;
   between 992 and 1279 the 280px sidebar leaves the bar too little room for the wide one. */
@media (max-width: 1279.98px) {
    /* one bar, as an application's header is: menu and name on the left, icons on the right */
    .frontend-topbar .container-fluid {
        flex-wrap: nowrap;
        align-items: center;
        row-gap: 0;
        gap: .35rem;
        padding: .35rem .5rem;
    }

    .frontend-topbar-left,
    .frontend-topbar-right {
        width: auto;
    }

    .frontend-topbar-left {
        flex: 1 1 auto;
        gap: .4rem;
    }

    .frontend-topbar-right {
        flex: 0 0 auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: .1rem;
    }

    .frontend-topbar-brand {
        gap: .5rem;
    }

    /* .frontend-topbar in front: custom.css's ".container-fluid img { width: 100px }" outranks the
       class alone and kept the logo 100px wide, which cut the name short */
    .frontend-topbar .frontend-topbar-brand-logo {
        width: 2.2rem;
        height: 2.2rem;
        padding: .2rem;
    }

    .frontend-topbar-toggle,
    .frontend-topbar-icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    /* the avatar stands for the account; the name beside it is what pushed the bar to a second row */
    .frontend-topbar-right .dropdown-toggle > .d-md-inline {
        display: none !important;
    }
}

@media (max-width: 767.98px) {
    /* the account is its avatar alone: the caret beside it took room from the name */
    .frontend-topbar-right .dropdown-toggle::after {
        display: none;
    }

    /* the bottom bar takes the place of the footer */
    .frontend-footer {
        display: none;
    }

    /* the help button sits above the bottom bar, as a round button */
    body:has(.app-bottom-nav) .help-desk,
    body.has-app-bottom-nav .help-desk {
        bottom: calc(var(--app-bottom-nav-height, 3.6rem) + .6rem);
    }

    .app-typing .help-desk {
        display: none;
    }

    .help-desk-toggle > span {
        display: none;
    }

    .help-desk-toggle {
        width: 3rem;
        height: 3rem;
        padding: 0;
        justify-content: center;
        font-size: 1.2rem;
    }
}

/* the narrowest phones: a smaller logo and tighter gaps leave the name its room */
@media (max-width: 399.98px) {
    .frontend-topbar .frontend-topbar-brand-logo {
        width: 1.9rem;
        height: 1.9rem;
        padding: .15rem;
    }

    .frontend-topbar-brand,
    .frontend-topbar-left {
        gap: .3rem;
    }

    .frontend-topbar .container-fluid {
        padding-left: .3rem;
        padding-right: .3rem;
    }

    .frontend-topbar-toggle {
        width: 2.2rem;
    }
}

@media (max-width: 359.98px) {
    .frontend-topbar-brand-text {
        display: none;
    }
}

/* ---- phones: give the width to the content (see common app-shell.css) -------------------- */
@media (max-width: 575.98px) {
    .frontend-main {
        padding-left: .5rem;
        padding-right: .5rem;
    }

    /* it has no frame of its own: the cards in it line up with the cards above */
    .dashboard-surface-body {
        padding-left: 0;
        padding-right: 0;
    }

    .process-main-body {
        padding-left: .6rem;
        padding-right: .6rem;
    }
}

/* ---- section labels above titles are quiet grey text, not an accent colour ----------------
 * (app-plain.css already took off their capitals and tracking) */
[class*="-kicker"],
[class*="-eyebrow"] {
    color: #64748b !important;
    font-weight: 600;
}

/* ---- a plain workspace (signed in): no glows behind the page or in the sidebar -------------
 * The public landing and sign-in pages keep their artwork; this is the everyday workspace. */
body,
body.bg-body-tertiary {
    background: var(--bs-body-bg);
}

.frontend-sidebar.app-sidebar::before,
.frontend-sidebar.app-sidebar::after,
.frontend-sidebar-summary::after {
    display: none;
}

.frontend-sidebar-summary {
    border-radius: .5rem;
    background: rgba(255, 255, 255, .05);
    box-shadow: none;
}

/* the page you are on: a light band and a bar on its left edge (selectors as specific as the
   custom.css ones they replace) */
.frontend-sidebar.app-sidebar .nav.sidebar-menu .nav-item > .nav-link.active,
.frontend-sidebar .nav-item > .nav-link.active {
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 3px 0 0 #8acafb;
}

/* common.css paints an active menu item solid blue with !important; the sidebar overrides it */
.frontend-sidebar .sidebar-menu li.active > a.nav-link {
    background: rgba(255, 255, 255, .12) !important;
}

/* a group opened to show its pages is not the page you are on: it only lightens a little */
.frontend-sidebar.app-sidebar .nav.sidebar-menu .nav-item.menu-open > .nav-link {
    background: rgba(255, 255, 255, .07);
    box-shadow: none;
}

.frontend-sidebar.app-sidebar .nav.sidebar-menu .nav-item.menu-open > .nav-link.active {
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 3px 0 0 #8acafb;
}

.frontend-sidebar .nav-treeview > .nav-item > .nav-link.active {
    background: rgba(255, 255, 255, .1);
    box-shadow: none;
}

.frontend-sidebar .nav-link {
    border-radius: .5rem;
}

/* headings and buttons at a normal weight: 800 everywhere shouts */
.frontend-topbar-brand-title,
.frontend-footer-brand,
.frontend-sidebar-section-label {
    font-weight: 700;
}

.btn {
    letter-spacing: normal;
}

/* the left bar marks the page you are on, not a group that is merely open */
.frontend-sidebar .nav.sidebar-menu .nav-item.menu-open > .nav-link:not(.active)::before {
    opacity: 0;
}

/* ---- sign-in, registration and password pages: one plain card on the page -----------------
 * Before: a card inside a framed panel, a pill label, 20px input text, three differently
 * coloured header buttons and a three-column footer repeating the header's links. */
.guest-shell-refined .auth-form-panel-shell,
.guest-shell-refined .auth-focus-content-shell {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.guest-shell-refined .auth-form-panel-shell::before,
.guest-shell-refined .auth-form-panel-shell::after,
.guest-shell-refined .auth-focus-content-shell::before,
.guest-shell-refined .auth-focus-content-shell::after {
    display: none;
}

.guest-shell-refined .auth-login-stage-refined {
    min-height: 0;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.guest-shell-refined .auth-focus-content-shell {
    padding: 0;
}

.guest-shell-refined .auth-login-view-refined {
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.guest-shell-refined .auth-login-header {
    margin-bottom: 1.25rem;
}

/* "Applicant Access": a quiet line above the title, not a badge */
.guest-shell-refined .auth-login-kicker {
    display: block;
    padding: 0;
    border: 0;
    background: none;
    color: #64748b;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

.guest-shell-refined .auth-login-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: normal;
}

.guest-shell-refined .auth-login-subtitle {
    font-size: .9rem;
}

.guest-shell-refined .auth-login-panel {
    padding: 1.5rem !important;
    border-color: #dbe4ee !important;
    border-radius: .625rem !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06) !important;
}

.guest-shell-refined .auth-login-panel .form-label,
.guest-shell-refined .auth-login-panel label.control-label {
    font-size: .875rem;
    font-weight: 600;
}

.guest-shell-refined .auth-login-panel .form-control,
.guest-shell-refined .auth-login-panel .form-control-lg {
    min-height: 2.75rem;
    padding: .5rem .85rem;
    border-radius: .5rem;
    font-size: 1rem;
}

.guest-shell-refined .auth-login-btn {
    min-height: 2.75rem;
    border-radius: .5rem;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: normal;
}

.guest-shell-refined .auth-login-links a,
.guest-shell-refined .auth-login-link {
    font-size: .9rem;
    font-weight: 600;
}

/* header: the three places alike, the one you are on filled in */
.guest-shell-refined .anon-home-header-app .homepage-header__inner {
    min-height: 60px;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.guest-nav-link {
    display: inline-flex;
    align-items: center;
    height: 2.25rem;
    padding: 0 .85rem;
    border-radius: .5rem;
    color: rgba(255, 255, 255, .9);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.guest-nav-link:hover,
.guest-nav-link:focus-visible {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}

.guest-nav-link.is-active {
    background: #fff;
    color: #1b5c96;
}

/* footer: one line under the page */
/* content kept to the left: the help button floats at the bottom right */
.guest-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: .35rem 1.5rem;
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #dbe4ee;
    color: #64748b;
    font-size: .8125rem;
}

.guest-footer a {
    margin-left: .35rem;
    color: #1d5a94;
    text-decoration: none;
}

.guest-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 575.98px) {
    .guest-shell-refined .auth-login-stage-refined {
        padding-top: 1.25rem;
        padding-bottom: 1.5rem;
    }

    .guest-shell-refined .auth-login-panel {
        padding: 1.15rem !important;
    }

    /* the ministry's name stays on two short lines beside the emblem */
    .guest-shell-refined .anon-home-brand-text strong {
        font-size: .82rem;
        line-height: 1.2;
    }

    .guest-shell-refined .anon-home-brand-text small {
        font-size: .7rem;
        line-height: 1.2;
    }

    .guest-footer {
        flex-direction: column;
        align-items: flex-start;
        /* room under the text for the help button */
        padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    }

    .guest-footer-support {
        display: flex;
        flex-wrap: wrap;
        gap: .15rem .75rem;
    }

    .guest-footer a {
        margin-left: 0;
        overflow-wrap: anywhere;
    }
}

/* a short page keeps its footer at the bottom of the window */
.guest-shell-refined {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.guest-shell-refined > .guest-footer {
    margin-top: auto;
}

/* the applicant side's main actions are green ("Start Application"): table toolbars follow */
:root {
    --app-action: #1d8a50;
    --app-action-hover: #17703f;
}

/* ---- submitting a stage (application/views/_declaration.php) ------------------------------
 * One card: what state the stage is in and what submitting means at the top, the declaration
 * in the middle, and at the foot the acceptance on the left and the button on the right, where
 * the forms and dialogs keep theirs. A declaration of a few lines shows whole; a long one (they
 * run to pages, pasted from a word processor) keeps the card a screen high and opens in full on
 * request, in the page's own type rather than the one it was pasted in. */
.process-submit-card {
    min-width: 0;
    max-width: 100%;
    margin-bottom: 1rem;
    border: 1px solid #dbe4ee;
    border-radius: .75rem;
    background: #fff;
}

.process-submit-card-head {
    padding: 1rem 1.25rem .25rem;
}

.process-submit-card-status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #17703f;
    font-size: .8125rem;
    font-weight: 600;
}

.process-submit-card-status.is-pending {
    color: #9a5b12;
}

.process-submit-card-title {
    margin: .2rem 0 .25rem;
    color: #173f65;
    font-size: 1.125rem;
    font-weight: 700;
}

.process-submit-card-text {
    margin: 0 0 .75rem;
    color: #5b6b7d;
    font-size: .875rem;
}

.process-submit-card-text > .fa {
    margin-right: .25rem;
    color: #8193a6;
}

/* a form not sent yet (the card shows its steps) is marked amber, so all sections showing
   complete is not taken for sent */
.process-submit-card:has(.process-submit-steps) {
    border-color: #f0d9a8;
    border-left: 4px solid #e0a43a;
}

.process-submit-card-status.is-pending {
    padding: .2rem .6rem;
    border: 1px solid #f5ddab;
    border-radius: 999px;
    background: #fff6e6;
    color: #8a5a00;
}

/* checking the answers before sending them: what is sent cannot be corrected */
.process-submit-review {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 0 1rem;
    padding: .7rem .85rem;
    border: 1px solid #cfe0f1;
    border-radius: .6rem;
    background: #f3f8fd;
}

.process-submit-review-copy {
    display: grid;
    flex: 1 1 auto;
    min-width: 0;
    gap: .1rem;
    color: #4a5d70;
    font-size: .8125rem;
    line-height: 1.4;
}

.process-submit-review-copy > strong {
    color: #173f65;
    font-size: .875rem;
}

.process-submit-review-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* the jump to the answers leaves them clear of the fixed top bar */
#form-review {
    scroll-margin-top: 5.5rem;
}

/* the two steps: the form, then sending it; the one waiting for the user stands out */
.process-submit-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem 0;
    margin: .6rem 0 .75rem;
    padding: 0;
    list-style: none;
}

.process-submit-step {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.process-submit-step + .process-submit-step::before {
    content: "";
    width: 2.5rem;
    height: 2px;
    margin: 0 .75rem;
    background: #d5dee8;
}

.process-submit-step.is-current + .process-submit-step::before,
.process-submit-step.is-done + .process-submit-step::before {
    background: #8fc9a6;
}

.process-submit-step-mark {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border: 2px solid #c9d4df;
    border-radius: 50%;
    background: #fff;
    color: #6b7c8f;
    font-size: .8125rem;
    font-weight: 700;
}

.process-submit-step.is-done .process-submit-step-mark {
    border-color: #1f8a52;
    background: #1f8a52;
    color: #fff;
}

.process-submit-step.is-current .process-submit-step-mark {
    border-color: #e0a43a;
    background: #fff6e6;
    color: #8a5a00;
    box-shadow: 0 0 0 3px rgba(224, 164, 58, .2);
}

.process-submit-step-copy {
    display: grid;
    line-height: 1.25;
}

.process-submit-step-label {
    color: #173f65;
    font-size: .875rem;
    font-weight: 600;
}

.process-submit-step-note {
    color: #6b7c8f;
    font-size: .75rem;
}

.process-submit-step.is-done .process-submit-step-note {
    color: #17703f;
}

.process-submit-step.is-current .process-submit-step-note {
    color: #8a5a00;
    font-weight: 600;
}

/* stays at the bottom while the card is out of sight; clear of the help button on the right */
.process-submit-reminder {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    z-index: 1090;
    display: flex;
    align-items: center;
    gap: .6rem;
    max-width: calc(100vw - 2rem);
    padding: .55rem .6rem .55rem 1rem;
    border: 1px solid #f0d9a8;
    border-left: 4px solid #e0a43a;
    border-radius: .65rem;
    background: #fff;
    box-shadow: 0 .5rem 1.5rem rgba(23, 63, 101, .18);
    color: #5c3d00;
    font-size: .875rem;
    font-weight: 600;
    transform: translateX(-50%);
}

.process-submit-reminder[hidden] {
    display: none;
}

.process-submit-reminder > span {
    flex: 1 1 auto;
    min-width: 0;
}

.process-submit-reminder-short {
    display: none;
}

.process-submit-reminder > .fa {
    color: #e0a43a;
}

.process-submit-reminder > .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.process-submit-card-head > .process-submit-focus-notice {
    max-width: none;
    margin-bottom: .75rem;
}

.process-submit-card-declaration {
    padding: 0 1.25rem 1rem;
}

.process-submit-card-declaration-title {
    margin: 0 0 .5rem;
    color: #173f65;
    font-size: .875rem;
    font-weight: 700;
}

.process-submit-card-declaration .process-declaration-copy {
    position: relative;
    max-height: 18rem;
    overflow: hidden;
    padding: .875rem 1rem;
    border: 1px solid #e3eaf2;
    border-radius: .5rem;
    background: #f8fafc;
    box-shadow: none;
    color: #22384f;
    font-size: .875rem;
    line-height: 1.6;
    /* "Company)......................" has no place to break and widened the page on a phone */
    overflow-wrap: anywhere;
}

/* pasted text brings its own font, size and leading on every span */
.process-submit-card-declaration .process-declaration-copy * {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    background-color: transparent !important;
}

.process-submit-card-declaration .process-declaration-copy p {
    margin: 0 0 .6rem;
}

.process-submit-card-declaration .process-declaration-copy.is-clipped::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3.5rem;
    background: linear-gradient(to bottom, rgba(248, 250, 252, 0), #f8fafc);
    pointer-events: none;
}

.process-submit-card-declaration .process-declaration-copy.is-open {
    max-height: none;
}

.process-submit-card-declaration .process-declaration-copy.is-open::after {
    display: none;
}

.process-submit-card-more {
    margin-top: .4rem;
    padding: .25rem 0;
    border: 0;
    background: none;
    color: #1d6aa8;
    font-size: .8125rem;
    font-weight: 600;
}

.process-submit-card-more:hover {
    text-decoration: underline;
}

.process-submit-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem 1rem;
    padding: .875rem 1.25rem;
    border-top: 1px solid #e8eef4;
    border-radius: 0 0 .75rem .75rem;
    background: #fbfcfd;
}

.process-submit-card-foot > .process-declaration-check,
.process-submit-card-foot > .process-submit-card-aside {
    margin-right: auto;
}

.process-submit-card-foot > .process-declaration-check {
    padding: 0;
    border: 0;
    background: none;
}

/* the field's own spacing (form-group, help block) made a gap above the button */
.process-submit-card-foot .process-declaration-check *:not(.invalid-feedback, .help-block-error) {
    margin-bottom: 0;
}

/* the field comes wrapped in Bootstrap's mb-3, which is !important */
.process-submit-card-foot .process-declaration-check .mb-3 {
    margin-bottom: 0 !important;
}

.process-submit-card-foot .process-declaration-check :is(.form-check, .checkbox) {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.process-submit-card-foot .process-declaration-check .help-block:empty,
.process-submit-card-foot .process-declaration-check .invalid-feedback:empty {
    display: none;
}

.process-submit-card-foot .process-declaration-check .form-check {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 0;
    padding-left: 0;
}

.process-submit-card-foot .process-declaration-check .form-check-input {
    flex: 0 0 auto;
    float: none;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
}

.process-submit-card-foot .process-declaration-check label {
    font-size: .9375rem;
}

.process-submit-card-aside {
    color: #5b6b7d;
}

.process-submit-card-foot > .process-submit-focus-btn {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
}

.process-submit-card-foot > .process-submit-focus-btn:disabled {
    opacity: .55;
}

@media (max-width: 767.98px) {
    .process-submit-card-head {
        padding: .875rem .875rem .25rem;
    }

    .process-submit-card-declaration {
        padding: 0 .875rem .875rem;
    }

    .process-submit-card-declaration .process-declaration-copy {
        max-height: 14rem;
        padding: .75rem .8rem;
    }

    /* justified text leaves rivers of space in a phone's narrow column */
    .process-submit-card-declaration .process-declaration-copy * {
        text-align: left !important;
    }

    .process-submit-card-foot {
        flex-direction: column;
        align-items: stretch;
        padding: .75rem .875rem;
    }

    .process-submit-card-foot > .process-declaration-check,
    .process-submit-card-foot > .process-submit-card-aside {
        margin-right: 0;
    }

    .process-submit-card-foot > .process-submit-focus-btn {
        width: 100%;
        min-height: 2.75rem;
    }

    .process-submit-steps {
        flex-wrap: nowrap;
    }

    .process-submit-step {
        gap: .4rem;
        white-space: nowrap;
    }

    .process-submit-step + .process-submit-step::before {
        flex: 0 0 auto;
        width: 1rem;
        margin: 0 .4rem;
    }

    /* across the screen just above the round help button (and the bottom bar under it) */
    .process-submit-reminder {
        right: .7rem;
        bottom: 4.2rem;
        left: .7rem;
        max-width: none;
        padding-left: .75rem;
        transform: none;
        font-size: .8125rem;
    }

    body:has(.app-bottom-nav) .process-submit-reminder,
    body.has-app-bottom-nav .process-submit-reminder {
        bottom: calc(var(--app-bottom-nav-height, 3.6rem) + 4.1rem);
    }
}

/* a narrow phone has no room for the two steps side by side: one above the other */
@media (max-width: 479.98px) {
    .process-submit-review {
        flex-wrap: wrap;
    }

    .process-submit-review-btn {
        width: 100%;
    }

    .process-submit-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }

    .process-submit-step + .process-submit-step::before {
        content: none;
    }

    .process-submit-reminder-long {
        display: none;
    }

    .process-submit-reminder-short {
        display: inline;
    }
}

/* ---- the help button keeps clear of the page's last lines ----------------------------------
 * It floats over the bottom right corner; the page ends with room for it, so the last buttons
 * and the footer text can be scrolled out from under it. */
body:has(.help-desk) .frontend-content-shell {
    padding-bottom: 4.5rem;
}

@media (min-width: 768px) {
    body:has(.help-desk) .frontend-footer {
        padding-right: 14.5rem;
    }
}

/* below xl the stage's columns stack: the row's gutter only pushed it past the page's edge
 * (custom.css says so too, but .g-4 and a later gutter rule won over it) */
@media (max-width: 1199.98px) {
    .row.g-4.process-content {
        --bs-gutter-x: 0;
    }
}

/* ---- a section's fields sit straight under its tabs ------------------------------------------
 * The global .tab-pane rule (30px 50px padding and a shadow) and the fields' own bordered box put
 * the form in a box inside the page's box, 50px in from the tabs, under a grey strip. */
.process-form-tab-shell .tab-pane {
    padding: 0 !important;
    box-shadow: none !important;
}

.process-form-tab-shell .process-form-fields-compact {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
}

/* a grid item is as wide as its longest content: a long choice in a select pushed the form past
   the card's right edge on phones */
.process-form-shell > * {
    min-width: 0;
}

/* an old rule makes text inputs 9px on small screens; 16px on phones also keeps iOS from
   zooming in on focus */
@media (max-width: 1030px) {
    input.form-control[type="text"],
    input.form-control[type="password"] {
        font-size: 14px;
    }
}

@media (max-width: 767.98px) {
    input.form-control[type="text"],
    input.form-control[type="password"] {
        font-size: 1rem;
    }

    /* sections two to a row, of one width, instead of stacked at their own widths */
    .process-form-tabs-compact .nav-tabs > li,
    .process-form-tabs-compact .nav-tabs > .nav-item,
    .process-form-tabs-compact.nav-tabs > li,
    .process-form-tabs-compact.nav-tabs > .nav-item {
        flex: 1 1 calc(50% - .5rem);
        min-width: 0;
    }

    .process-form-tabs-compact .nav-link,
    .process-form-tabs-compact .nav-link.active {
        width: 100%;
        min-width: 0 !important;
    }

    .process-form-tabs-compact .process-form-tab-title {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* the stage page's card: hidden made it a scroller of its own, which held the bar of buttons
   (_stage_decision_bar.php) and the form's Save and Continue in place; clip cuts the same */
.process-content .process-main-shell {
    overflow: clip;
}

/* phones: the round Help desk button floats over the bar's right end; the buttons leave
   room for it */
@media (max-width: 767.98px) {
    body:has(.help-desk) .stage-decision-bar,
    body:has(.help-desk) .process-content .process-form-foot:not(.modal-body *) {
        padding-right: 4rem;
    }
}

/* above a comment made on a form (public-comment/_topic-strip.php): what is commented on, until
   when, and the way to its document */
.comment-topic-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    padding: .85rem 1.1rem;
}

.comment-topic-strip-copy {
    flex: 1 1 16rem;
    min-width: 0;
}

.comment-topic-strip-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
}

.comment-topic-strip-title a {
    color: inherit;
    text-decoration: none;
}

.comment-topic-strip-title a:hover,
.comment-topic-strip-title a:focus-visible {
    text-decoration: underline;
}

.comment-topic-strip-meta {
    margin-top: .15rem;
    color: #5b6b82;
    font-size: .875rem;
}

/* the page works in half the window while its document is read beside it (common DocumentPane):
   the top bar keeps to what fits there */
@media (min-width: 1200px) {
    html.doc-pane-open .frontend-topbar-left > .btn,
    html.doc-pane-open .frontend-footer-meta-wrap {
        display: none !important;
    }

    html.doc-pane-open .frontend-topbar .btn,
    html.doc-pane-open .frontend-topbar .badge {
        white-space: nowrap;
    }

    /* an application's summary goes under its step instead of squeezing it */
    html.doc-pane-open .process-content > [class*="col-xl-"] {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }
}

/* over the page on a narrower screen, the document has the whole screen: the round Customer
   Service button waits under it */
@media (max-width: 1199.98px) {
    html.doc-pane-open .help-desk {
        display: none !important;
    }
}

/* ---- sidebar and drawer alignment ---------------------------------------------------------- */

/* The menu button and the search icon at the size of the bell beside them (they were 14px). */
.frontend-topbar-toggle > i {
    font-size: 1.25rem;
    line-height: 1;
}

.frontend-topbar-icon > .bi-search {
    font-size: 1.1rem;
}

/* the header's button keeps its one line ("New Application!" broke onto two, an 83px header) */
.frontend-topbar-left > .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* A label is shown whole. The pin sat in the label's row at opacity 0 and kept 22px for itself
   there, so "Retention Schedule" and "Require Attention" broke onto two lines in a 280px
   sidebar. It now comes up over the end of the row only while the row is pointed at, as in the
   staff system; room is kept only where it always shows, on a pinned item. */
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link {
    position: relative;
}

.frontend-sidebar .nav.sidebar-menu .sidebar-pin-btn {
    position: absolute;
    top: 50%;
    right: .45rem;
    margin: 0;
    transform: translateY(-50%);
    background: #1b3a5c;
}

.frontend-sidebar .nav.sidebar-menu .nav-link:has(.sidebar-pin-btn.is-pinned) > p {
    padding-right: 1.9rem;
}

/* the badge stands right after its label; me-3 kept a further 1rem empty after it */
.frontend-sidebar .nav.sidebar-menu .nav-link .nav-badge {
    margin-right: 0 !important;
}

/* A label still too long for one line wraps; its icon stays level with the first line
   instead of sitting between the two. The icon box is one label line high. */
.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link {
    align-items: flex-start;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link > .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: calc(.92rem * 1.3);
    flex: 0 0 auto;
    /* one .75rem space between icon and label: the icon's .42rem margin plus the row's .8rem
       gap made 19.5px, which left "Require Attention" and its count no room on one line */
    margin-right: 0 !important;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link {
    column-gap: .75rem;
}

.frontend-sidebar .nav.sidebar-menu .nav-item > .nav-link > p {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 991.98px) {
    /* A drawer over the page at every width below lg. "Sidebar polish v2" in custom.css made the
       sidebar position: relative for all widths, which beat AdminLTE's fixed drawer; only phones
       had it back (custom.css, below 768), so between 768 and 991 the open drawer pushed the
       header and the page to the right and squeezed them. */
    .frontend-sidebar.app-sidebar {
        position: fixed;
    }

    /* The drawer's close button sat across the account card's top right corner, half on its
       border. It now sits inside the card, level with the "Signed In" line, which keeps room
       for it; the name below starts under the button. */
    .frontend-sidebar-close {
        width: 2rem;
        height: 2rem;
        top: 1.4rem;
        right: 1.35rem;
    }

    .frontend-sidebar-summary-label {
        padding-right: 2.25rem;
    }
}

/* phones: the card has a smaller margin and padding here (custom.css) */
@media (max-width: 767.98px) {
    .frontend-sidebar-close {
        top: .9rem;
        right: 1rem;
    }
}
