// (C) 2026 GoodData Corporation

@use "./ParameterInput.scss";

.gd-ui-kit-parameter-control {
    &--dropdown {
        display: flex;
        flex-direction: column;
        width: 240px;
        background: var(--gd-palette-complementary-0);
        border-radius: 4px;
        box-shadow:
            0 8px 15px rgba(0, 0, 0, 0.08),
            0 2px 10px rgba(0, 0, 0, 0.1);
    }

    &--allowed-values {
        padding: 5px 0;

        // the flex column prevents the searchfield's bottom margin from collapsing with the
        // list's top margin (.gd-dropdown .gd-infinite-list); keep only the searchfield's
        &:has(.gd-list-searchfield) .gd-infinite-list {
            margin-top: 0;
        }
    }

    &__dropdown-field {
        padding: 10px;
    }

    &__dropdown-field-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 5px;
        font-size: 12px;
    }

    &__dropdown-label {
        color: var(--gd-palette-complementary-8);
        font-weight: 400;
    }

    &__dropdown-error {
        padding-top: 5px;
        color: var(--gd-palette-error-base);
        font-size: 12px;
    }

    &__dropdown-divider {
        height: 1px;
        margin: 10px;
        background-color: var(--gd-palette-complementary-3);
    }

    &__dropdown-preview {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 0 10px 10px;
        font-size: 12px;
    }

    &__dropdown-preview-label {
        color: var(--gd-palette-complementary-6);
    }

    &__dropdown-preview-text {
        color: var(--gd-palette-complementary-8);

        strong {
            font-weight: 700;
        }
    }

    &__dropdown-footer {
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        margin: 0 10px;
        padding: 10px 0;
        border-top: 1px solid var(--gd-palette-complementary-3);
    }
}
