/*
 * Copyright (c) 2020 Red Hat, Inc.
 * Copyright Contributors to the Open Cluster Management project
 */

/*******************************************************************************
 * Licensed Materials - Property of IBM
 * (c) Copyright IBM Corporation 2019. All Rights Reserved.
 *
 * Note to U.S. Government Users Restricted Rights:
 * Use, duplication or disclosure restricted by GSA ADP Schedule
 * Contract with IBM Corp.
 *******************************************************************************/

@import 'fonts';
@import 'search-overrides';

.main {
  display: block;
}

// AcmPageHeader, which Visual Web Terminal does not use, so collapse it
.pf-c-page__main-group.pf-m-sticky-top {
  height: 0 !important;
}

// Override KUI theme link color for non-current left nav item
.pf-c-nav__item .pf-c-nav__link {
  color: var(--pf-c-nav__link--Color) !important;
}

// Override KUI theme link color for current left nav item
.pf-c-nav__item .pf-c-nav__link.pf-m-current {
  color: var(--pf-c-nav__link--m-current--Color) !important;
}

// Override KUI theme link color for app launcher menu item
.pf-c-app-launcher__menu-item {
  color: var(--pf-c-app-launcher__menu-item--Color) !important;
}

// Override KUI theme header brand name to remove link styling (as it does not link to anything anyway)
.pf-c-page__header-brand-link {
  cursor: default;
  text-decoration: none;
}

// Override KUI light theme tab stripe background color to white to match ACM/OCP theme
body[kui-theme="PatternFly4 Light"] {
  .kui--top-tab-stripe {
    --color-stripe-01: white;
  }
}

.still-loading { // input bar is visible while kui is loading
  .kui--input-stripe {
    visibility: hidden;
  }
}

// Make the page title show up
.kui-header__title {
  display: inline-flex !important; // hack because it's hard to override
  font-weight: 400;
}

.result-table-outer .max-width-id-like { // fix table cell truncation issue
  max-width: unset;
  overflow: auto;
  text-overflow: unset;
  white-space: unset;
}

.result-as-table.result-as-multi-table { // helm status table display corrections
  .repl-result.repl-result {
    display: block;

    .result-table-outer-wrapper {
      display: block;
      margin-top: 1.5rem;

      &:first-of-type {
        margin-top: 0;
      }

      & > div {
        padding-right: 0;
      }
  
      .result-table-outer {
        padding-right: 0;
        width: 100%;
        .result-table {
          width: 100%;
        }
      }
    }
  }
}

#sidecar {
  .sidecar-header {

    &-name-content {
      .entity-name-line .entity-name {
        word-break: unset;
        max-height: unset;
      }
    }

  }
  .sidecar-content-container { // helm get sidecar table display corrections
    .result-as-table.repl-result {
      display: block;
  
      .result-table-outer-wrapper {
        margin-top: 1.5rem;
        display: block;
  
        &:first-of-type {
          margin-top: 0;
        }
      }
    }
  }
}

// Hack to disable screenshot feature
.kui--repl-prompt-buttons--screenshot, .screenshot-button {
  display: none !important;
}

// Style for "Tech Preview" DIV tag in the status bar
// with KUI v8 code
// .kui--tech-preview {
//   color: #FFFFFF !important;
//   background-color: #D93F00 !important;
//   border-radius: 3px;
//   height: 20px;
//   text-align: center;
// }
// with KUI v10 code we just need some padding on the DIV containing the tech preview label
.kui--tech-preview {
  padding-top: 5px;
  padding-right: 16px;
}