//@import "main";
@import "variables";

@import "responsive-utils";

// Import bootstrap core variables and mixins
@import "../../node_modules/bootstrap/scss/functions";
@import "../../node_modules/bootstrap/scss/variables";
@import "../../node_modules/bootstrap/scss/mixins";

// Import our own custom mixins and utilities
@import "mixins";
@import "utilities";

@import "docsearch/main";


html:after {
  display: block;
  position: fixed;
  left: 0;
  bottom: 0;
  font-size: .8em;
  padding: .25em .75em;
  background-color: $white;
  opacity: .5;
  z-index: 10000;
  border: 1px solid $gray-lighter;
  border-left-width: 0;
  border-bottom-width: 0;
  border-radius: 0 3px;

  @each $label, $width in $grid-breakpoints {
    @media screen and ( min-width: $width) {
      content: "#{$label}";
    }
  }
}

// Colors
.swatch-container {
  margin-top: 2em;
  overflow: auto;
}

.swatch {
  display: block;
  float: left;
  position: relative;
  width: 300px;
  margin: 0 48px 48px 0;


  .swatch-color {
    width: 300px;
    height: 50px;
    padding-top: 15px;
    padding-left: 15px;
    padding-right: 15px;

    &.main {
      height: 150px;
      padding-top: 0;
    }

    strong {
      font-family: $font-family-brand-light;
      font-weight: 100;
      letter-spacing: -0.0225em;
      -webkit-font-smoothing: antialiased;
      font-size: 1.825em;
      display: block;
      padding: 16px 0 48px 24px;
      color: $black;
    }

    em {
      font-style: normal;
      color: $black;
    }

    .weight {
      float: left;
      margin-left: 24px;
      font-size: 15px;
      font-weight: 500;
    }

    .value {
      float: right;
      margin-right: 24px;
      font-family: $font-monospace;
      font-size: 14px;
    }

    &.light-text {
      strong, em { color: $white; }
    }
  }
}

// Fonts
$font-container-border-color: #eee;
$font-container-background-color: #fafafa;

.font-container {
  border: solid 1px $font-container-border-color;
  background-color: $font-container-background-color;
  padding: 20px 35px;
  margin: 34px 0;
}

.font {
  $font-name-color: #333;

  .font-name {
    font-size: 2em;
    color: $font-name-color;
  }

  $font-example-border-color: #eee;
  $font-example-background-color: #fff;

  .font-example {
    font-size: 24px;
    border: solid 1px $font-example-border-color;
    padding: 15px;
    margin-top: 34px;
    background-color: $font-example-background-color;
    margin-bottom: 20px;
  }

  .font-alias {
    font-family: $font-monospace;
    font-size: 12px;
  }
}

.font-styles li {
  padding-top: 28px;
  padding-left: 38px;
}

// Icons

$glyph-border-color: #ccc;

.glyph {
  border-bottom: 1px dotted $glyph-border-color;
  padding: 10px 0 20px;
  margin-bottom: 20px;
}

.preview-glyphs { vertical-align: bottom; }

$preview-scale-color: #888;

.preview-scale {
  color: $preview-scale-color;
  font-size: 12px;
  margin-top: 5px;
}

.step {
  display: inline-block;
  line-height: 1;
  position: relative;
  width: 10%;
}

.step .letters,
.step i {
  transition: opacity 0.3s;
}

.step:hover .letters { opacity: 1; }
.step:hover i { opacity: 0.3; }

.letters {
  display: none;
  opacity: 0.3;
  position: absolute;
}

.characters-off .letters { display: none; }
.characters-off .step:hover i { opacity: 1; }


.size-12 { font-size: 12px; }

.size-14 { font-size: 14px; }

.size-16 { font-size: 16px; }

.size-18 { font-size: 18px; }

.size-21 { font-size: 21px; }

.size-24 { font-size: 24px; }

.size-36 { font-size: 36px; }

.size-48 { font-size: 48px; }

.size-60 { font-size: 60px; }

.size-72 { font-size: 72px; }


.usage { margin-top: 10px; }

.usage input {
  font-family: monospace;
  margin-right: 3px;
  padding: 2px 5px;
  text-align: center;
}

.usage .point { display: none; }

.usage .class { width: 250px; }

// Dos and Don'ts
$status-bar-weight: 0.5rem;

.status-bar {
  border-top: solid $status-bar-weight $gray-200;
  color: $gray-700;
  padding-top: 0.25rem;
  font-size: 0.8125em;
  font-weight: bold;
  position: absolute;
  bottom: -24px;
  width: 100%;

  &.danger {
    border-top: solid $status-bar-weight $red-700;
    color: $red-700;
  }

  &.success {
    border-top: solid $status-bar-weight $green-700;
    color: $green-700;
  }

  &.warning {
    border-top: solid $status-bar-weight $yellow-700;
    color: $yellow-700;
  }
}

.card-banner {
  width: 100%;
}

$purple-800: #6734ba !default;
$purple-700: #b384ff !default;


// Code Samples
.bd-example {
  padding: 2rem;
  margin-bottom: 2rem;
  border: 1px solid $gray-200;
  border-top-right-radius: 5px;
  border-top-left-radius: 5px;

  ngb-tabset {
    margin: 2rem rem(-32) rem(-48);
    display: block;
    max-width: unset;

    .nav-tabs {
      padding-left: 15px;
    }
  }

  .tab-pane {
    padding: 2rem;
    margin-top: -1px;

    code-example {
      margin: -2rem;
      display: block;
    }
  }
}

