/* Lelekwe ERP V14.3 - Production UI hardening */
html,
body,
body *,
body *::before,
body *::after,
.fi-body *,
.fi-body *::before,
.fi-body *::after,
.fi-layout *,
.fi-layout *::before,
.fi-layout *::after,
.fi-main *,
.fi-main *::before,
.fi-main *::after,
.fi-topbar *,
.fi-topbar *::before,
.fi-topbar *::after,
.fi-sidebar *,
.fi-sidebar *::before,
.fi-sidebar *::after,
.fi-modal *,
.fi-modal *::before,
.fi-modal *::after,
.fi-dropdown *,
.fi-dropdown *::before,
.fi-dropdown *::after,
[class*="rounded"] {
    border-radius: 0 !important;
}


/* Penzi-parity Universal Search topbar placement */
.fi-topbar,
.fi-topbar nav,
.fi-topbar-start,
.fi-topbar-end {
    overflow: visible !important;
}

.fi-topbar-start {
    min-width: 0 !important;
    flex: 0 1 auto !important;
}

.fi-topbar-end {
    flex: 0 0 auto !important;
    margin-inline-start: auto !important;
}

.lelekwe-global-search-hook {
    width: min(29rem, 38vw);
    min-width: 17rem;
    margin-inline: 0.5rem;
}

@media (max-width: 1280px) {
    .lelekwe-global-search-hook {
        width: min(24rem, 32vw);
        min-width: 15rem;
    }
}

@media (max-width: 1024px) {
    .lelekwe-global-search-hook {
        width: 18rem;
        min-width: 13rem;
        margin-inline: 0.25rem;
    }
}

@media (max-width: 768px) {
    .fi-topbar { height: auto !important; }

    .fi-topbar nav {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto auto !important;
        grid-template-rows: auto auto !important;
        align-items: center !important;
        column-gap: .5rem !important;
        row-gap: .625rem !important;
        height: auto !important;
        min-height: 0 !important;
        padding-block: .625rem !important;
    }

    .fi-topbar nav > .fi-topbar-open-sidebar-btn,
    .fi-topbar nav > .fi-topbar-close-sidebar-btn {
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: start !important;
        margin: 0 !important;
    }

    .fi-topbar nav > div.ms-auto {
        grid-column: 3 !important;
        grid-row: 1 !important;
        justify-self: end !important;
        align-self: center !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-inline-start: 0 !important;
        flex-wrap: nowrap !important;
    }

    .fi-topbar nav > div.ms-auto + * {
        grid-column: 4 !important;
        grid-row: 1 !important;
        justify-self: end !important;
        align-self: center !important;
        margin: 0 !important;
    }

    .fi-topbar nav > .lelekwe-global-search-hook {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        display: block !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
    }

    .lelekwe-global-search-hook,
    .lelekwe-global-search-hook > *,
    .lelekwe-global-search-hook form,
    .lelekwe-global-search-hook .fi-input-wrp,
    .lelekwe-global-search-hook input {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }
}

@media (max-width: 520px) {
    .fi-topbar nav { padding-inline: .75rem !important; }
    .fi-topbar nav > div.ms-auto { max-width: calc(100vw - 4.5rem) !important; }
}
