/* The frame around every page: content width, page background, the dark top bar with the logo, the workspace menu and the side menu. */

/* Width of the page content (AppPanelProvider::maxContentWidth). */
.fi-panel-app .fi-main.ambex-content-width {
    max-width: 105rem;
}

.fi-body.fi-panel-app {
    background-color: var(--ambex-bg);
    color: var(--ambex-text);
}

.dark .fi-body.fi-panel-app {
    background-color: #0b1626;
    color: #cdd9e8;
}

/* Top bar: dark, like the site's header. */
.fi-panel-app .fi-topbar {
    background-color: #121519;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.fi-panel-app .fi-topbar .fi-icon-btn,
.fi-panel-app .fi-topbar .fi-icon-btn .fi-icon {
    color: #c8d6e8;
}

.ambex-panel-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
}

.ambex-panel-brand img {
    height: 1.5rem;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(120, 180, 255, 0.45)) drop-shadow(0 0 18px rgba(31, 117, 222, 0.35));
}

.ambex-panel-brand-product {
    font: 600 1.25rem/1 var(--ambex-head);
    letter-spacing: -0.02em;
    color: var(--ambex-sky);
    margin-top: 2px;
}

@media (max-width: 1023px) {
    .fi-panel-app .fi-topbar-start {
        display: flex;
    }

    .ambex-panel-brand img {
        height: 1.2rem;
    }

    .ambex-panel-brand-product {
        font-size: 1rem;
    }
}

/* The workspace menu without the round initials of the company, in the button and in its list. */
.fi-panel-app .fi-tenant-menu-trigger .fi-avatar,
.fi-panel-app .fi-tenant-menu-item .fi-dropdown-list-item-image {
    display: none;
}

/* Folding the menu is for computers; phones have the menu button. */
@media (max-width: 1023px) {
    .fi-panel-app .fi-topbar-collapse-sidebar-btn-ctn { display: none !important; }

    /* The menu opened on a phone: the logo on the same dark band as the top bar, and narrower, so a strip of the page stays in sight (a tap there closes it). */
    .fi-panel-app .fi-sidebar-header { background-color: #121519; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06); }
    .fi-panel-app .fi-sidebar-header .fi-icon-btn, .fi-panel-app .fi-sidebar-header .fi-icon-btn .fi-icon { color: #c8d6e8; }
    .fi-panel-app .fi-sidebar.fi-sidebar-open { width: min(17rem, 80vw); }
}

/* The menu docked next to the page on a small computer screen (partials/sidebar-docked): under the top bar, as on a big screen, without the dark overlay. */
@media (min-width: 768px) and (max-width: 1023px) {
    .ambex-sidebar-docked .fi-panel-app .fi-sidebar {
        position: sticky;
        top: var(--topbar-height);
        z-index: 20;
        flex-shrink: 0;
        width: 15rem;
        height: calc(100dvh - var(--topbar-height));
        transform: none;
        translate: none;
        background-color: transparent;
        box-shadow: none;
        --tw-ring-shadow: 0 0 #0000;
    }

    .ambex-sidebar-docked .fi-panel-app .fi-sidebar-header-ctn,
    .ambex-sidebar-docked .fi-panel-app .fi-sidebar-close-overlay {
        display: none;
    }
}

/* Menu: group labels (Studio, Account) in navy, small uppercase. */
.fi-panel-app .fi-sidebar-group-label {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ambex-navy);
}

.dark .fi-panel-app .fi-sidebar-group-label {
    color: #ffffff;
}

.fi-panel-app .fi-sidebar-item-btn {
    border-radius: 999px;
    transition: background-color 0.15s ease;
}

/* Hover: a light preview of the active pill, in the same navy. */
.fi-panel-app .fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-btn:is(:hover, :focus-visible) {
    background-color: color-mix(in oklab, var(--ambex-navy) 6%, transparent);
}

.fi-panel-app .fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-btn:is(:hover, :focus-visible) :is(.fi-sidebar-item-label, .fi-icon) {
    color: var(--ambex-navy);
}

.fi-panel-app .fi-sidebar-item-label,
.fi-panel-app .fi-sidebar-item-btn .fi-icon {
    transition: color 0.15s ease;
}

.fi-panel-app .fi-sidebar-item-label {
    font-size: 0.9375rem;
    color: var(--ambex-text);
}

.fi-panel-app .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: var(--ambex-navy);
}

.fi-panel-app .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-panel-app .fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-icon {
    color: #ffffff;
    font-weight: 600;
}

.dark .fi-panel-app .fi-sidebar-item-label {
    color: #cdd9e8;
}

.dark .fi-panel-app .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background-color: var(--ambex-blue);
}

/* Dropdown menus (the user menu at the top right, the workspace menu): the same hover as the side menu. */
.fi-panel-app .fi-dropdown-list-item {
    border-radius: 999px;
    transition: background-color 0.15s ease;
}

.fi-panel-app .fi-dropdown-list-item:not(.fi-disabled):not([disabled]):is(:hover, :focus-visible) {
    background-color: color-mix(in oklab, var(--ambex-navy) 6%, transparent);
}

.fi-panel-app .fi-dropdown-list-item:not(.fi-disabled):not([disabled]):not(.fi-color-danger):is(:hover, :focus-visible) :is(.fi-dropdown-list-item-label, .fi-icon) {
    color: var(--ambex-navy);
}

.fi-panel-app .fi-dropdown-list-item-label,
.fi-panel-app .fi-dropdown-list-item .fi-icon {
    transition: color 0.15s ease;
}
