@import "./ngbGenomicsPanel.variables.scss";

ngb-genomics-panel {
    padding: 5px 0 0;
    position: relative;

    .loading-indicator {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
    }

    ngb-panel-error-list {
        .layout-padding,
        .layout-padding > * {
            padding: 0 !important;
        }

        md-list-item,
        md-list-item .md-list-item-inner {
            min-height: 24px;
            height: 24px;
            font-size: 14px;
        }
    }

    .genomics-header {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: end;

        .export-link {
            color: rgb(102, 153, 255);
            cursor: pointer;
            min-height: 28px;
            line-height: 28px;
            font-size: $genomics-font-size;
            min-width: 40px;
            padding: 0 8px;
            margin: 0 8px;
        }
    }

    .genomics-block {
        padding-top: 5px;
        display: grid;
        grid-template-columns: repeat(20, 1fr);
        align-items: center;
        color: $genomics-font-color;
        height: $genomics-select-height;
        line-height: $genomics-select-height;

        label {
            grid-column: 2 / 4;
            grid-row: 1;
            display: flex;
            justify-content: right;
            font-size: $genomics-font-size;
            color: $genomics-font-color;
            margin-right: 10px;
        }

        md-input-container {
            margin: 0;
            padding: 0;
            color: $genomics-font-color;
            line-height: $genomics-select-height;
            height: $genomics-select-height;
            font-size: $genomics-font-size;
        }

        md-input-container.gene-select {
            grid-column: 5 / 11;
            grid-row: 1;
        }

        md-input-container.protein-select {
            grid-column: 12 / 18;
            grid-row: 1;
        }

        md-input-container md-select {
            &:not([disabled]):focus .md-select-value {
                border-bottom: none;
            }

            md-select-value {
                border: none;
                padding: 0;

                > span,
                > span > div {
                    line-height: $genomics-select-height;
                    height: $genomics-select-height;
                    transform: none!important;
                }
            }
        }
    }

    .genomics-button-block {
        padding-top: 5px;
        display: flex;
        justify-content: end;
        color: $genomics-font-color;
        height: $genomics-select-height;
        line-height: $genomics-select-height;
        margin-right: 30px;
    }

    .genomics-button {
        min-height: 25px;
        height: 25px;
        line-height: 25px;
        min-width: 80px;
        width: unset;
        margin: 0 10px;
        grid-row: 1;
        font-weight: 400;
        font-size: $genomics-font-size;
    }

    .genomics-button.align {
        grid-column: 11 / 14
    }

    .genomics-button.track {
        grid-column: 15 / 18;
    }
}

.genomics-select-container{
    md-select-menu:not(.md-overflow) md-content {
        padding: 0;
    }

    md-option {
        padding: 0 8px;
        height: calc($genomics-select-height + 2px);

        &[selected],
        &:not([disabled]):focus {
            color: $genomics-font-color;
        }
    }

    md-select-menu,
    md-select-menu md-content {
        min-height: calc($genomics-select-height + 2px);
    }

    [data-tooltip] {
        &::after {
            content: attr(data-tooltip);
            z-index: 1;
            font-size: 10px;
            display: inline-block;
            white-space: normal;
            width: max-content;
            border-radius: 5px;
            padding: 4px 8px;
            background: #666262;
            color: #fff;
        }

        &::before, &::after {
          position: absolute;
          pointer-events: none;
          opacity: 0;
          transition: all 0.5s ease-in-out;
        }

        &:hover::before, &:hover::after {
            opacity: 1;
            margin-left: 10px;
            pointer-events: all;
        }
    }
}
