/* EduBridge listing filters: mobile UX and clarity improvements */

.listin-filters-sidebar .jobsearch-checkbox li label {
    cursor: pointer;
}

.listin-filters-sidebar .jobsearch-checkbox li > label,
.listin-filters-sidebar .jobsearch-checkbox li > .jobsearch-checkbox-label {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}

/* Reduce repeated clear links inside each location field */
.listin-filters-sidebar .jobsearch-profile-select a.clear_filter {
    display: none;
}

.listin-filters-sidebar .jobsearch-search-filter-wrap {
    border-radius: 8px;
}

/* Restricted listing notice: keep inline Login CTA from becoming oversized */
.restrict-candidate-sec h2 .jobsearch-open-signin-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 1.2;
    padding: 8px 12px;
    margin-left: 8px;
    border-radius: 6px;
    vertical-align: middle;
}

.restrict-candidate-sec h2 .jobsearch-open-signin-tab i {
    font-size: 13px;
    line-height: 1;
}

@media (max-width: 480px) {
    .mobfiltrs-openrbtn-con {
        left: 12px;
        top: auto;
        bottom: 18px;
        z-index: 10002;
        pointer-events: auto;
    }

    .mobfiltrs-openrbtn-con a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        height: 52px;
        border-radius: 999px;
        background-color: #3a2061;
        color: #fff;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
        padding: 0;
        float: none;
        font-size: 20px;
        pointer-events: auto;
    }

    .listin-filters-sidebar {
        width: min(92vw, 340px) !important;
        left: -110%;
        padding: 12px !important;
        overflow-y: auto;
        overflow-x: hidden;
        box-shadow: 20px 0 42px rgba(0, 0, 0, 0.28);
    }

    .listin-filters-sidebar::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.38);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.24s ease;
        z-index: -1;
        pointer-events: none;
    }

    .listin-filters-sidebar.active-filters-con {
        left: 0;
        padding-top: 55px !important;
    }

    .admin-bar .listin-filters-sidebar.active-filters-con {
        top: 32px;
    }

    .listin-filters-sidebar.active-filters-con::before {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    a.close-listin-mobfiltrs {
        top: 10px;
        right: 10px;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
        color: #374151;
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
        z-index: 3;
    }

    .listin-filters-sidebar .jobsearch-search-filter-wrap:first-child {
        padding-right: 44px !important;
    }

    .listin-filters-sidebar .jobsearch-search-filter-wrap {
        margin-bottom: 8px;
    }

    .listin-filters-sidebar .jobsearch-fltbox-title a,
    .listin-filters-sidebar .jobsearch-checkbox li label {
        font-size: 15px;
    }

    .listin-filters-sidebar .jobsearch-checkbox li {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .listin-filters-sidebar .jobsearch-checkbox li > label {
        width: calc(100% - 38px);
        line-height: 1.35;
    }

    .listin-filters-sidebar .filter-post-count {
        min-width: 28px;
        text-align: right;
    }

    /* Mobile listing cards: improve title readability and reduce cramped wrapping */
    .jobsearch-employer-list .jobsearch-table-row {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        grid-template-areas:
            "logo title"
            "actions actions";
        align-items: center;
        gap: 10px;
    }

    .jobsearch-employer-list .jobsearch-table-cell {
        width: auto;
        min-width: 0;
    }

    .jobsearch-employer-list .jobsearch-table-cell:first-child {
        grid-area: logo;
    }

    .jobsearch-employer-list .jobsearch-table-cell:nth-child(2) {
        grid-area: title;
    }

    /* Desktop layout uses this as a spacer/team-size column, it breaks mobile alignment. */
    .jobsearch-employer-list .jobsearch-table-cell:nth-child(3) {
        display: none;
    }

    .jobsearch-employer-list .jobsearch-table-cell:last-child {
        grid-area: actions;
        width: 100%;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }

    .jobsearch-employer-list .jobsearch-table-cell figure {
        margin: 0;
    }

    .jobsearch-employer-list .jobsearch-table-cell figure img {
        width: 76px;
        height: 76px;
        object-fit: cover;
    }

    .jobsearch-employer-list .jobsearch-pst-title a {
        word-break: normal;
        overflow-wrap: anywhere;
        line-height: 1.35;
    }

    .jobsearch-employer-list .jobsearch-pst-title {
        margin: 0;
    }

    .jobsearch-employer-list .jobsearch-employer-list-btn,
    .jobsearch-employer-list .jobsearch-employer-followin,
    .jobsearch-employer-list .jobsearch-employer-followin-btn {
        margin-top: 0;
        min-height: 36px;
    }

    .jobsearch-candidate-default-wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        text-align: center;
    }

    .jobsearch-candidate-default-wrap .jobsearch-candidate-default-text {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .jobsearch-candidate-default-wrap .jobsearch-candidate-default-left {
        width: 100%;
    }

    .jobsearch-candidate-default-wrap .jobsearch-pst-title {
        margin-bottom: 6px;
    }

    .jobsearch-candidate-default-wrap .jobsearch-pst-title a {
        overflow-wrap: anywhere;
        line-height: 1.35;
    }

    .jobsearch-candidate-default-wrap .jobsearch-candidate-default-left ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .jobsearch-candidate-default-wrap .jobsearch-candidate-default-btn {
        margin-top: 0;
        min-height: 36px;
    }

    body.edubridge-filters-open {
        overflow: hidden;
        touch-action: none;
    }

    .restrict-candidate-sec h2 .jobsearch-open-signin-tab {
        margin-top: 10px;
        margin-left: 0;
    }
}
