/* ABC2 MediaWiki shell additions v26.07.13.6 */
.abc2mw-space-chooser-item {
    position: relative;
}

.abc2mw-space-chooser-trigger {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.abc2mw-space-chooser-panel {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 10050;
    width: min(420px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, .14);
    border-radius: 6px;
    background: var(--background1, #fff);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.abc2mw-space-chooser-panel[hidden] {
    display: none !important;
}

.abc2mw-space-chooser-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.abc2mw-space-chooser-search {
    min-width: 0;
    flex: 1 1 auto;
    height: 36px;
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, .22);
    border-radius: 4px;
    background: var(--background1, #fff);
    color: inherit;
    font: inherit;
}

.abc2mw-space-chooser-search:focus {
    outline: 2px solid color-mix(in srgb, currentColor 25%, transparent);
    outline-offset: 1px;
}

.abc2mw-space-directory-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 1px solid rgba(0, 0, 0, .18);
    border-radius: 4px;
    text-decoration: none;
}

.abc2mw-space-directory-link .abc2mw-action-svg-icon {
    width: 18px;
    height: 18px;
}

.abc2mw-space-chooser-status {
    min-height: 20px;
    padding: 7px 2px 4px;
    font-size: 12px;
    opacity: .72;
}

.abc2mw-space-chooser-results {
    max-height: min(430px, 56vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.abc2mw-space-result {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 8px 6px;
    border-radius: 4px;
    color: inherit;
    text-decoration: none;
}

.abc2mw-space-result:hover,
.abc2mw-space-result:focus {
    background: rgba(0, 0, 0, .06);
    text-decoration: none;
}

.abc2mw-space-result-image,
.abc2mw-space-result-acronym {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 4px;
}

.abc2mw-space-result-image {
    object-fit: cover;
}

.abc2mw-space-result-acronym {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .09);
    font-size: 12px;
    font-weight: 700;
}

.abc2mw-space-result-body {
    min-width: 0;
    flex: 1 1 auto;
}

.abc2mw-space-result-title,
.abc2mw-space-result-description {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.abc2mw-space-result-title {
    font-weight: 600;
    white-space: nowrap;
}

.abc2mw-space-result-description {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.3;
    opacity: .72;
}

@media (max-width: 767px) {
    .abc2mw-space-chooser-panel {
        position: static;
        width: 100%;
        margin-top: 2px;
        box-shadow: none;
    }
}

/* ==========================================================================
   ABC2MediaWiki 26.07.13.6: HumHub-aligned main and mobile menus
   ========================================================================== */
.abc2mw-menu-list > .abc2mw-menu-item > .abc2mw-menu-link {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    min-width: 48px !important;
    padding: 4px 6px !important;
    line-height: 1.05 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.abc2mw-menu-list > .abc2mw-menu-item > .abc2mw-menu-link .abc2mw-menu-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    min-width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
}

.abc2mw-menu-list > .abc2mw-menu-item > .abc2mw-menu-link .abc2mw-menu-icon svg {
    display: block !important;
    width: 19px !important;
    height: 19px !important;
}

.abc2mw-menu-list > .abc2mw-menu-item > .abc2mw-menu-link .abc2mw-menu-label {
    display: block !important;
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.05 !important;
}

.abc2mw-mobile-footer {
    display: none;
}

@media (max-width: 767px) {
    body.abc2mw-has-mobile-footer {
        padding-bottom: 58px !important;
    }

    .abc2mw-mobile-footer {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 10040;
        display: block !important;
        min-height: 54px;
        padding: 2px 4px max(2px, env(safe-area-inset-bottom));
        border-top: 1px solid rgba(0, 0, 0, .16);
        background: var(--background1, #fff);
        box-shadow: 0 -2px 8px rgba(0, 0, 0, .10);
    }

    .abc2mw-mobile-footer-inner,
    .abc2mw-mobile-footer .abc2mw-menu-list {
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
    }

    .abc2mw-mobile-footer .abc2mw-menu-list {
        display: flex !important;
        flex-flow: row nowrap !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        list-style: none !important;
    }

    .abc2mw-mobile-footer .abc2mw-menu-list > .abc2mw-menu-item {
        position: static !important;
        display: flex !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .abc2mw-mobile-footer .abc2mw-menu-list > .abc2mw-menu-item > .abc2mw-menu-link {
        display: flex !important;
        flex: 1 1 auto !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 1px !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 50px !important;
        padding: 3px 1px !important;
        border: 0 !important;
        background: transparent !important;
        color: inherit !important;
        text-decoration: none !important;
        overflow: hidden !important;
    }

    .abc2mw-mobile-footer .abc2mw-menu-icon,
    .abc2mw-mobile-footer .abc2mw-menu-icon svg {
        width: 18px !important;
        min-width: 18px !important;
        height: 18px !important;
    }

    .abc2mw-mobile-footer .abc2mw-menu-label {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        font-size: 9px !important;
        line-height: 1.05 !important;
        text-align: center !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .abc2mw-mobile-footer .abc2mw-submenu,
    .abc2mw-mobile-footer .abc2mw-submenu-toggle {
        display: none !important;
    }

    .abc2mw-mobile-footer .abc2mw-space-chooser-panel {
        position: fixed !important;
        right: 8px !important;
        bottom: calc(58px + env(safe-area-inset-bottom)) !important;
        left: 8px !important;
        top: auto !important;
        width: auto !important;
        max-height: min(520px, calc(100vh - 86px)) !important;
        overflow: hidden !important;
    }

    .abc2mw-mobile-footer .abc2mw-space-chooser-results {
        max-height: min(420px, calc(100vh - 170px)) !important;
    }
}
