/*
 * 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 {
  // DX-11429 TODO reafactor component to use css modules instead fo global classes

  .TreeBrowser {
    display: flex;
    height: 100%;
    flex-direction: column;

    &--empty {
      display: flex;
      justify-content: center;
      align-items: center;
      padding-top: 32px;
      font-size: 16px;
      line-height: 24px;
    }

    &__subHeading {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      padding-right: 8px;

      .dropdownMenu {
        &__content {
          &:hover {
            color: var(--icon--hover);
          }
        }
      }
    }

    &-heading {
      border-bottom: 1px solid var(--border--neutral);
      display: flex;
      flex-shrink: 0;
      align-items: center;
      height: 39px;
      padding: 0 8px;

      &.--dataset {
        .TreeBrowser-tab {
          height: auto;
        }
      }

      &.--collapsed {
        padding: 0 4px;
      }

      h3 {
        font-size: 12px;
        font-weight: 600;
        line-height: 18px;
      }

      .dremio-tooltip__child-wrap {
        margin-left: auto;
      }
    }

    &-items {
      padding: 4px 12px;
      overflow-y: auto;

      .dragSource {
        align-items: center;
        border-radius: 4px;
        display: flex;
        flex-direction: row;

        &:hover {
          .resourceTreeNode__add
            .resourceTreeNode--unstarred
            .resourceTreeNode--limitReached {
            opacity: 1;
          }
        }
      }
    }

    // overwriting PageType tabs css
    &-tab {
      font-size: 14px;
      line-height: 20px;
      color: var(--text--primary);
      padding: 0 12px;
      margin: 0 4px;
      height: 100%;

      &.--active {
        color: var(--text--brand);
        font-weight: 600;
      }

      &::after {
        height: 2px;
        background-color: var(--fill--brand--solid);
      }

      &:hover:not(.button-active)::after {
        height: 2px;
        background-color: var(--fill--brand--solid);
      }
    }
  }
}
.collapseButton {
  transition: 300ms ease filter;
  height: 24px;
  width: 24px;
  cursor: pointer;
}
