@import '../../../styles/variables';

$query-bar-button-width: 240px;

@mixin activeButton {
    color: $bdl-box-blue;
    font-weight: bold;
    border: 1px solid $bdl-box-blue;

    .fill-color {
        fill: $bdl-box-blue;
    }

    path {
        fill: $bdl-box-blue;
    }
}

@mixin dropdownFooter {
    display: flex;
    padding: 15px;
    border-top: 1px solid $bdl-gray-10;
}

.metadata-view-query-bar {
    display: flex;
    padding: 5px;
    background: $bdl-gray-02;
    border: 1px solid $bdl-gray-05;
    border-radius: $bdl-border-radius-size;

    .button-container {
        display: flex;
        flex: 1;

        .button-icon {
            width: 16px;
            height: 16px;
            margin: 3px 10px 0 0;
        }
    }
}

.query-bar-button {
    width: $query-bar-button-width;

    &.is-active {
        @include activeButton;
    }

    .icon-caret-down {
        margin-left: 4px;
    }

    .button-label {
        flex: 10;
        padding-left: 5px;
        overflow: hidden;
        line-height: 20px;
        letter-spacing: normal;
        text-align: left;
        text-overflow: ellipsis;
    }

    .crawler.loading-indicator {
        height: 10px;
    }
}

.flyout-overlay.query-bar-template-dropdown-flyout {
    .overlay {
        width: $query-bar-button-width;
    }

    .metadata-instance-editor-template-message {
        width: 100%;
    }

    .template-dropdown-list-title {
        display: flex;
        padding-top: 5px;
        padding-bottom: 0;
        padding-left: 17px;
        color: $bdl-gray-50;
        font-size: 10px;
        letter-spacing: 0.6px;
    }

    .template-display-name {
        padding-left: 5px;
    }
}

.flyout-overlay.query-bar-filter-dropdown-flyout {
    &::before {
        display: none;
    }

    .overlay {
        padding: 0;
    }

    .filter-button-dropdown {
        width: 625px;

        .filter-button-dropdown-header {
            padding: 20px;
        }

        .filter-button-dropdown-footer {
            @include dropdownFooter;

            justify-content: space-between;

            .apply-filters-button {
                color: $white;
                background-color: $bdl-box-blue;
                border: none;
                border-radius: $bdl-border-radius-size-med;
            }
        }
    }
}

.flyout-overlay.query-bar-column-dropdown-flyout {
    .overlay {
        padding: 0;
    }

    .column-button-dropdown {
        .column-button-dropdown-header {
            width: 100%;
            height: 50%;

            .checkbox-container {
                margin: inherit;
            }
        }

        .column-button-dropdown-footer {
            @include dropdownFooter;

            justify-content: flex-end;
        }

        .draggable-list-example {
            width: $query-bar-button-width;
            padding: 15px;

            .draggable-list {
                padding-bottom: 10px;
            }
        }
    }
}
