.filter-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: #f7fafc;
    border: 1px solid #c1cddb;
    border-radius: 20px;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
}

.filter-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-width: 0;
    padding: 4px 0;
}

.filter-panel__title-wrap,
.filter-panel__actions,
.filter-panel__toggle {
    display: flex;
    align-items: center;
}

.filter-panel__title-wrap {
    gap: 16px;
    min-width: 0;
}

.filter-panel + .card-list {
    margin-top: 32px;
}

.filter-panel__title-icon {
    position: relative;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.filter-panel__title-icon img {
    position: absolute;
    left: 50%;
    display: block;
    height: 1.5px;
    transform: translateX(-50%);
}

.filter-panel__title-icon img:nth-child(1) {
    top: 6px;
    width: 19.5px;
}

.filter-panel__title-icon img:nth-child(2) {
    top: 11px;
    width: 11.5px;
}

.filter-panel__title-icon img:nth-child(3) {
    top: 16px;
    width: 3.5px;
}

.filter-panel__title {
    min-width: 0;
    margin: 0;
    color: #0f263b;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.filter-panel__actions {
    flex: 0 0 auto;
    gap: 16px;
}

.filter-panel__count {
    color: #0f263b;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    white-space: nowrap;
}

.filter-panel__clear,
.filter-panel__toggle {
    color: #004488;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
}

.filter-panel__clear {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.filter-panel__clear:hover,
.filter-panel__toggle:hover {
    background: transparent;
    color: #004488;
    text-decoration: none;
}

.filter-panel__toggle:hover {
    background: transparent;
    color: #004488;
}

.filter-panel__toggle {
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #37506e;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.filter-panel__toggle img {
    width: 16px;
    height: 16px;
    transition: transform 160ms ease;
}

.filter-panel:not(.is-collapsed) .filter-panel__toggle img {
    transform: rotate(180deg);
}

.filter-panel__content {
    display: block;
}

.filter-panel.is-collapsed .filter-panel__content {
    display: none;
}

.filter-panel__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-panel__fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.filter-panel--job-offers .filter-panel__title-wrap {
    flex: 1 1 auto;
}

.filter-panel--job-offers .filter-panel__toggle {
    margin-left: 24px;
}

.filter-panel--job-offers .filter-panel__fields {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 382px);
}

.filter-panel__field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.filter-panel__label {
    color: #080808;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.filter-panel__control {
    position: relative;
    min-width: 0;
}

.filter-panel__control input,
.filter-panel__control select,
.filter-panel__control .custom-dropdown__trigger {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 44px 0 12px;
    border: 1px solid #37506e;
    border-radius: 16px;
    background: #fbfbfb;
    color: #0f263b;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
}

.filter-panel__control .custom-dropdown {
    display: block;
    width: 100%;
}

.filter-panel__control .custom-dropdown__trigger {
    display: inline-flex;
    justify-content: space-between;
    gap: 12px;
    padding: 0 12px;
    border: 1px solid #37506e;
    border-radius: 16px;
    background: #fbfbfb;
    color: #0f263b;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 400;
}

.filter-panel__control .custom-dropdown__value {
    color: #0f263b;
    font-size: 16px;
    font-weight: 400;
}

.filter-panel__control .custom-dropdown__panel {
    top: 100%;
    right: 0;
    width: 100%;
    max-width: none;
}

.filter-panel__control input::placeholder {
    color: #516a87;
    opacity: 1;
}

.filter-panel__control select {
    appearance: none;
    cursor: pointer;
}

.filter-panel__control-icon {
    position: absolute;
    top: 50%;
    right: 12px;
    width: 24px;
    height: 24px;
    pointer-events: none;
    transform: translateY(-50%);
}

.filter-panel__control input:focus-visible,
.filter-panel__control select:focus-visible,
.filter-panel__control .custom-dropdown__trigger:focus-visible,
.filter-panel__clear:focus-visible,
.filter-panel__toggle:focus-visible,
.filter-panel__submit:focus-visible {
    outline: 3px solid #f2b84b;
    outline-offset: 2px;
}

.filter-panel__submit-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 16px;
}

.filter-panel__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border: 0;
    border-radius: 32px;
    background: #004488;
    color: #fbfbfb;
    font-family: "Nunito Sans", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
}

.filter-panel__submit-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    filter: brightness(0) invert(1);
}

.filter-panel__submit:hover {
    background: #003f7d;
}

@media (max-width: 900px) {
    .filter-panel__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .filter-panel__actions {
        width: 100%;
        justify-content: flex-end;
    }

    .filter-panel__fields {
        grid-template-columns: 1fr;
    }

    .filter-panel--job-offers .filter-panel__toggle {
        margin-left: 0;
    }
}

@media (max-width: 1100px) and (min-width: 901px) {
    .filter-panel__fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .filter-panel__actions {
        align-items: flex-start;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .filter-panel__submit-row {
        justify-content: stretch;
    }

    .filter-panel__submit {
        width: 100%;
    }
}
