/* Games — navbar mobile (padrão utilsbr/tools) */

@media (min-width: 992px) {
    .topbar.navbar {
        flex-wrap: nowrap;
    }

    .three-bars {
        display: none !important;
    }

    .navbar-collapse {
        display: flex !important;
        flex: 1 1 auto;
        min-width: 0;
        order: 2;
    }

    .navbar-utils-end {
        order: 3;
    }

    .navbar-nav {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 991.98px) {
    .topbar.navbar {
        gap: 0;
        height: auto;
        min-height: var(--shell-topbar-h);
        padding: 0 12px;
    }

    .navbar-collapse {
        display: none;
        padding: 0;
        border-top: 1px solid var(--border);
        margin-top: 8px;
    }

    .navbar-collapse.show {
        display: block;
        padding-bottom: 8px;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        overflow: visible;
        width: 100%;
        gap: 0;
        flex: none;
        justify-content: flex-start;
    }

    .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar-nav .nav-link,
    .navbar-nav > .nav-item > a.nav-link {
        width: 100%;
        justify-content: center;
        padding: 10px 12px;
        box-sizing: border-box;
    }

    .nav-item--dropdown {
        width: 100%;
    }

    .nav-item--dropdown .dropdown--split {
        width: 100%;
    }

    .nav-item--dropdown .dropdown-split {
        width: 100%;
        justify-content: center;
    }

    .nav-item--dropdown .dropdown-split__link {
        flex: 1;
        justify-content: center;
        padding: 10px 12px;
    }

    .nav-item--dropdown .dropdown-split__toggle {
        padding: 10px 14px;
    }

    /* Wiki dropdown — empilhado no menu mobile */
    .nav-item--dropdown .dropdown-content {
        position: static;
        transform: none;
        visibility: hidden;
        opacity: 1;
        max-height: 0;
        overflow: hidden;
        border: none;
        box-shadow: none;
        padding: 0;
        transition: max-height .2s ease;
        pointer-events: auto;
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .nav-item--dropdown .dropdown-content::before {
        display: none;
    }

    .nav-item--dropdown .dropdown.is-open .dropdown-content {
        visibility: visible;
        max-height: 480px;
        overflow-y: auto;
        margin-top: 2px;
        margin-bottom: 4px;
        border-radius: 8px;
        background: var(--hover-tint);
        border: 1px solid var(--border);
    }

    .nav-item--dropdown .dropdown:hover .dropdown-content {
        visibility: hidden;
        max-height: 0;
    }

    .nav-item--dropdown .dropdown.is-open:hover .dropdown-content {
        visibility: visible;
        max-height: 480px;
    }

    .nav-item--dropdown .dropdown-content a {
        padding: 10px 16px;
        text-align: left;
    }

    .topbar-user {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
