@import "../../styles/modules/importAll";

.DashboardEditor {
    position: relative;
    display: flex;
    margin-top: 4rem;
    width: 100%;

    .DashboardEditorSidebar {
        border-right: 0.1rem solid $lightGrey;
        width: 310px;
        .DashboardSidebarTabMenu {
          white-space: nowrap;
          padding: 1rem 0;
      
          button {
            cursor: pointer;
          } 
      
          .tabItem {
            display: inline-block;
            margin-left: calc(19% / 6);
            margin-right: calc(19% / 6);
            text-align: center;
            padding: 0.75rem 0.75rem 0.45rem 0.75rem;
            color: $midGrey;
            border-bottom: 0.3rem solid $lightGrey;
            transition: color 0.3s, border 0.3s;
            transition-timing-function: ease;
            border-width: 0.1rem;
            border-color: $lightGrey;
      
            &.selected {
                border-color: $midGrey;
                border-width: 0.15rem;
            }
      
            &:hover {
              color: #000;
            }
      
            &.action {
              width: 20%;
      
              &:hover {
                color: #000;
              }
            }
            
            &.textItem {
              border-left: 0.1rem solid $lightGrey;
            }
      
          }
        } 
        .filtersTab{
            padding: 13px;
        }
        .selectFilterColumnRemove {
          background-image: url("../../styles/img/cancel_icon.svg");
          background-repeat: no-repeat;
          background-size: 1rem 1rem;
          background-position: right 0px top 0.9rem;
        }

    } 
    
    .DashboardEditorCanvas {
        padding: 16px;
        position: relative;
        box-sizing: initial;
        background-color: $dashboardBG;
    }

    .DashboardEditorOverlay {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: rgba(0,0,0,0.2);
        cursor: pointer;
    }
    
    .DashboardCanvasItemWrap--focused {
        z-index: 9;
    }

    .DashboardVisualisationList {
        height: calc(100vh - 4rem - 64px); 
    }
    
    .DashboardEditorCanvasContainer {
        height: calc(100vh - 4rem);
    }

    .DashboardVisualisationList,
    .DashboardEditorCanvasContainer {
        overflow: auto;
    }

    .DashboardVisualisationList {
        width: 22rem;
    }

    .DashboardEditorCanvasContainer {
        flex: 1;
    }

    .blankDashboardHelpText {
        text-align: center;
        padding: 6rem 1rem;
        line-height: 1.4em;
        color: $midGrey;
    }

    .react-resizable-handle {
        z-index: 99;
    }

    .DashboardEditorCanvasControls {
        padding: 1rem;
        border-bottom: 0.1rem solid $lightGrey;
        text-align: center;
        
        button {
            padding: 0.5rem 1rem;
            color: $lumenGreen;
            background-color: $white;
            border: 0.1rem solid $lumenGreen;
            line-height: 1.4rem;

            @include border-radius(3px);

            margin-right: 1rem;

            i {
                margin-right: 1em;
            }
        }
    }

    .DashboardNameInputContainer {
        padding: 1rem 1rem 0 1rem;

        input {
            display: block;
            margin: 0 auto;
            width: 80%;
            max-width: 40rem;
            border: 0.1rem solid $lightGrey;
            background-color: inherit;
            padding: 0.5rem;
            text-align: center;
        }

        &.error input {
            box-shadow: 0 0 0.1rem 0.25rem $errorRed;
        }
    }

    &--exporting {
        margin-top: 0;
        .DashboardEditorCanvasContainer {
            height: auto;
        }

        .DashboardEditorCanvas {
            background-color: white;
        }

        .DashboardCanvasItem {
            border-width: 1px;
            border-style: solid;
            border-color:rgb(206, 206, 206);
            
            .deleteButton {
                display: none;
            }
        }

        .react-resizable-handle {
            display: none;
        }
    }
    .export-filter {
        padding: 10px 30px;
        font-size: 1.1em;
        border-bottom: 1px dashed $midLightGrey;
        b {
            font-weight: bolder;
        }
      }
}

@media print {
    .DashboardVisualisationList,
    .DashboardEditorCanvasControls,
    .react-resizable-handle {
        display: none !important;
    }
    .DashboardEditor{
        .react-grid-layout {
            background: none;
        }
        .DashboardEditorCanvas {
            padding: 0 !important;
        }
    }
}
