/* Modern/Classic switch in the navbar (Views/Shared/_UiModeToggle.cshtml). It shows on Classic pages
   too, so it needs neither the Modern page root class nor the page tokens; --m-* are read only with fallbacks, each the
   token's own value (ModernColorLiteralTests allows a literal there and nowhere else). The navbar
   is Bootstrap's dark one, so the control is drawn for a dark ground: an even 1px outline, and the
   current side filled. Below 992px (navbar-expand-lg) the menu is collapsed and the control becomes a
   full-width row with 44px targets. */
.ui-toggle { display: flex; align-items: center; margin: 0 .5rem; }
.ui-toggle__seg {
    display: inline-flex; gap: 2px; padding: 2px;
    border: 1px solid var(--m-on-dark-line, rgba(255, 255, 255, 0.35)); border-radius: var(--m-radius-pill, 999px);
}
.ui-toggle__btn {
    min-height: 28px; padding: 0 12px; border: 0; border-radius: var(--m-radius-pill, 999px);
    background: transparent; color: var(--m-on-dark-text-2, rgba(255, 255, 255, 0.8));
    font-family: var(--m-font, inherit); font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer;
}
@media (hover: hover) {
    .ui-toggle__btn:hover { color: var(--m-text-inverse, #ffffff); background: var(--m-on-dark-fill, rgba(255, 255, 255, 0.12)); }
}
.ui-toggle__btn[aria-pressed="true"] { background: var(--m-bg, #ffffff); color: var(--m-text, #16191d); }
.ui-toggle__btn:focus-visible { outline: 2px solid var(--m-text-inverse, #ffffff); outline-offset: 2px; }

@media (max-width: 991.98px) {
    .ui-toggle { margin: .75rem 0; }
    .ui-toggle__seg { display: flex; width: 100%; max-width: 360px; }
    .ui-toggle__btn { flex: 1; min-height: var(--m-touch, 44px); font-size: 15px; }
}

/* On a Modern page (the layout adds .ui-toggle--compact) the switch is smaller: in the desktop navbar it sits beside
   the workday pill, and in a phone's opened menu it takes its own width, not a full row, with 44px targets kept.
   Classic pages keep the sizes above. */
.ui-toggle--compact { margin: 0 .35rem; }
.ui-toggle--compact .ui-toggle__btn { min-height: 22px; padding: 0 9px; font-size: 12px; }
@media (max-width: 991.98px) {
    .ui-toggle--compact { margin: .5rem 0; }
    .ui-toggle--compact .ui-toggle__seg { display: inline-flex; width: auto; max-width: none; }
    .ui-toggle--compact .ui-toggle__btn { flex: none; min-height: var(--m-touch, 44px); padding: 0 14px; font-size: 14px; }
}

/* The switch (and on a Modern page the workday pill) widen the expanded navbar. Until 1200px a Modern page's menus
   drop their icons and keep their labels, which fits the usual menu set at 1024px. If the row is still too long (a
   user with every menu), the menus wrap in their own centered column and the right-hand group stays whole, instead
   of the row running past the window and the page scrolling sideways. With room to spare neither rule does anything. */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-collapse:has(.ui-toggle) > .navbar-nav { flex-wrap: wrap; justify-content: center; min-width: 0; }
    .navbar-expand-lg .navbar-collapse:has(.ui-toggle) > :not(.navbar-nav) { flex-shrink: 0; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar--modern .navbar-nav > .nav-item > .nav-link > i:first-child { display: none; }
}

/* The copyright line adds nothing on a phone and costs its height. The layout classes it only on a Modern page. */
@media (max-width: 1023.98px) {
    .site-footer--modern {
        display: none;
    }
}
