/*
 * 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 {
  .sql-query-results-tabs {
    margin: var(--dremio--spacing--1) 10px 0 11px;
    border-top: 1px solid var(--border--neutral);
    display: flex;
    align-items: center;
    padding: 10px 0 1px;
    height: 36px;
    min-width: 0;

    &.sql-hidden {
      border-top: none;
      margin-top: 0px;
      padding-top: 8px;
    }

    &--empty {
      height: 1px;
      background-color: var(--fill--secondary);
      margin: var(--dremio--spacing--1) var(--dremio--spacing--2);
      margin-left: 11px;

      &.sql-hidden {
        height: 0px;
        margin-top: 0px;
      }
    }

    .MuiTabs-root {
      min-height: 28px !important;
      height: 28px;

      .MuiTabs-flexContainer {
        height: 28px;

        .MuiButtonBase-root {
          margin-right: 24px;
          min-height: 0;
          min-width: 0;
          width: 89px;
          font-size: 14px;
          text-transform: none;
          font-weight: 400;
          opacity: 1;

          .button-label {
            display: flex;
            align-items: center;

            &-icon {
              height: 24px;
              width: 24px;
              color: var(--icon--primary);
            }
          }
        }

        .MuiButtonBase-root:first-child {
          width: 40px;
        }

        .Mui-selected {
          font-weight: 600;
          color: var(--text--brand);
        }
      }

      .MuiButtonBase-root.MuiTabScrollButton-root.MuiTabScrollButton-horizontal {
        width: 28px;
      }

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

    .MuiTab-root {
      &:focus-visible {
        outline: -webkit-focus-ring-color auto 1px !important;
      }
    }
  }
}