.bd-example + code-example {
  margin-top: -2rem;
  display: block;
}

.bd-example + .table-bordered {
  margin-top: calc(-2rem - 1px);
}

code-example + .table-bordered {
  margin-top: -1rem;
}

.bd-example-row .col, .bd-example-row [class*="col-"] {
  border: solid 1px $purple-800;
  padding: 16px;
  margin-bottom: 16px;
  background-color: $purple-700;
}

.card .card-body + code-example {
  margin-top: -1rem;

  .code-example-header {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  figure {
    margin-bottom: 0;
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

body.theme-dark .bd-example {
  border: solid 0.0625rem $gray-900;
}

body.light .bd-example {
  border: solid 0.0625rem $gray-100;
}

.bd-example > .card {
  max-width: 20rem;
}

.bd-example > .highlight {
  padding: 2rem 2rem 1rem;
  margin: 2rem -2rem -2rem;
}

.bd-example-popover-static .popover {
  position: relative;
  display: block;
  float: left;
  width: 260px;
  margin: 1.25rem;
}

.bd-example > .progress {
  margin-bottom: 1rem;
}

section.content.layout-markup {
  padding: 2rem 6rem;
}

$featured-breadcrumb-color: #999;
$featured-title-color: #fff;
$featured-subtext-color: #d7fab4;

.jumbotron-feature {

  margin-top: 3.5rem;
  height: 20.3rem;
  min-height: 20.3rem;
  margin-bottom: -7rem;

  h1 {
    z-index: 1;
    position: absolute;
    color: $featured-title-color;
    top: 5rem;
    left: 5rem;
    font-size: 3rem;
    letter-spacing: -0.0625rem;
    text-shadow: 0 0.0625rem 0.25rem $shadow-darker;
  }

  .subtext {
    font-family: $font-family-brand;
    font-weight: 400;
    font-size: 1.375rem;
    -webkit-font-smoothing: antialiased;
    position: absolute;
    color: $featured-subtext-color;
    z-index: 1;
    top: 9.1rem;
    left: 5rem;
    padding-right: 2rem;
    text-shadow: 0 0.0625rem 0.25rem $shadow-darker;
  }

  .underlay {
    background-image: url("/assets/bg.png");
    background-size: cover;
    width: 100%;
    height: 100%;
    position: absolute;
  }

  .underlay-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    top: 0;
    left: 0;
    z-index: 0;
  }
}

.code-example-header {
  background-color: $gray-200;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: bold;
}

.code-example-collection {

  position: relative;

  & > a {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    font-size: 0.75rem;
  }

  .nav-tabs {
    margin-bottom: -0.125rem;
  }

  .nav-tabs .nav-link {
    &, &:hover, &:active, &:focus {
      text-transform: none;
      font-family: $font-family-sans-serif;
      font-size: 0.875rem;
      border: solid 0.0625rem $white;
      border-bottom: solid 0.0625rem $gray-150;
      padding: 0.5rem 1rem;
      margin: 0;
      font-weight: normal;
      -webkit-font-smoothing: auto;
    }

    &.active, &.active:hover, &.active:active, &.active:focus {
      font-family: $font-family-sans-serif;
      font-size: 0.875rem;
      border: solid 0.0625rem $gray-150;
      border-bottom: solid 0.0625rem $gray-75;
      background-color: $gray-75;
      font-weight: normal;
    }
  }

  .tab-pane {
    padding-top: 0;
    border: solid 0.0625rem $gray-150;

    figure {
      margin-bottom: 0;
    }
  }

  .badge {
    -webkit-font-smoothing: antialiased;
    padding: 4px 4px 2px;
    margin-right: 4px;
    margin-left: -4px;
  }

  .badge.typescript {
    background-color: $cyan-800;
    color: $white;
  }

  .badge.html {
    background-color: $teal-700;
    color: $white;
  }

  .badge.scss {
    background-color: $blue-800;
  }
}

body.theme-dark .code-example-header {
  background-color: $gray-950;
  color: $gray-600;
}

// Layout Generator Tools
$layout-generator-bg-color: rgba(0, 0, 0, 0.75);

.layout-generator-tools {
  background: $layout-generator-bg-color;
  width: 100%;
  padding: 16px 32px;

  &.fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    max-height: 50%;
    overflow-y: auto;
    z-index: 9999;
  }

  .input-group {
    display: block;

    label {
      display: block;
      text-transform: uppercase;
      font-size: 14px;
      color: $gray-400;
    }

    input, select {
      width: 100%;

      &:active, &:focus {
        background-color: $white;
      }
    }
  }
}

.example {
  position: relative;
  padding-bottom: 1rem;
}

.card.layout-example {
  background-color: lighten($gray-200, 5%);
}

.layout-example-container h3 a {
  color: $gunmetal;

  &:hover {
    color: gunmetal;
  }
}

.layout-code-sample {
  background: $gray-200;
  margin: 2rem -2.875rem;
  padding: 2rem 4rem;

  .highlight {
    padding: 0;
    background: transparent;
    margin-bottom: 0;
  }
}

.ex-stacked-modal-first .modal-dialog { max-width: 900px }
.ex-stacked-modal-middle .modal-dialog { max-width: 750px }
.ex-stacked-modal-last .modal-dialog { max-width: 600px }
