/* Public landing content styles. Shell geometry is owned by Bpt.UI.Web. */
.landingTopMenuItem {
    color: var(--lg-color-link) !important;
}

.landingTopMenuItem:hover,
.landingTopMenuItem:focus-visible {
    color: var(--lg-color-link-hover, var(--lg-color-primary)) !important;
}

.mud-theme-dark .landingTopMenuItem {
    color: var(--lg-color-primary) !important;
}

.mud-theme-dark .landingTopMenuItem:hover,
.mud-theme-dark .landingTopMenuItem:focus-visible {
    color: var(--mud-palette-primary) !important;
}

.landing-login-btn {
    white-space: nowrap;
}

/* Fixed-height workspace: the shell fills the viewport and only the content region scrolls,
   so the page never grows past the screen and nothing scrolls behind the fixed header/drawer.
   The package sizes the main region (header padding, drawer margin); we pin its height.
   dvh follows mobile browser chrome; vh is the fallback. */
.configured-shell-root .mud-main-content {
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    overflow: hidden;
}

.configured-shell-root .configured-shell-content {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    display: flex;
    flex-direction: column;
}

/* Page roots keep their natural height unless they opt in to fill the region (see .lg-page-fill). */
.configured-shell-root .configured-shell-content > * {
    flex: 0 0 auto;
    min-width: 0;
}

.configured-shell-root .configured-shell-content > .lg-page-fill {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* A workspace dialog keeps its frame while the content and actions change. */
.mud-dialog.lg-dialog-workspace {
    height: min(52rem, calc(100dvh - 2 * var(--lg-space-4)));
}

.mud-dialog.lg-dialog-workspace > .mud-dialog-content {
    min-height: 0;
    scrollbar-gutter: stable;
}

@media (max-width: 599px) {
    .mud-dialog.lg-dialog-workspace {
        width: calc(100% - 2 * var(--lg-space-2));
        max-width: calc(100% - 2 * var(--lg-space-2));
        margin-inline: var(--lg-space-2);
    }
}

@media (max-width: 960px) {
    .mud-appbar .landingTopMenuItem {
        display: none;
    }

    .landing-login-btn {
        padding: 6px 12px;
        font-size: 0.875rem;
    }
}

/* Shared public-page actions inherit each MudBlazor variant's contrast colours. */
.hero-btn.mud-button-root {
    min-height: 48px;
    border-radius: var(--lg-radius-md);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

/* Match the packaged sidebar's navigation text for expandable rows. */
.bpt-shell-drawer .configured-parent-row > .mud-icon-button:not(:disabled) {
    color: var(--bpt-shell-nav-text, var(--lg-vault-nav-text));
}

/* Give the work shortcuts the same teal and yellow accents as the vault cards. */
.configured-shell-header .configured-inline-action .configured-icon-action:is(
    [href="/user-specific/reminders"], [href="/capture/review-inbox"]
):not(:disabled, [aria-disabled="true"], .mud-disabled) {
    color: var(--lg-vault-green);
    background-color: var(--lg-vault-green-soft);
}

.configured-shell-header .configured-inline-action .configured-icon-action[href="/user-specific/recommendations"] {
    color: var(--lg-vault-navy);
    background-color: var(--lg-vault-yellow-soft);
}

.configured-shell-header .configured-inline-action .configured-icon-action:is(
    [href="/user-specific/reminders"], [href="/capture/review-inbox"], [href="/user-specific/recommendations"]
):not(:disabled, [aria-disabled="true"], .mud-disabled):is(:hover, :focus-visible) {
    border-color: currentColor;
}

/* The packaged account menu is the only direct child that is neither an inline action nor the
   overflow menu. Give its trigger the same round teal treatment as the work shortcuts. */
.configured-shell-header .configured-shell-actions > div:not(.configured-inline-action, .configured-overflow) .mud-icon-button {
    border: 1px solid var(--mud-palette-divider);
    border-radius: 50%;
    color: var(--lg-vault-green);
    background-color: var(--lg-vault-green-soft);
}

.configured-shell-header .configured-shell-actions > div:not(.configured-inline-action, .configured-overflow) .mud-icon-button:is(:hover, :focus-visible) {
    border-color: currentColor;
}

/* The packaged shell uses the error palette for badges. Scope the teal to work counts in this header. */
.configured-shell-header .configured-inline-action .mud-badge.mud-theme-error.mud-badge-overlap {
    --mud-palette-error: var(--lg-vault-green);
    --mud-palette-error-text: var(--mud-palette-white);
    inset-inline-start: auto;
    inset-inline-end: 0;
}

/* Settings is rendered in a shared popover outside the header. Scope dividers to the
   group-start links that follow Documents in the same menu. */
.mud-menu-list > .mud-menu-item[href="/documents"] ~ .mud-menu-item:is(
    [href="/my-access"], [href="/keyholders/third-party-connections"], [href="/user-specific/news"]
) {
    border-block-start: 1px solid var(--mud-palette-divider);
    margin-block-start: var(--lg-space-1);
}

@media (min-width: 600px) and (max-width: 680px) {
    .configured-shell-header {
        --bpt-shell-utility-gap: var(--lg-space-1);
    }
}
