/*
 * Copyright (C) 2017-2019 Dremio Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

:global {
  .dremioSidebar {
    flex-basis: 300px;
    font-size: 14px;
    max-width: 480px;
    position: relative;
    width: 300px;

    height: 100%;
    overflow: hidden;

    &.--active {
      pointer-events: none;

      .dremioSidebar__drag {
        background: rgba(204, 204, 204, 0.6);
      }
    }

    .dremioSidebarWrap__inner {
      width: 100%;
      height: 100%;

      .tree {
        height: 100%;
      }
    }

    &__drag {
      height: 100%;
      pointer-events: auto;
      position: absolute;
      right: -5px;
      width: 10px;
      z-index: 1000;

      &:hover {
        cursor: col-resize;
      }
    }
  }

  .dremioSidebarHeader {
    display: grid;
    grid-auto-columns: auto;
    justify-content: flex-end;

    &__toggle {
      height: 24px;
      width: 24px;

      &:hover {
        cursor: pointer;
      }
    }
  }

  .topContent {
    position: relative;
    .warning-message {
      margin-bottom: 0px !important;
    }
  }

  .resizeEditor {
    height: 17px;
    width: 100%;
    position: absolute;
    bottom: -17px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;

    .resizeIndicator {
      height: 1px;
      width: 100%;
      position: absolute;
      top: 8px;
      background-color: var(--border--neutral);
      transition: background-color 0.25s linear;

      &.--dragging {
        background-color: var(--border--neutral) !important;
        transition: none;
      }
    }

    &:hover {
      cursor: row-resize;

      .resizeIndicator {
        background-color: var(--fill--brand--solid);
      }
    }
  }

  .resizingDisplay {
    height: 1px;
    width: 100%;
    position: absolute;
    left: 8.5px;
    z-index: 360;
    cursor: row-resize;
    background-color: var(--fill--brand--solid);
  }
}
