/* TB Job Board - Community jobs list + filters */
.tbjb-community-wrap {
    font-family: "Poppins", Sans-serif;
    display: flex;
    gap: 32px;
    max-width: 100%;
    margin: 0 auto;
    padding: 24px 16px;
    align-items: flex-start;
}

.tbjb-community-filters-trigger {
    display: none;
}

.tbjb-community-filters {
    flex: 0 0 320px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 24px;
}

.tbjb-community-filters-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.tbjb-community-filters-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1d2327;
}

.tbjb-community-filters-close {
    display: none;
    padding: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: #646970;
}

.tbjb-community-filters-close:hover {
    color: #1d2327;
}

/* Accordion */
.tbjb-community-filter-group.tbjb-accordion {
    margin-bottom: 16px;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    overflow: visible;
}

.tbjb-community-filter-group.tbjb-accordion:last-of-type {
    margin-bottom: 16px;
}

.tbjb-community-accordion-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    background: #fafafa;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
    border-radius: 10px 10px 0 0;
}

.tbjb-community-accordion-head svg{
    stroke: #4a9491;
}

.tbjb-community-filter-group.tbjb-accordion:not(.is-open) .tbjb-community-accordion-head {
    border-radius: 10px;
}

.tbjb-community-accordion-head:hover {
    background: #f0f9f8;
}

.tbjb-community-accordion-icon {
    flex-shrink: 0;
    color: #4a9491;
}

.tbjb-community-accordion-title {
    flex: 1;
}

.tbjb-community-accordion-chevron {
    flex-shrink: 0;
    color: #646970;
    transition: transform 0.2s;
}

.tbjb-community-filter-group.tbjb-accordion.is-open .tbjb-community-accordion-chevron {
    transform: rotate(180deg);
}

.tbjb-community-accordion-body {
    padding: 14px;
    background: #fff;
    border-top: 1px solid #e6e6e6;
    border-radius: 0 0 10px 10px;
    overflow: visible;
}

.tbjb-community-filter-group.tbjb-accordion:not(.is-open) .tbjb-community-accordion-body {
    display: none;
}

/* Custom select (date) */
.tbjb-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.tbjb-custom-select-wrap {
    position: relative;
}

.tbjb-custom-select {
    position: relative;
}

.tbjb-custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    color: #1d2327;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tbjb-custom-select-trigger:hover {
    border-color: #a7aaad;
}

.tbjb-custom-select.is-open .tbjb-custom-select-trigger {
    border-color: #52b7b5;
    box-shadow: 0 0 0 2px rgba(82, 183, 181, 0.2);
}

.tbjb-custom-select-chevron {
    flex-shrink: 0;
    margin-left: 8px;
    color: #646970;
    transition: transform 0.2s;
}

.tbjb-custom-select.is-open .tbjb-custom-select-chevron {
    transform: rotate(180deg);
}

.tbjb-custom-select-dropdown {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    max-height: 220px;
    overflow-y: auto;
}

.tbjb-custom-select-option {
    padding: 10px 14px;
    font-size: 14px;
    color: #1d2327;
    cursor: pointer;
    transition: background 0.15s;
}

.tbjb-custom-select-option:hover,
.tbjb-custom-select-option:focus {
    background: #f0f9f8;
    outline: none;
}

.tbjb-custom-select-option.is-selected {
    background: #e8f7f6;
    color: #52b7b5;
    font-weight: 500;
}

.tbjb-community-filter {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.tbjb-community-filter:focus {
    border-color: #52b7b5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(82, 183, 181, 0.2);
}

.tbjb-community-salary-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tbjb-community-salary-range .tbjb-community-filter {
    flex: 1;
    min-width: 0;
}

.tbjb-community-salary-sep {
    color: #646970;
    font-weight: 500;
}

.tbjb-community-salary-period {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    color: #555;
}

.tbjb-community-salary-period-label {
    font-weight: 500;
}

.tbjb-community-salary-period-option {
    display: inline-flex;
    align-items: center;
    position: relative;
}

.tbjb-community-salary-period-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tbjb-community-salary-period-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #d0d0d0;
    background: #fff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.tbjb-community-salary-period-text::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #c4c4c4;
    box-sizing: border-box;
    background: #fff;
}

.tbjb-community-salary-period-option input[type="radio"]:checked + .tbjb-community-salary-period-text {
    background: #52b7b5;
    border-color: #52b7b5;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(82, 183, 181, 0.25);
}

.tbjb-community-salary-period-option input[type="radio"]:checked + .tbjb-community-salary-period-text::before {
    border-color: #fff;
    background: #fff;
    box-shadow: inset 0 0 0 3px #52b7b5;
}

.tbjb-community-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tbjb-community-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #1d2327;
    cursor: pointer;
}

.tbjb-community-checkbox input {
    margin: 0;
    width: 18px;
    height: 18px;
    accent-color: #52b7b5;
}

.tbjb-community-reset {
    width: 100%;
    padding: 10px 16px;
    font-size: 14px;
    color: #52b7b5;
    background: transparent;
    border: 1px solid #52b7b5;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 10px;
}

.tbjb-community-reset:hover {
    background: #52b7b5;
    color: #fff;
}

.tbjb-community-apply {
    display: none;
}

