@import '../styles/app';

$body-bg: #FFFBF8;
$doc-navbar-height: 80px;
$sidebar-width-open: 224px;
$doc-sidebar-color: #6c757d;

.documentation-page {
  color: $gray-700;
  position: relative;

   .content {
      background-color: #FFFBF8;
      padding-top: calc(#{$doc-navbar-height} + #{2 * $spacer});
      min-height: 100vh;

      .widget {
        box-shadow: none;
        background: transparent;
        padding-left: 0;
        padding-right: 0;
      }

     @include media-breakpoint-up(md) {
       margin-left: $sidebar-width-open;
     }

     @include media-breakpoint-down(sm) {
       padding-top: calc($doc-navbar-height / 2);
     }
  }

  .header {
    position: fixed;
    left: 0;
    right: 0;
    background-color: #fff;
    height: $doc-navbar-height;
    box-shadow: 0 0 10px rgba(0, 0, 0, .2);
    z-index: 100;
  }

  .company {
    display: flex;
    position: fixed;
    bottom: 0;
    align-items: center;
    width: inherit;
    max-width: inherit;

    color: #495057 !important;
    font-size: 11px;
    font-weight: 400;
    background-repeat: no-repeat;
    margin-bottom: 30px;
    background-size: contain;
    border-radius: 50px;
    padding: 0 25px;

    img {
      border-radius: 50%;
      margin-right: 10px;
      margin-top: -4px;
      width: 50px;
    }
  }

  .sidebar {
    color: $doc-sidebar-color;
    padding-top: $doc-navbar-height;
    width: $sidebar-width-open;
    background: #fff;
    position: absolute;

    @include media-breakpoint-down(sm) {
      position: relative;
      width: auto;
      background: transparent;
    }

    @include media-breakpoint-up(md) {
      height: 100%;
      left: 0;
      top: 0;

      .nav {
        padding: $spacer 0;
        position: fixed;
        width: inherit;
        max-width: inherit;
        overflow-y: auto;
        max-height: calc(100vh - 200px);
      }
    }

    .headerLink {
      .sidebar-link {
        padding-left: 25px;
        font-weight: $font-weight-semi-bold;
        color: $doc-sidebar-color;

        &:hover {
          background: $body-bg;
        }

        .icon {
          display: none;
        }
      }

      .sub-menu {
        background: $body-bg;
        padding: $spacer;

        & > li > a {
          line-height: 20px !important;
          padding: 10px 20px 10px 26px;
          color: $doc-sidebar-color;
        }
      }
    }

    .sidebar-link.router-link-exact-active,
    .sub-menu .router-link-active {
      color: theme-color('warning') !important;
    }
  }
  .scrollspy {
    color: #32373b;
    position: fixed;
    overflow-y: auto;
    max-height: calc(100vh - 130px);
    border-color: $gray-200 !important;

    .list-group-item {
      border: none;
      padding: 5px 0;
      transition: $transition-base;
      color: #32373b;

      &:hover {
        color: #32373b;
        background: none;
      }

      &.active {
        color: theme-color('warning');
      }
    }
  }


  /////// Overrides ////////
  .table, .navbar-light > .navbar-brand {
    color: $gray-700;
  }

  .breadcrumb .breadcrumb-item {
    &, a, &:before {
      color: $gray-700;

      &:hover {
        color: $gray-700;
      }
    }
  }

  .text-muted {
    color: $gray-500 !important;
  }

  a:not(.btn) {
    color: #218bc3;

    &:hover {
      color: tint-color(#218bc3, 10%);
    }
  }

  .btn {
    background-image: none;
  }

  .tabs {
    .nav-tabs .nav-item .nav-link {
      color: $gray-700 !important;

      &.active {
        background: white;
        font-weight: normal;
        box-shadow: 1px 1px 2px #ccc;
      }
    }

    .tab-content .tab-pane {
      background: white;
    }
  }

  .card-body {
    background: white;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  .h1,
  .h2,
  .h3,
  .h4,
  .h5,
  .h6 {
    color: #444;
  }

  code {
    background-color: theme-color('danger-light');
    color: $pink;
  }

  /////// Component Documentation - Original Bootstrap Styles ////////

  // Buttons - use standard Bootstrap colors
  .btn {
    &, &:hover, &.disabled, &:disabled {
      color: #fff;
    }

    &.btn-secondary {
      color: #212529;
      background-color: #f4f4f5;
      border-color: #f4f4f5;

      &:hover {
        background-color: #e2e2e3;
        border-color: #dbdbdc;
      }
    }

    &.btn-light {
      color: #212529;
    }
  }

  // Alerts - standard Bootstrap alert styling
  .alert {
    color: #212529;

    &.alert-success {
      background-color: #d1e7dd;
      border-color: #badbcc;
      color: #0f5132;
    }

    &.alert-info {
      background-color: #cff4fc;
      border-color: #b6effb;
      color: #055160;
    }

    &.alert-warning {
      background-color: #fff3cd;
      border-color: #ffecb5;
      color: #664d03;
    }

    &.alert-danger {
      background-color: #f8d7da;
      border-color: #f5c2c7;
      color: #842029;
    }

    &.alert-transparent {
      background-color: transparent;
    }

    .btn-close {
      color: inherit;
    }
  }

  // Modal - light background
  .modal-content {
    background-color: #fff;
    color: #212529;

    .modal-header {
      border-color: #dee2e6;

      .modal-title {
        color: #212529;
      }
    }

    .modal-footer {
      border-color: #dee2e6;
    }
  }

  // Progress bars
  .progress {
    background-color: #e9ecef;
  }

  // Forms
  .form-control {
    background-color: #fff;
    border-color: #ced4da;
    color: #212529;

    &:focus {
      background-color: #fff;
      color: #212529;
    }
  }

  // Cards
  .card {
    background-color: #fff;
    color: #212529;

    .card-header {
      background-color: rgba(0, 0, 0, 0.03);
      border-color: rgba(0, 0, 0, 0.125);
    }
  }

  // Nav tabs
  .nav-tabs {
    .nav-link {
      color: #495057;

      &:hover {
        color: #495057;
      }
    }
  }

  // Badges
  .badge {
    &.bg-secondary {
      color: #212529;
    }
  }

  // Navbar
  .navbar {
    &.bg-light {
      background-color: #f8f9fa !important;
    }

    &.bg-dark {
      background-color: #212529 !important;
    }

    .navbar-brand,
    .nav-link {
      color: inherit;
    }
  }

  // Popovers
  .popover {
    background-color: #fff;

    .popover-header {
      background-color: #f0f0f0;
      color: #212529;
    }

    .popover-body {
      color: #212529;
    }
  }

  // Carousel
  .carousel {
    background-color: #f8f9fa;
  }

  // List groups
  .list-group-item {
    background-color: #fff;
    color: #212529;
    border-color: rgba(0, 0, 0, 0.125);

    &:hover {
      background-color: #f8f9fa;
      color: #212529;
    }
  }
}
