:root {
    --iwf-brown: #302116;
    --iwf-gold: #a77e17;
    --iwf-text: #4f4945;
    --iwf-muted: #8a837e;
    --iwf-line: #e8e2dc;
    --iwf-white: #fff;
}

.iwf {
    width: 100%;
    color: var(--iwf-text);
    font-size: 14px;
}

.iwf__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    color: var(--iwf-brown);
    font-size: 18px;
    font-weight: 500;
    border-bottom: 1px solid var(--iwf-brown);
}

.iwf__count {
    display: inline-grid;
    width: 23px;
    height: 23px;
    place-items: center;
    color: var(--iwf-white);
    font-size: 11px;
    background: var(--iwf-gold);
    border-radius: 50%;
}

.iwf__group {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--iwf-line);
}

.iwf__group summary {
    position: relative;
    padding: 17px 24px 17px 0;
    color: var(--iwf-brown);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    list-style: none;
    cursor: pointer;
}

.iwf__group summary::-webkit-details-marker {
    display: none;
}

.iwf__group summary::before,
.iwf__group summary::after {
    position: absolute;
    top: 50%;
    right: 2px;
    width: 11px;
    height: 1px;
    content: "";
    background: var(--iwf-brown);
    transition: transform .2s ease;
}

.iwf__group summary::after {
    transform: rotate(90deg);
}

.iwf__group[open] summary::after {
    transform: rotate(0);
}

.iwf__options {
    display: grid;
    gap: 10px;
    max-height: 230px;
    padding: 0 0 18px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--iwf-line) transparent;
}

.iwf__option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    line-height: 1.45;
    cursor: pointer;
}

.iwf__option input {
    width: 16px;
    min-width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--iwf-gold);
}

.iwf__option span {
    color: var(--iwf-text);
    transition: color .2s ease;
}

.iwf__option:hover span,
.iwf__option:has(input:checked) span {
    color: var(--iwf-gold);
}

.iwf__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 22px;
}

.iwf__apply {
    min-height: 42px;
    padding: 10px 22px;
    color: var(--iwf-white);
    font: inherit;
    font-weight: 500;
    background: var(--iwf-brown);
    border: 1px solid var(--iwf-brown);
    border-radius: 0;
    cursor: pointer;
    transition: color .2s ease, background-color .2s ease;
}

.iwf__apply:hover {
    color: var(--iwf-brown);
    background: transparent;
}

.iwf__reset {
    color: var(--iwf-muted);
    font-size: 13px;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.iwf__reset:hover {
    color: var(--iwf-gold);
}

.iwf__mobile-toggle {
    display: none;
}

@media (max-width: 900px) {
    .iwf__mobile-toggle {
        display: flex;
        width: 100%;
        min-height: 46px;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 11px 16px;
        color: var(--iwf-brown);
        font: inherit;
        font-weight: 500;
        text-align: left;
        background: var(--iwf-white);
        border: 1px solid var(--iwf-line);
        cursor: pointer;
    }

    .iwf__toggle-icon {
        position: relative;
        width: 14px;
        height: 14px;
        margin-left: auto;
    }

    .iwf__toggle-icon::before,
    .iwf__toggle-icon::after {
        position: absolute;
        top: 50%;
        left: 0;
        width: 14px;
        height: 1px;
        content: "";
        background: var(--iwf-brown);
        transition: transform .2s ease;
    }

    .iwf__toggle-icon::after {
        transform: rotate(90deg);
    }

    .iwf.is-open .iwf__toggle-icon::after {
        transform: rotate(0);
    }

    .iwf__panel {
        display: none;
        padding: 20px 16px;
        border: 1px solid var(--iwf-line);
        border-top: 0;
    }

    .iwf.is-open .iwf__panel {
        display: block;
    }

    .iwf__heading {
        display: none;
    }
}

