.custom-select {
    position: relative;
}

.custom-select__option.is-focused {
    background: var(--color-blue);
    color: #fff;
    outline: none;
}

.custom-select__option.is-focused.is-selected {
    background: var(--color-blue);
    color: #fff;
}

.custom-input input {
    width: 100%;

    &::placeholder {
        color: #9ca3af;
    }
}

.custom-input input,
.custom-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.375rem;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.2s;
    font-size: 1rem;
}

.custom-select.is-open .custom-select__trigger {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.custom-select__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
    /* important: prevents flex blowout */
}

.custom-select__tag {
    flex: 1 1 64px;
    /* grow, shrink, min-basis of 100px */
    max-width: 100%;
    /* allow full width when alone */
    min-width: 64px;
    /* hard floor before wrapping */

    align-content: center;
    align-items: center;
    padding: 0.125rem 1.5rem 0.125rem 0.5rem;
    background: var(--color-blue);
    color: #fff;
    border-radius: 7px;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
}

.custom-select__placeholder {
    color: #9ca3af;
}

.custom-select__tag button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    justify-content: center;
    background: none;

    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}

.custom-select__tag button:hover {
    opacity: 1;
}

.custom-select__arrow {
    display: flex;
    align-items: center;
    color: #000;
    flex-shrink: 0;
}

.custom-select__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
}

.custom-select__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.875rem;
    cursor: pointer;
    font-size: 0.9rem;
    white-space: nowrap;
    gap: 8px;
}

.custom-select__option:hover {
    background: var(--color-blue);
}

.custom-select__option.is-selected {
    background: color-mix(in srgb, var(--color-blue) 25%, transparent);
}

.custom-select__count {
    font-size: 0.5rem;
    padding: 2px 4px;
    font-weight: bold;
    color: #fff;
    background: var(--color-blue);
    border-radius: 4px;
    min-width: 1.6em;
    height: 1.6em;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.custom-select__clear {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    border: none;
    border-radius: 50%;
    color: var(--color-blue);
    cursor: pointer;
    transition: color 0.15s;
    background: none;
}

.custom-select__clear:hover {
    /*background: #ef4444;*/
    color: #ef4444;
}

.custom-select__search {
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    min-width: 80px;
    flex: 1;
    padding: 0.125rem 0.25rem;
    color: var(--color-text-primary, #111);
    line-height: 1.5;
    min-height: unset;
    height: auto;
    /* override the shared trigger/input styles that add border+radius */
    border-radius: 0;
    cursor: text;
}

.custom-select__search::placeholder {
    color: #9ca3af;
}

.custom-select__trigger {
    cursor: text;
}

.job-filter {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.66rem;
    flex-direction: column;

    .custom-select__trigger:focus-within,
    input:focus {
        border-color: var(--color-blue);
        border-width: 1px;
        outline: none;
        box-shadow: none;
    }
}

.job-filter__group {
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Reset browser defaults */
.job-filter__group select {
    appearance: none;
    -webkit-appearance: none;

    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background-color: #fff;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    color: #111;
    cursor: pointer;
    line-height: 1.5;

    /* Custom chevron via SVG background */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23197FC3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;

    /* Transitions */
    transition: border-color 0.2s, box-shadow 0.2s;
}


.job-filter__group select:focus {
    outline: none;
    border-color: var(--color-blue);
}

.job-filter__selects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;

    /* mobile */
    @media (max-width: 990px) {
        grid-template-columns: 1fr;
    }

    /* desktop */
    @media (min-width: 991px) {}

    label {
        font-size: 12px;
        padding-bottom: 4px;
        font-weight: 600;
    }
}

.job-item {
    position: relative;
    padding: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    border-radius: 5px;
}

.job-badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--color-blue);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 4px;
    z-index: 1;
    pointer-events: none;
}

.job-item:hover {
    background-color: #f5f5f5;
    cursor: pointer;
}

.job-item i {
    margin-right: 5px;
    color: var(--color-blue);
}

.job-item-wrap a:hover {
    text-decoration: none !important;
}