body {
    background: black;
    color: white;
}

header {
    color: white;
    background: black;
    transition: none;
}

.search-header {
    border: 1px dashed black;
    margin: 20px;
}

.search-header input {
    background: none;
    border: 0;
    cursor: pointer;
    color: black;
    font-weight: bold;
    font-size: 20px;
    display: block;
    width: 100%;
    position: relative;
    background: white;
    padding: 20px;
    text-align: center;
}


aside {    
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: calc(100% - 40px);
    padding: 0px 20px;
    column-gap: 20px;
    row-gap: 10px;
    flex-wrap: wrap;
}


.filter-group {
    flex: 1;
    position: relative;
}

.accordiion {
    width: 100%;
    background: none;
    text-align: left;
    font-weight: 600;
    font-size: 15px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px dashed;
    border-color: var(--group-color); 
    color: var(--group-color);
    flex: 1;
}

.accordion::after {
    content: "▾";
    font-size: 12px;
    transition: transform 0.2s ease;
}

.accordion.open::after {
    transform: rotate(-180deg);
}

.accordiion div:first-child:not(.turn) {
    color: white;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    padding: 0px;
    width: calc(100% - 2px);
    position: absolute;
    background: white;
    background: var(--background-color);
    z-index: 1;


}

.accordion-content.open {
    max-height: 400px;
    overflow-y: auto;
    border: 1px dashed var(--group-color);
    border-top: none;
    margin-top: 0px;
}

.filter-parent {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    justify-content: space-between;
    background-color: var(--group-color);
    background-image: url('../content/border-invert.png');
    background-position: var(--bg-x) 68%;
    background-size: 1230px 161px;
    transition: background-position 0.2s;
}

.filter-parent:hover {
    background-position: var(--bg-x) 60%;
}

.filter-parent:has(.toggle-children.open), .filter-parent:has(.input[type="checkbox"]:checked) {
    background-position: var(--bg-x) 0%;
}

.filter-parent:has(.toggle-children.open) {
    position: sticky;
    top: 0px;
}


.toggle-children {
       background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    width: 40px;
    text-align: RIGHT;
    transition: transform 0.2s ease;
    color: inherit;
    padding: 0;
    flex: 1;
    align-self: start;
    padding-left: 20px;
}

.toggle-children.open .turn, button.open .turn {
    transform: rotate(90deg);
    width: fit-content;
    float: right;
}

.filter-children {
    border-bottom: 1px dashed var(--group-color);
    max-height: 0;
    background: black;
    overflow-y: hidden;
    transition: max-height 0.25s ease;
}

.accordion-content .filter-children:last-child {
    border: none;
}

.filter-children.open {
    max-height: 2500px;
    padding: 15px;
}

.filter-children {
    max-width: 100%;
}

label {
        display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
    color: white;
}

.filter-parent label {
    font-weight: bold;
}

input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--group-color);
    cursor: pointer;
}

.filter-parent input[type="checkbox"] {
    accent-color: black;
}

.filter-group.unique .filter-parent {
    border-bottom: 1px dashed;
}

.filter-group.unique .filter-parent:last-child {
    border: none;
}

.active-filters {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.active-filters a {
    color: white;
    width: max-content;
}

.header-example {
    display: flex;
    padding: 0px 20px;
    justify-content: space-between;
    align-items: center;
}

.header-example .title {
    font-size: clamp(20px, 4.3vh, 32px);
}

.header-example button {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    gap: 5px;
    cursor: pointer;
           box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    border: 1px dashed white;
}

.header-example button.active {
    background: black;
    color: white;
    cursor: default;
 
}

.examples.loading{
    opacity:.4;
    pointer-events:none;
}

#loadMore {
    width: calc(100% - 40px);
    padding: 20px;
    margin: 20px;
    margin-top: 0px;
    font-family: 'NeueHaasDisplay';
    font-size: 20px;
    border: 1px dashed black;
    font-weight: 700;
    cursor: pointer;
    filter: invert(1);
    z-index: 2;
    background-image: url('../content/border.png');
    background-color: #969696;
    background-position: 89px 0%;
    background-size: 1230px 227px;
    transition: background-position 0.2s;
}

#loadMore:hover {
        background-position: 89px 20%;
            filter: invert(0);

}

#svg {
    opacity: 0.15;
    z-index: 5;
}

footer.topborder::before {
    background: repeating-linear-gradient(
        to right,
        black 0 0px,
        transparent 15px 15px
    );
}

.choices {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex: 1;
}

.choice-chip {
    text-decoration: none;
    color: white;
    padding: 8px 10px 8px;
    background: black;
    display: flex;
    font-size: 12px;
    width: fit-content;
    border: 1px dashed white;
    cursor: pointer;
    text-align: left;
}

.choice-chip .parenting {
        font-weight: bold;
    width: max-content;
    /* display: inline; */
}

.choice-chip .remove {
    padding-left: 5px;
    margin-top: -2px;
}

.choice-chip[data-type="countries"], .choice-chip[data-type="geographies"], .choice-chip[data-type="areas"] {
    background: var(--areas-color);
}

.choice-chip[data-type="families"], .choice-chip[data-type="practices"]  {
    background: var(--families-color);
}

.choice-chip[data-type="laws"], .choice-chip[data-type="laws"]  {
    background: var(--legal-color);
}

.choice-chip[data-type="functions"] {
    background: var(--purposes-color);
}

@media screen and (max-width: 1080px) {

    aside {
        grid-template-columns: repeat(2, 1fr);
        column-gap: 10px;
    }
@media screen and (max-width: 980px) {

.header-example div:has(.toggle) {
    display: none;
}


@media screen and (max-width: 600px) {



aside {
        grid-template-columns: repeat(1, 1fr);
        column-gap: 10px;
}




.header-example {
           flex-direction: column;
    gap: 10px;
}


.active-filters {
    flex-direction: column;
}

}


}

}

@media screen and (min-width: 1921px) {

.accordiion, .search-header input, .header-example, #loadMore {
    font-size: 32px;
}

label, .choice-chip, .header-example button span, .active-filters a {
    font-size: 22px;
}

}