@use '@/styles/base';

.root {
    display: flex;
    flex-direction: column;
    gap: base.$gap-xs;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.label {
    font-size: base.$font-size-md;
    font-weight: base.$font-weight-md;
    user-select: none;
}

.description {
    font-size: base.$font-size-sm;
    font-weight: base.$font-weight-sm;
    color: base.$font-secondary-color;
    user-select: none;
}

.content {
    z-index: 10000;
    width: var(--radix-select-trigger-width);
    min-width: 8rem;
    max-height: 18rem;
    padding: var(--menu-padding);
    background-color: var(--menu-background-color);
    border: var(--menu-border);
    border-radius: var(--menu-border-radius);
    box-shadow: var(--menu-box-shadow);
}

.inner-content {
    display: flex;
    flex-direction: column;
    gap: var(--base-gap-xs);
    overflow: hidden;
}

.item {
    position: relative;
    display: flex;
    justify-content: space-between;
    min-width: 8rem;
    padding: var(--menu-item-padding);

    // padding-right: 2rem;

    // padding-left: 2rem;
    font-size: var(--menu-item-font-size);
    font-weight: var(--menu-item-font-weight);
    color: var(--menu-item-font-color);
    cursor: default;
    user-select: none;
    background-color: var(--menu-item-background-color);

    &:hover {
        color: var(--menu-item-hover-font-color);
        background-color: var(--menu-item-hover-background-color);
    }
}

.item[data-highlighted] {
    color: var(--menu-item-hover-font-color);
    background-color: var(--menu-item-hover-background-color);
}

.item.has-left-icon {
    padding-left: 2rem;
}

.item.has-right-icon {
    padding-right: 2rem;
}

.target {
    width: 100%;
}

.disabled {
    pointer-events: none;
    opacity: 0.5;
}

.item.selected {
    &::before {
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        content: '';
        background-color: base.$primary-color;
    }
}

.left-icon {
    position: absolute;
    top: 50%;
    left: 0;
    padding: 0 1rem 0 0.5rem;
    transform: translateY(-50%);
}

.right-icon {
    position: absolute;
    top: 50%;
    right: 0;
    padding: 0 0.5rem 0 1rem;
    transform: translateY(-50%);
}
