// analytics.scss
// Styling for analytics page, and analytics functionalities
// ----------------------------------------------------------------------------------------
@import '~mixins.scss';
@import '~variables.scss';
@import '~animation.scss';

.report-page-container {
    .report-content {
        position: absolute;
        left: 300px;
        right: 0;
        top: 0;
        bottom: 0;
        overflow-y: auto;
        padding: 18px;
        background-color: #F8F8F8;
    }
}

.report-page-header {
    display: flex;
    position: relative;
    background-color: $sd-background;
    @include box-sizing(border-box);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 0 0 rgba(0, 0, 0, 0.1);
    width: 100%;
    padding: 10px;
}

.panel-selector {
    margin-top: 20px;
    margin-bottom: 10px;
    width: 100%;
    button {
        width: 48%;
    }
}

.save-activity-report {
    margin-top: 20px;
    margin-bottom: 10px;
    width: 100%;
    button {
        width: 48%;
    }
}

.report-parameters {
    .keywords {
        @include clearfix();
    }
}

.es-highlight {
    background-color: rgba(255, 61, 61, 0.25);
}

.saved-reports__group-title {
    padding: 25px;
    font-weight: 500;
    line-height: 100%;
    text-align: center;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: #8A8A8A;
}

.sd-analytics {
    .sd-column-box__main-column__items {
        height: calc(100vh - (4.8rem + 4.8rem + 30px)) !important;
    }

    textarea {
        height: unset !important;
    }

    // Required to make the SelectMetaTermsInput the same as the
    // UI prototype
    .select__meta-terms {
        div.sd-line-input__input {
            border-bottom: 1px solid rgba(0, 0, 0, 0.15);
            height: auto;
            min-height: 3rem;
            padding-left: unset !important;
        }

        &--disabled {
            div.sd-line-input__input {
                padding-left: 0;
            }
        }
    }

    .open-preview .sd-preview-panel {
        width: 560px;

        .sd-item-preview {
            position: absolute;
            top: 0;
            right: 0;
            left: 0;
            bottom: 0;
        }

        .preview-layout .content-item-preview {
            width: 100%;
            top: 0;
        }

        .shift-preview__toggle {
            display: none;
        }
    }

    .report-form__footer {
        // Moves this class further up the importance list
        // forcing this to take precedence over others
        .ml-auto {
            margin-left: auto !important;
        }

    }

    .user-select {
        .tags-input__add-button {
            display: none;
        }

        .tags-input__input:focus {
            width: 20px;
        }

        .sd-line-input__label {
            top: 0.5rem;
        }

        sd-tag-input {
            padding-bottom: 0;
        }
    }
}

// Hack so that content is not rendered underneath the workqueue
.sd-page-grid--basic .sd-content--margin-b30 {
    margin-bottom: 30px;
}

.groups {
    padding: 2rem;
    margin: 1rem 0 0;
}

.report-settings {
    margin-top: 2rem;
}

.tab-box {
    &--no-padding {
        padding-bottom: 0;
    }
}

.sda-report-filters {
    &__filter {
        margin-top: -1.5rem;
    }

    &__exclude {
        display: flex;
        justify-content: flex-end;
    }

    &--padding-bottom {
        padding-bottom: 20rem;
    }

    // Fix width of placeholder
    .tags-input__input {
        width: auto !important;
    }
}

.sda-report-filters__loader {
    background-color: unset !important;

    .sd-loader {
        background-color: unset !important;
    }
}

// Styles copied from client-core for widget styling
.widget-list {
    li {
        &.widget {
            &.publishing-actions {
                .thumbnail {
                    background-color: #d62776;
                }
            }
        }
    }
}

.widget-detail {
    .thumbnail-box {
        &.publishing-actions {
            background-color: #d62776;
        }
    }
}

.sd-widget {
    &.publishing-actions {
        .widget-header {
            z-index: 2;
            background: $white;
            box-sizing: border-box;

        }

        .widget-content {
            overflow-x: hidden;
            top: 0;
        }

        .widget-container__chart {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            top: 38px;
            width: 100%;
            @include transition(all ease 0.2s);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            &.wrap {
                left: -100%;
                right: auto;
                overflow: hidden;
                .scroll-shadow {
                    display: none;
                }
                .content-list-holder {
                    overflow: hidden !important;
                }
            }
            &.custom-widget {
                bottom: 50%;
            }
        }
    }
}