.dropdown-wrapper {
    position: relative;
    color: var(--ds-text, #292a2e);
}

.dropdown-trigger {
    appearance: none;
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--ds-text-subtle, #505258);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 32px;
    padding: 6px 8px 6px 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;

    &:hover {
        background-color: var(--ds-background-neutral-subtle-hovered, #091e4214);
    }

    &.active {
        background: var(--ds-background-selected, #E9F2FE);
        color: var(--ds-text-selected, #1868DB);
        border-color: var(--ds-text-selected, #1868DB);

        &:hover {
            background-color: var(--ds-background-selected-hovered, #253858);
            color: var(--ds-text-selected, #f4f5f7);
        }
    }
}

.dropdown-trigger-label {
    font-size: 14px;
    font-weight: 500;
}

.dropdown-trigger-icon {
    display: flex;
    align-items: center;

    .dropdown-chevron {
        width: 20px;
        height: 20px;
        color: currentColor;
    }
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    margin-top: 4px;
    border-radius: 8px;
    background-color: var(--ds-surface-overlay, #fff);
    box-shadow: var(--ds-shadow-overlay, 0 4px 8px #091e4226, 0 0 1px #091e424f);

    &.open {
        display: block;
    }
}

.dropdown-group {
    padding: 4px 0;
}

.dropdown-item {
    appearance: none;
    background: none;
    border: none;
    color: var(--ds-text, #292a2e);
    cursor: pointer;
    display: flex;
    align-items: center;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    padding: 6px 12px;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;

    &:hover {
        background-color: var(--ds-background-neutral-subtle-hovered, #091e4214);
    }

    &.active {
        background: var(--ds-background-selected, #E9F2FE);
        color: var(--ds-text-selected, #1868DB);
        font-weight: 500;

        &:hover {
            background: var(--ds-background-selected-hovered, #CCE0FF);
        }
    }
}

.dropdown-item-content {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.sort-button {
    .sort-icon {
        display: flex;
        align-items: center;
        padding: 4px;
        color: var(--ds-text-subtle, #505258);
    }

    .sort-asc,
    .sort-desc {
        display: none;
    }

    &:not(.asc):not(.desc):hover .sort-desc {
        display: inline-flex;
    }

    &.asc .sort-asc {
        display: inline-flex;
    }

    &.desc .sort-desc {
        display: inline-flex;
    }
}

.pagination {
    display: none;
    padding: 16px 12px;
    width: 100%;
    color: var(--ds-text, #292a2e);
    align-items: center;
    justify-content: center;
}

.pagination-pages {
    display: flex;
    color: var(--ds-text, #292a2e);
    margin: 0;
    padding: 0;
}

.pagination-nav,
.pagination-page,
.pagination-ellipsis {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
    font-style: normal;
    font-family: inherit;
    font-weight: 500;
    max-width: 100%;
    position: relative;
    text-align: center;
    text-decoration: none;
    transition: background 0.1s ease-out, box-shadow 0.15s cubic-bezier(0.47, 0.03, 0.49, 1.38);
    white-space: nowrap;
    cursor: pointer;
    padding: 0 2px;
    vertical-align: middle;
    background: transparent;
    color: var(--ds-text-subtle, #505258);
}

.pagination-ellipsis {
    cursor: auto;
}

.pagination-nav:hover,
.pagination-page:hover {
    background: var(--ds-background-neutral-subtle-hovered, #0515240F);
}

.pagination-nav:active {
    background: var(--ds-background-neutral-subtle-pressed, #0B120E24);
}

.pagination-page.active {
    background: var(--ds-background-selected, #E9F2FE);
    color: var(--ds-text-selected, #1868DB);
    border: 1px solid currentColor;
}

.pagination-nav:disabled {
    color: var(--ds-text-disabled, #080F214A);
    background-color: transparent;
    cursor: not-allowed;
    text-decoration: none;
}
