// /**
//  * DISCLAIMER
//  *
//  * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
//  * versions in the future.
//  *
//  *
//  * @category  Smile
//  * @package   Smile\ElasticsuiteAnalytics
//  * @author    Richard BAYET <richard.bayet@smile.fr>
//  * @copyright 2020 Smile
//  * @license   Open Software License ("OSL") v. 3.0
//  */

.smile_elasticsuite_analytics-search-usage {

    .dashboard-item-title {
        position: relative;

        .tooltip {
            margin-top: inherit;
        }

        .admin__field-action-export {
            position: absolute;
            right: 0;

            .copy-feedback-text {
                font-size: 0.9em;
                color: #79a22e;
                opacity: 0;
                transition: opacity 0.3s ease;
            }

            &.show .copy-feedback-text {
                opacity: 1;
            }

            &:after {
                content: '\e635';
                display: inline-block;
                font-size: 2.2rem;
                font-weight: normal;
                color: #514943;
                font-family: 'Admin Icons';
                line-height: 1;
                vertical-align: middle;
                margin-left: 5px;
                overflow: hidden;
                cursor: pointer;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
            }

            &:hover {
                text-decoration: none;
            }
        }
    }

    .dashboard-item-help {
        display: none;
    }

    .dashboard-totals-list {
        .dashboard-totals-item {
            width: 10%;
            text-align: center
        }
    }

    .admin__table-primary {
        &.dashboard-data {
            &.terms-report {
                .extra {
                    display: none;
                }

                .data-grid-th {
                    white-space: nowrap;
                }

                tbody {
                    tr:last-child {
                        td {
                            border-bottom-color: @table-td__border-color;
                        }
                    }

                    .col-search-query {
                        text-overflow: ellipsis;
                        overflow: clip;
                        width: 90%;
                        max-width: 0;
                        white-space: nowrap;
                    }

                    .col-number {
                        text-align: right;
                    }
                }

                tfoot {
                    background: none;
                    font-weight: inherit;
                }
            }
        }
    }

    .page-main-actions {
        display: block;
    }

    .tooltip {
        margin-right: 4rem;
    }

    .customer-group-selector {
        color: #41362f;
        float: left;
        font-size: 1.3rem;
        margin-top: .59rem;
        margin-right: 2rem;
    }

    .customer-group-selector label {
        margin-right: 1rem;
        font-weight: 700;
    }

    .customer-company-selector {
        color: #41362f;
        float: left;
        font-size: 1.4rem; // select text only - the label below sets its own font-size
        margin-top: .59rem;
    }

    // Reused (via the fieldset's additionalClasses) to collapse the ui_component's standard
    // vertical-form wrapper divs into the same compact inline layout as the rule above.
    .customer-company-selector.fieldset-wrapper {
        display: inline-block;
        vertical-align: middle;

        .admin__fieldset-wrapper-content,
        .admin__fieldset {
            display: inline-block;
            margin: 0;
            padding: 0;
            border: none;
        }

        .admin__field {
            display: flex;
            align-items: center;
            margin: 0;
        }

        .admin__field-label {
            margin: 0;
            width: auto; // core's 25%-width rule clips "Company:" under our auto-sized layout
            margin-left: 0;
            white-space: nowrap;
            flex-shrink: 0; // flex items shrink by default, which was wrapping the label text

            label {
                margin: 0 1rem 0 0; // matches .customer-group-selector label's spacing
                font-weight: 700;
                font-size: 1.3rem;

                span {
                    white-space: nowrap; // core's span rule otherwise wraps "Company:"
                }
            }
        }

        .admin__field-control {
            width: auto;
            min-width: 28rem; // the dropdown panel's width tracks this
            margin-left: 0; // core's 30px gutter, unwanted in this inline layout

            .admin__action-multiselect-text {
                line-height: 1.9rem; // matches the arrow button's fixed 32px height
            }
        }
    }

    .page-actions-inner {
        margin-top: .59rem;
    }
}

/* Adjustments for M137 Admin Theme */
.m137-admin-theme {
    &.smile_elasticsuite_analytics-search-usage {
        ._has-datepicker.admin__control-text {
            width: 15rem;
        }

        .dashboard-main.col-m-11 {
            width: 100%;
            left: 0;
            margin-bottom: 1.6rem;
        }

        .dashboard-secondary.col-m-6,
        .dashboard-main.col-m-4 {
            width: 50%;
            left: 0;
        }

        .dashboard-item-content {
            overflow-y: hidden;
        }
    }
}
