/* Overall container */
.facet-details {
    border-bottom: 1px solid var(--bs-gray-300);
    padding: 0;
}

.facet-details:first-of-type {
    border-top: 1px solid var(--bs-gray-300);
}

.facet-details:last-of-type {
    margin-bottom: 1rem;
}

/* Remove native marker */
.facet-details summary {
    list-style: none;
}

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

/* Header row */
.facet-details > .facet-details__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    padding: .5rem;
    cursor: pointer;
    user-select: none;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

/* Undo the global details hover fade */
.facet-details > .facet-details__summary:hover {
    opacity: 1;
}

/* Remove the global CSS chevron; facets use their own SVG icon */
.facet-details > .facet-details__summary::after {
    content: none;
}

/* Title styling */
.facet-details__title {
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #37475a;
}

/* Chevron */
.facet-details__icon > svg {
    transition: transform .2s ease;
}

.facet-details__icon {
    font-size: 1.25rem;
}

.facet-details[open] .facet-details__icon > svg {
    transform: rotate(180deg);
}

/* Body: undo the global answer padding and open margin */
.facet-details > :not(summary) {
    padding-right: 0;
}

.facet-details[open] > :last-child {
    margin-bottom: 0;
}

.facet-details .details-wrapper {
    padding: .25rem 1rem;
}

.facet-details .summary {
    display: none;
}