// (C) 2025 GoodData Corporation

@use "@gooddata/sdk-ui-kit/styles/scss/variables" as kit-variables;

.gd-automation-filters {
    width: 100%;

    &__wrapper {
        position: relative;

        &--disabled {
            pointer-events: none;
        }
    }

    &__overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.4);
        z-index: 1;
        pointer-events: none;
    }

    &__list {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        align-items: center;

        // Override for tab sections - nested to ensure higher specificity
        &--tabbed {
            flex-direction: column;
            gap: 0;
            align-items: stretch;
        }
    }

    &__message {
        color: var(--gd-palette-complementary-7);
        font-size: 12px;
        font-style: normal;
        font-weight: 400;
        line-height: 21px;
    }

    &__warning-message {
        color: kit-variables.$gd-palette-warning-base;
        font-size: 12px;
        font-style: normal;
        font-weight: 400;
        line-height: 21px;
        margin-top: 5px;
    }

    &__dropdown-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        background: kit-variables.$is-focused-background;

        h3 {
            color: kit-variables.$gd-color-state-blank;
            font-size: 11px;
            font-weight: bold;
            text-transform: uppercase;
            line-height: normal;
        }
    }

    &__dropdown-no-filters {
        margin: 12px;
        color: kit-variables.$gd-color-state-blank;
        text-align: center;
        line-height: 19px;
        font-size: 14px;
    }

    &__use-filters-checkbox {
        margin-top: 10px;

        .input-label-text {
            color: kit-variables.$gd-color-link;
            display: flex;

            .gd-ui-kit-tooltip__anchor {
                margin-left: 8px;
                margin-top: 2px;
            }
        }
    }

    &__checkbox-icon {
        position: relative;
        margin-left: 5px;
        top: 3px;
    }

    &__tab-section {
        display: flex;
        flex-direction: row;
        gap: 10px;
        align-items: flex-start;
        padding: 20px 0;
    }

    &__tab-header {
        display: flex;
        flex-direction: column;
        width: 140px;
        max-width: 140px;
        flex-shrink: 0;

        // Ensure all children respect the max width
        * {
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    }

    &__tab-label {
        color: var(--gd-palette-complementary-6);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        line-height: 16px;
        letter-spacing: 0.5px;
    }

    &__tab-title {
        font-size: 14px;
        font-weight: 400;
        line-height: 20px;
        display: block;
        max-width: 300px;
    }

    &__tab-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        align-items: center;
        flex: 1;
    }

    &__tab-divider {
        height: 1px;
        background-color: var(--gd-palette-complementary-3);
        width: 100%;
    }
}