/* List */
.tbjb-community-list {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tbjb-community-empty {
    margin: 0;
    padding: 32px;
    text-align: center;
    color: #646970;
}

/* Card */
.tbjb-job-card {
    background: #fff;
    border: 1px solid #52b7b7;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.tbjb-job-card:hover {
    border-color: #d0d0d0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.tbjb-job-card.tbjb-card-hidden {
    display: none !important;
}

.tbjb-job-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tbjb-job-card-link:hover .tbjb-job-card-title {
    color: #52b7b5;
}

.tbjb-job-card-inner {
    position: relative;
}

.tbjb-job-card-title {
    margin: 0 0 12px;
    font-size: 24px;
    font-family: "Poppins", Sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: #1d2327;
    transition: color 0.2s;
}

.tbjb-job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #50575e;
}

.tbjb-job-card-meta span:not(:first-child)::before {
    content: "";
    margin-right: 0;
    color: #a7aaad;
}

.tbjb-job-card-employment::before {
    content: "";
    display: inline-block;
    max-width: 6px;
    max-height: 6px;
    min-width: 6px;
    min-height: 6px;
    width: 6px;
    height: 6px;
    border-radius: 1000px;
    background-color: #52b7b7;
    margin-bottom: 2px;
    vertical-align: middle;
    position: relative;
    left: -8px;
}

.tbjb-job-card-conditions::before {
    content: "";
    display: inline-block;
    max-width: 6px;
    max-height: 6px;
    min-width: 6px;
    min-height: 6px;
    width: 6px;
    height: 6px;
    border-radius: 1000px;
    background-color: #52b7b7;
    margin-bottom: 2px;

    vertical-align: middle;
    position: relative;
    left: -8px;
}

.tbjb-job-card-experience::before {
    content: "";
    display: inline-block;
    max-width: 6px;
    max-height: 6px;
    min-width: 6px;
    min-height: 6px;
    width: 6px;
    height: 6px;
    border-radius: 1000px;
    background-color: #52b7b7;
    margin-bottom: 2px;
    vertical-align: middle;
    position: relative;
    left: -8px;
}

.tbjb-job-card-salary {
    font-weight: 600;
    color: #1d2327;
}

.tbjb-job-card-desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #50575e;
    margin-bottom: 0;
}

/* Mobile: bottom sheet + apply button */
@media (max-width: 768px) {
    .tbjb-community-wrap {
        flex-direction: column;
        padding: 16px 12px;
        padding-bottom: 80px;
    }

    .tbjb-community-filters-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        position: fixed;
        bottom: 12px;
        left: 0;
        right: 0;
        z-index: 100;
        width: calc(100vw - 40px);
        max-width: 100%;
        margin: 0 auto;
        height: 44px;
        padding: 0 24px;
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 0.02em;
        color: #fff;
        background: linear-gradient(180deg, #5dc4c2 0%, #52b7b5 50%, #48a8a6 100%);
        border: none;
        border-radius: 12px;
        cursor: pointer;
        box-shadow: 0 0px 24px rgba(82, 183, 181, 0.35), 0 -1px 0 rgba(0, 0, 0, 0.06);
        transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    }

    .tbjb-community-filters-trigger:hover {
        background: linear-gradient(180deg, #52b7b5 0%, #48a8a6 100%);
        box-shadow: 0 -6px 28px rgba(82, 183, 181, 0.4);
    }

    .tbjb-community-filters-trigger:active {
        transform: scale(0.98);
    }

    .tbjb-community-filters-trigger[aria-expanded="true"] {
        display: none;
    }

    .tbjb-community-filters {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99;
        flex: none;
        width: 100%;
        max-height: 0;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.15);
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .tbjb-community-filters.is-open {
        max-height: 80vh;
        top: auto;
        bottom: 0;
        min-height: 0;
        height: auto;
        max-height: 80vh;
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .tbjb-community-filters-inner {
        max-height: 80vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .tbjb-community-filters-header {
        flex-shrink: 0;
        padding: 16px 20px 0;
    }

    .tbjb-community-filters-close {
        display: block;
    }

    .tbjb-community-filters-inner .tbjb-community-filter-group {
        flex-shrink: 0;
    }

    .tbjb-community-filters-inner .tbjb-community-reset {
        flex-shrink: 0;
        margin-top: 4px;
    }

    .tbjb-community-filters-inner .tbjb-community-apply {
        display: block;
        flex-shrink: 0;
        width: calc(100vw - 40px);
        max-width: 100%;
        margin: 0 auto 20px;
        padding: 14px 20px;
        font-size: 16px;
        font-weight: 600;
        color: #fff;
        background: #52b7b5;
        border: none;
        border-radius: 10px;
        cursor: pointer;
    }

    .tbjb-community-filters-inner .tbjb-community-apply:hover {
        background: #45a29e;
    }

    .tbjb-community-filters-scroll {
        overflow-y: auto;
        overflow-x: hidden;
        flex: 1;
        min-height: 0;
        padding: 12px 20px 20px;
    }

    .tbjb-community-filters.is-open .tbjb-community-filters-inner {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .tbjb-job-card {
        padding: 18px;
    }

    .tbjb-job-card-title {
        font-size: 1.1rem;
    }
}
