/*
 * 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
  .convert-to-dataset {
    a {
      &:hover {
        opacity: 0.7;
      }
    }
  }
  .action-wrap {
    display: flex;
    align-items: center;
  }
  .main-settings-btn {
    display: flex;
    position: relative;
    &.min-btn {
      .settings-button {
        padding: 0 3px;
      }
      .drop-down {
        left: -115px;
      }
    }
    .settings-button {
      padding: 3px 3px 4px 8px;
      margin: 0;
      border: 0;
      align-items: center;
      border-radius: 4px;
      background: var(--fill--tertiary);
      height: 23px;
      .fa {
        margin: 0;
      }
      .settings-icon {
        height: 24px;
        width: 24px;
        color: var(--icon--primary);
      }
    }
    .drop-down {
      text-align: left;
      position: absolute;
      left: -102px;
      top: 100%;
      background: var(--fill--secondary);
      list-style: none;
      margin: 0;
      padding: 4px 0;
      border: 1px solid var(--border--neutral);
      box-shadow: var(--dremio--shadow--layer-1);
      border-radius: 4px;
      width: 155px;
      z-index: 2;
      li {
        color: var(--text--primary);
        font-size: 12px;
        line-height: 18px;
        padding: 2px 7px;
        cursor: pointer;
        position: relative;
        &:hover {
          background: var(--fill--tertiary);
          > .drop-down {
            display: block !important;
          }
        }
        &.separator {
          border-bottom: 1px solid var(--border--neutral);
          padding-bottom: 5px;
          margin-bottom: 5px;
        }
        &.has-child {
          padding-right: 15px !important;
          &::after {
            content: "►";
            position: absolute;
            top: 0;
            bottom: 0;
            right: 5px;
            margin: auto;
            line-height: 2px;
            height: 1px;
          }
        }
      }
      .help-text {
        font-size: 11px;
      }
    }
    .min-arrow {
      color: var(--icon--primary);
      font-size: 11px;
      line-height: 1px;
      vertical-align: middle;
    }
  }

  .settings-popover {
    .MuiPaper-root,
    .MuiList-root {
      overflow: visible !important;
    }
  }
}
