﻿/*
 * Chrome that Syncfusion renders for the top bar: the SfAppBar itself and the SfDropDownButtons
 * inside it.
 *
 * These classes land on the controls' own elements — SfAppBar's <header>, and both the <button>
 * and the popup SfDropDownButton appends — so none of them carries the owning component's
 * CSS-isolation scope attribute and ::deep can never reach them. Everything the components render
 * themselves is styled in their own .razor.css.
 *
 * Loaded after the Syncfusion theme and theme.css so these rules win the cascade. The .e-appbar,
 * .e-dropdown-btn and .e-dropdown-popup qualifiers are needed to out-specify the vendor's own
 * two-class selectors, such as .e-appbar.e-light setting border: none.
 */

.top-bar.e-appbar {
    height: var(--top-bar-height);
    flex: 0 0 auto;
    /* The control's own 8px padding would compound with top-bar__content's inset. */
    padding: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--theme-border-muted-color);
    box-shadow: none;
    /* Above the desktop chat pane (950), below dialogs, nav menu, side panel and toasts (1000+). */
    z-index: 960;
}

.top-bar-hamburger {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--theme-text-disabled-color);
    cursor: pointer;
}

.top-bar-hamburger:hover {
    color: var(--theme-text-secondary-color);
}

.top-bar-hamburger:focus-visible {
    outline: 2px solid var(--theme-focus-ring-color);
    outline-offset: 2px;
}

@media screen and (max-width: 960px), screen and (hover: none) and (pointer: coarse) {
    .top-bar-hamburger {
        display: inline-flex;
    }

    .top-bar__content--navigation-open .top-bar-hamburger {
        margin-inline-start: auto;
    }
}

.top-bar-dropdown.e-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 34px;
    padding-inline: 0.5rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--theme-text-secondary-color);
    text-transform: none;
}

.top-bar-dropdown.e-dropdown-btn:hover {
    background: var(--theme-surface-hover-color);
}

.top-bar-dropdown.e-dropdown-btn .top-bar-dropdown__icon {
    display: block;
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--theme-text-disabled-color);
    background-color: currentColor;
    -webkit-mask: var(--top-bar-dropdown-icon) center / contain no-repeat;
    mask: var(--top-bar-dropdown-icon) center / contain no-repeat;
}

.site-selector.e-dropdown-btn .top-bar-dropdown__icon {
    --top-bar-dropdown-icon: url("/images/top-bar-icons/building.svg");
}

.culture-selector.e-dropdown-btn .top-bar-dropdown__icon {
    --top-bar-dropdown-icon: url("/images/top-bar-icons/globe.svg");
}

.top-bar-dropdown.e-dropdown-btn .top-bar-dropdown__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-selector.e-dropdown-btn .top-bar-dropdown__label {
    max-width: 240px;
}

.top-bar-dropdown.e-dropdown-btn .e-caret {
    margin-inline-start: 0;
    color: var(--theme-text-secondary-color);
}

.top-bar-dropdown.e-dropdown-popup {
    border: 1px solid var(--theme-border-muted-color);
    border-radius: 4px;
    background: var(--theme-surface-default-color);
}

.site-selector.e-dropdown-popup {
    min-width: 270px;
    max-width: 480px;
}

.lumi-launcher.e-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
}

.lumi-launcher.e-btn:hover {
    background: var(--theme-surface-hover-color);
}

@media screen and (max-width: 960px), screen and (hover: none) and (pointer: coarse) {
    .top-bar-dropdown.e-dropdown-btn .top-bar-dropdown__label {
        display: none;
    }

    .site-selector.e-dropdown-popup {
        left: 1rem !important;
        right: 1rem;
        min-width: 0;
        max-width: none;
    }
}
