---
---
@import "../css/variables";
@import "../_sass/bootstrap/bootstrap";

@import "../css/sidebar";
@import "../css/section_index";
@import "../css/search";
@import "../css/plugins/offcanvas";

// By default bootstrap doesn't apply many styles to table elements
// unless they have class .table and .table-bordered
// These lines here extend the table so it automatically gets those
// stylings and look like real tables without having to add
// that class to everything.
#content-main {
  table {
    @extend .table;
    @extend .table-bordered;
  }

  img {
    @extend .img-responsive;
  }
}

// Default blockquotes are too big in Bootstrap.
// Shrink them down
blockquote {
  font-size: inherit;
}

// Set height to prevent weird bug where sidebar is clipped at bottom.
html {
  overflow-y: scroll;
  position: relative;
  min-height: 100%;
}

body {
  -webkit-overflow-scrolling: touch;
  overflow-x: visible;

  @media (max-width: $screen-xs-max) {
    overflow-x: hidden;
  }
}

h2,h3,h4,h5,h6 {
  margin-top: 30px;
}

pre code {
  white-space: pre;
}

div.alert-warning {
  background-color: #FFFF7E;
  color: #C7254E;
}

div.highlight {
  position: relative;
}

.code-snippet {
  max-height: 410px;
  overflow: auto;
  overflow-x: hidden;

  &__toolbar {
    vertical-align: top;
    float: right;
  }

  &-toolbar {
    opacity: 0;
    transition: opacity 0.1s ease-in-out;

    &__copy-button,
    &__download-button {
      margin-left: 10px;
      font-size: 16px;
      color: #FF7E00;
  
      &:hover {
        cursor: pointer;
      }
    }

    &--visible {
      opacity: 1;
      transition: opacity 0.1s ease-in-out;
    }
  }

  &__command-prefix {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}

#toplevel-nav {
  -webkit-box-shadow: 0px 0px 8px 1px #666;
  -moz-box-shadow: 0px 0px 8px 1px #666;
  box-shadow: 0px 0px 8px 1px #666;
}

// Fix conflicts between bootstrap theme and custom search theme.
.reset-box-sizing, .reset-box-sizing *, .reset-box-sizing *:before, .reset-box-sizing *:after,  .gsc-inline-block {
    -webkit-box-sizing: content-box;
    -moz-box-sizing: content-box;
    box-sizing: content-box;
}

.toc {
  color: #004078;
  list-style-type: none;
  padding-left: 0;

  &__nested {
    list-style-type: none;
  }

  ul {
    padding-left: 15px;
  }

  a:hover,
  a:focus {
    color: #f69432;
  }
}

.current {
  color: #f79518;
}


input.gsc-input, .gsc-input-box, .gsc-input-box-hover, .gsc-input-box-focus, .gsc-search-button {
    box-sizing: content-box;
    line-height: normal;
}

#tigera-navbar ul.nav li a {
    @media (max-width: $screen-sm-min) {
        padding: 10px 0;
    }
    @media (min-width: $screen-xs-max) {
        padding: 0 0;
    }
}

// Submenu Navigation for Desktop
#tigera-navbar ul.nav li ul {
    position: absolute;
    display: none;
    margin-top: 20px;
    margin-left: -10px !important;
    background: #004078;
    z-index: 1000;
}

@media screen and (min-width: 999px) {

    #tigera-navbar ul.nav {
        li {
            height: 44px;

            ul {
                margin: 24px 0 0 0;
                padding: 0;

                li {
                    min-height: 24px !important;
                    display: block;
                    padding: 8px 18px 8px 10px;
                    overflow: hidden;
                    width: 200px;
                    margin: 0;
                    border-top: 1px dashed #999;

                    a {
                        color: #fff;
                        font-size: 14px;
                    }

                    a:hover {
                        color: $navbar-default-link-hover-color !important;
                        text-decoration: none;
                    }
                }

                li:first-child {
                    border-top: none;
                }
            }
        }

        li:hover ul {
            display: block;
        }
    }
}

#enterprise-header .request-demo-button {
  border: none;
  color: white;
  background-color: #ff9e16;  
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  margin: 4px 40px;
  cursor: pointer;  
  font-size: 18px;
  font-family: 'Poppins',Helvetica,Arial,Lucida,sans-serif !important;
  font-weight: 700 !important;
}

#enterprise-header .calico-enterprise-img {
  display: inline-block !important;
}

#enterprise-footer {
    margin: 20px 0px;
}

#enterprise-footer .learn-more-button {
  border: none;
  color: white;
  background-color: #ff9e16;
  padding: 15px 32px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  margin: 4px 4px;
  cursor: pointer;
  font-size: 18px;
  font-family: 'Poppins',Helvetica,Arial,Lucida,sans-serif !important;
  font-weight: 700 !important;
}

.read-time {
  padding-bottom: 10px;
  color: #666;

  &__icon {
    top: 2px;
  }
}

.main-content {
  $grid-column-gap: 20px;
  display: grid;
  grid-template-columns: [article] 100%;
  grid-column-gap: $grid-column-gap;

  .toc-container {
    display: none;
  }

  .sidebar-container {
    z-index: 1;
  }

  @media (max-width: $screen-xs-max) {
    .sidebar-container {
      padding-right: $grid-column-gap;
    }
  }

  @media (min-width: $screen-sm-min) {
    grid-template-columns: [sidebar] 20% [article] auto;
  }

  @media (min-width: $screen-md-min) {
    $sidebars-width: 16%;
    grid-template-columns:
      [sidebar] $sidebars-width
      [article] calc(100% - #{$sidebars-width * 2} - #{$grid-column-gap * 2})
      [toc] $sidebars-width;

    .toc-container {
      display: block;
    }

    &.no-toc {
      grid-template-columns:
        [sidebar] $sidebars-width
        [article] calc(100% - #{$sidebars-width} - #{$grid-column-gap});
    }
  }
}

$wpfront-notification-bar-spacer-height: 55px;
$sticky-top: $wpfront-notification-bar-spacer-height + $navbar-margin-bottom;
$header-height: 75px;
$search-height: 50px;
$max-sidebar-height: calc(100vh - #{$wpfront-notification-bar-spacer-height + $header-height + $navbar-margin-bottom + $search-height + $navbar-margin-bottom});

.sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: $sticky-top;

  #sidebar-accordion {
    max-height: $max-sidebar-height;

    @media (min-width: $screen-sm-min) {
      overflow-y: auto;
    }
  }
}

.sticky-toc {
  position: -webkit-sticky;
  position: sticky;
  top: $sticky-top;

  .toc {
    max-height: $max-sidebar-height;

    @media (min-width: $screen-md-min) {
      overflow-y: auto;
    }
  }
}

.navbar-right {
  margin-right: 0;
}

.edit-page-link {
  color: #999;
  float: right;
  padding: 8px 10px;
}
