/********************************************
 * PROFILE PAGE — FORCE PUBLIC NAME VISIBLE 
 ********************************************/
body.page .pm-user-name span {
    opacity: 1 !important;
    visibility: visible !important;
}

/********************************************
 * SEARCH RESULTS — DO NOT HIDE ANYTHING
 ********************************************/
/* No hiding rules needed */

/* Center the More Filters checkboxes on ALL screens */
#advance_seach_ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 10px auto 0 auto !important;
    width: 100% !important;

    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px 20px !important;
}

#advance_seach_ul .pm-filter-item {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
}

#advance_seach_ul .pm-filter-item input {
    margin-right: 6px !important;
}

/* Override PG parent container forcing left alignment */
#advance_search_pane {
    text-align: center !important;
}

/* Mobile: fix search box height AND center Sort By row */
@media (max-width: 600px) {

    .pm-search-box.pm-dbfl.pm-pad10 {
        display: block !important;
        padding: 4px 8px !important;
        margin: 0 !important;
        border: none !important;
        height: auto !important;
        min-height: 0 !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    .pm-search-box.pm-dbfl.pm-pad10 input.pm-search-input.pm-advances-search-text {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 42px !important;
        padding: 8px 12px !important;
        margin: 0 0 10px 0 !important;
        box-sizing: border-box !important;
    }

    .pm-search-box.pm-dbfl.pm-pad10 > div[style*="gap: 10px"] {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        margin: 0 auto !important;
        width: auto !important;
    }

    .pm-search-box.pm-dbfl.pm-pad10 > div[style*="gap: 10px"] label {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        white-space: nowrap !important;
    }

    .pm-search-box.pm-dbfl.pm-pad10 > div[style*="gap: 10px"] select#nmcrafts-sort {
        margin: 0 !important;
        padding: 6px 10px !important;
        font-size: 14px !important;
    }
}

/* Hide ONLY the Group filter dropdown and its wrapper in Advanced Search */
#advance_search_pane .pm-search-box.pm-border,
#advance_search_group,
select[name="gid"] {
    display: none !important;
}

/* Make search + sort layout cleaner */
.pm-search-box-wrap .pm-search-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* Make the search input shrink so Sort By fits */
.pm-search-box-wrap .pm-search-input {
    flex: 1 1 250px;
    max-width: 100%;
}

/* Keep your custom Sort By wrapper aligned */
#nmcrafts-sort,
#nmcrafts-sort + label,
#nmcrafts-sort-wrapper {
    flex-shrink: 0;
}

/* Mobile: stack search + sort vertically */
@media (max-width: 600px) {
    .pm-search-box-wrap .pm-search-box {
        flex-direction: column;
        align-items: stretch;
    }

    .pm-search-box-wrap .pm-search-input {
        width: 100%;
    }

    #nmcrafts-sort {
        width: 100%;
    }
}