/* ── Shellbar overrides ────────────────────────────────────────────────────────
   fundamental-styles provides all fd-shellbar__* base styles.
   Only genuine overrides are listed here with a reason. */

/* fixed positioning — fundamental-styles renders shellbar as static by default */
#main-shellbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

#main-shellbar .fd-shellbar__group--middle {
    flex: 1 1 auto !important;
    order: 2;
}

/* Bootstrap global `a` styles add underline — override for branding link */
a.fd-shellbar__branding {
    text-decoration: none;
}

a.fd-shellbar__branding:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* ── fd-popover toggle (JS-driven, not fundamental-styles built-in) ────────────
   fundamental-styles does not hide/show fd-popover__body by default.
   Our JS toggles fd-popover__body--is-visible to control visibility. */
.fd-popover-container {
    position: relative;
}

.fd-popover-container .fd-popover__body {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1040;
    display: none;
    min-width: 200px;
}

.fd-popover-container .fd-popover__body--right {
    left: auto;
    right: 0;
}

.fd-popover-container .fd-popover__body--is-visible {
    display: block;
}

/* dropdown arrow icon sizing — custom icon inside shellbar buttons */
.fd-shellbar__button-arrow {
    font-size: 0.625rem;
    margin-left: 0.25rem;
}

/* ── Shellbar search — custom feature, no equivalent in fundamental-styles ── */
.fd-shellbar__input-group__input {
    width: 220px;
}

@media (max-width: 1500px) {
    .fd-shellbar__action--search {
        display: none !important;
    }
}

/* ── Shellbar datetime — custom feature, no equivalent in fundamental-styles ── */
#main-shellbar .fd-shellbar__group--actions {
    flex-shrink: 1;
    min-width: 0;
}

.fd-shellbar__datetime {
    display: none;
    min-width: 0;
    overflow: hidden;
}

@media (min-width: 1500px) {
    .fd-shellbar__datetime {
        display: flex;
    }
}

.fd-shellbar__datetime-text {
    padding: 0 0.5rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    min-width: 0;
    color: var(--sapTextColor, #32363a);
}

/* ── Responsive hamburger + collapse panel — custom feature ────────────────── */

/* Hidden on large screens, shown via media query below */
.shellbar-hamburger {
    display: none !important;
    margin-left: 0.5rem;
}

/* Full-width nav panel that overlays content below the shellbar on small screens.*/
.shellbar-nav-collapse {
    display: none;
    position: fixed;
    top: 44px;
    left: 100px;
    right: 0;
    z-index: 1031;
}

.shellbar-nav-collapse.is-open {
    display: block;
}

/* fundamental-styles sets display:block on fd-menu__sublist — override with hidden attribute.
   [hidden] alone loses to CSS rules, so we re-enforce it explicitly here. */
.shellbar-nav-collapse .fd-menu__sublist[hidden] {
    display: none !important;
}

/* Group toggle button — inherits fd-menu__link styling, acts as a button */
.shellbar-nav-collapse__group-toggle {
    width: 100%;
    justify-content: space-between;
}

/* Arrow icon — points right when collapsed, rotates down when expanded */
.shellbar-nav-collapse__arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.shellbar-nav-collapse__group-toggle[aria-expanded="true"] .shellbar-nav-collapse__arrow {
    transform: rotate(90deg);
}

@media (max-width: 1250px) {
    .fd-shellbar__action--about,
    .fd-shellbar__action--cluster,
    .fd-shellbar__action--theme {
        display: none !important;
    }
}

@media (max-width: 1070px) {
    .shellbar-hamburger {
        display: flex !important;
    }

    #main-shellbar .fd-shellbar__group--middle {
        display: none !important;
    }

    .fd-shellbar__action--user {
        display: none !important;
    }
}


