.button {
    display: inline-block;
    padding: 0.5em 1.0em;
    background: #EEE;
    border: none;
    border-radius: 7px;
    background-image: linear-gradient(to bottom, hsla(0, 0%, 0%, 0), hsla(0, 0%, 0%, 0.2));
    color: #222;
    font-family: sans-serif;
    font-size: 16px;
    text-shadow: 0 1px white;
    cursor: pointer;
}

.button:hover {
    background-color: #8CF;
    text-shadow: 0 1px hsla(0, 0%, 100%, 0.5);
    color: #222;
}

.button:active,
.button.is-checked {
    background-color: #28F;
}

.button.is-checked {
    color: white;
    text-shadow: 0 -1px hsla(0, 0%, 0%, 0.8);
}

.button:active {
    box-shadow: inset 0 1px 10px hsla(0, 0%, 0%, 0.8);
}

/* ---- button-group ---- */

.button-group:after {
    content: '';
    display: block;
    clear: both;
}

.button-group .button {
    float: left;
    border-radius: 0;
    margin-left: 0;
    margin-right: 1px;
}

.sort-by-button-group .button:first-child {
    border-radius: 0.5em 0 0 0.5em;
}

.sort-by-button-group .button:last-child {
    border-radius: 0 0.5em 0.5em 0;
}

.reset-button-group .button {
    border-radius: 0.5em;
}

.filter-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25em;
}

.filter-dropdown {
    position: relative;
    display: block;
}

.filter-dropdown__toggle {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75em;
    padding: 0.55em 0.9em;
    border-radius: 0.5em;
    border: 1px solid rgba(34, 34, 34, 0.15);
    background-color: rgba(255, 255, 255, 0.95);
    color: #222;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-dropdown__toggle:after {
    content: '▾';
    font-size: 0.85em;
    line-height: 1;
    color: inherit;
}

.filter-dropdown__toggle:hover {
    border-color: #28F;
}

.filter-dropdown__toggle:focus-visible {
    outline: 2px solid #28F;
    outline-offset: 2px;
}

.filter-dropdown__menu {
    position: absolute;
    z-index: 20;
    margin-top: 0.4em;
    min-width: 100%;
    max-height: 16rem;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(34, 34, 34, 0.15);
    border-radius: 0.5em;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
    padding: 0.4em;
    display: none;
}

.filter-dropdown.is-open .filter-dropdown__menu {
    display: block;
}

.filter-dropdown__option {
    width: 100%;
    text-align: left;
    padding: 0.45em 0.65em;
    border-radius: 0.4em;
    border: none;
    background-color: transparent;
    color: #1f2937;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.filter-dropdown__option:hover {
    background-color: rgba(40, 136, 255, 0.12);
}

.filter-dropdown__option:focus-visible {
    outline: 2px solid #28F;
    outline-offset: 2px;
}

.filter-dropdown__option.is-active {
    background-color: #28F;
    color: #fff;
}

body.dark .filter-dropdown__toggle {
    background-color: rgba(30, 41, 59, 0.92);
    border-color: rgba(148, 163, 184, 0.35);
    color: #e5e7eb;
}

body.dark .filter-dropdown__menu {
    background-color: rgba(15, 23, 42, 0.98);
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 20px 35px rgba(2, 6, 23, 0.55);
}

body.dark .filter-dropdown__option {
    color: #e5e7eb;
}

body.dark .filter-dropdown__option:hover {
    background-color: rgba(59, 130, 246, 0.28);
}

body.dark .filter-dropdown__option.is-active {
    background-color: #60a5fa;
    color: #0f172a;
}

/* ---- isotope ---- */

/* clear fix */
.iso-grid:after {
    content: '';
    display: block;
    clear: both;
}

/* ui group */

.ui-group {
    display: block;
}

.ui-group label {
    display: block;
    margin-right: 0;
    margin-bottom: 0.2em;
    font-size: 16px;
}

.ui-group .button-group {
    display: inline-block;
    margin-right: 20px;
}

/* Grid Styles */

.iso-item {
    margin-bottom: 1em;
}

.iso-item div {
    width: 300px;
}

.is-paginated-hidden {
    display: none !important;
}

.iso-pagination .button[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
