@use './variables' as *;
@use './bootstrap/variables' as *;
@use './theme/mixins/page-editor-mode-manager';

:root[data-theme='light'] {
  // Theme colors
  $themecolor: #38b48b;
  $themelight: #ffffff;
  $accentcolor: #bfbfbf;
  $subthemecolor: #e6e6e6;

  $primary: $themecolor;

  // Background colors
  $bgcolor-global: $themelight;
  $bgcolor-inline-code: $gray-100; //optional
  $bgcolor-card: $accentcolor;
  $bgcolor-blinked-section: rgba($primary, 0.1);
  //$bgcolor-keyword-highlighted: $grw-marker-yellow;

  // Font colors
  $color-global: #2c2c2c;
  $color-reversal: $gray-100;
  $color-link: $primary;
  $color-link-hover: lighten($color-link, 12%);
  $color-link-wiki: $primary;
  $color-link-wiki-hover: lighten($color-link-wiki, 12%);
  $color-link-nabvar: $color-reversal;
  $color-inline-code: #c7254e; // optional
  $color-search: $color-global;

  // List Group colors
  // $color-list: $color-global;
  $bgcolor-list: transparent;
  $color-list-hover: $color-search;
  $bgcolor-list-hover: darken($bgcolor-global, 3%);
  // $color-list-active: $color-reversal;
  // $bgcolor-list-active: $primary;

  // Navbar
  $bgcolor-navbar: $color-global;
  $bgcolor-search-top-dropdown: $themecolor;
  $border-image-navbar: linear-gradient(to right, $primary 0%, darken($primary, 5%) 100%);

  // Logo colors
  $bgcolor-logo: $themelight;
  $fillcolor-logo-mark: $themelight;

  // Sidebar
  $bgcolor-sidebar: $accentcolor;
  // $bgcolor-sidebar-nav-item-active: rgba(#, 0.37); // optional
  $text-shadow-sidebar-nav-item-active: 0px 0px 10px #ffffff; // optional
  // Sidebar resize button
  $color-resize-button: #ffffff;
  $bgcolor-resize-button: $primary;
  $color-resize-button-hover: $color-reversal;
  $bgcolor-resize-button-hover: lighten($bgcolor-resize-button, 5%);
  // Sidebar contents
  $color-sidebar-context: $color-global;
  $bgcolor-sidebar-context: #ebebeb;
  // Sidebar list group
  // $bgcolor-sidebar-list-group: #; // optional

  // Icon colors
  $color-editor-icons: $color-global;

  // Border colors
  $border-color-theme: $primary;
  $bordercolor-inline-code: #ccc8c8; // optional

  // admin theme box
  $color-theme-color-box: $primary;

  @import './theme/apply-colors';
  @import './theme/apply-colors-light';

  // Navs {
  .nav-tabs {
    border-bottom: $border-color-theme 1px solid;
    .nav-link {
      &:hover {
        border-color: lighten($border-color-theme, 10%);
        border-bottom: none;
      }
      &.active {
        background-color: transparent;
      }
    }
  }
  // Button
  .btn-group.grw-page-editor-mode-manager {
    .btn.btn-outline-primary {
      @include page-editor-mode-manager.btn-page-editor-mode-manager(#ffffff, $primary, $primary, lighten($primary, 20%));
    }
  }
}

:root[data-theme='dark'] {
  // Theme colors
  $themecolor: #38b48b;
  $themedark: #333333;
  $accentcolor: #212121;
  $subthemecolor: #2e2e2e;

  $primary: #38b48b;
  $dark: #a7a7a7;

  // Background colors
  $bgcolor-global: $themedark;
  $bgcolor-navbar: #2b2b2b;
  $bgcolor-inline-code: $gray-100; //optional
  $bgcolor-card: darken($themedark, 5%);
  $bgcolor-blinked-section: rgba($primary, 0.5);
  $bgcolor-keyword-highlighted: darken($grw-marker-red, 30%);

  // Font colors
  $color-global: #ffffff;
  $color-reversal: $gray-100;
  $color-link: $primary;
  $color-link-hover: lighten($color-link, 12%);
  $color-link-wiki: $primary;
  $color-link-wiki-hover: lighten($color-link-wiki, 12%);
  $color-link-nabvar: $color-reversal;
  $color-inline-code: $subthemecolor;
  $color-inline-code: #c7254e; // optional
  $color-search: $dark;

  // List Group colors
  // $color-list: $color-global;
  $bgcolor-list: transparent;
  $color-list-hover: $accentcolor;
  // $bgcolor-list-hover: lighten($bgcolor-global, 3%);
  // $color-list-active: $color-reversal;
  // $bgcolor-list-active: $primary;

  // Navbar
  $bgcolor-navbar: #2c2c2c;
  $bgcolor-search-top-dropdown: $themecolor;
  $border-image-navbar: linear-gradient(to right, $primary 0%, darken($primary, 5%) 100%);

  // Logo colors
  $bgcolor-logo: #ffffff;
  $fillcolor-logo-mark: #ffffff;
  // $fillcolor-logo-mark: #4e5a60;

  // Sidebar
  $bgcolor-sidebar: $accentcolor;
  // $bgcolor-sidebar-nav-item-active: rgba(#, 0.3); // optional
  $text-shadow-sidebar-nav-item-active: 0px 0px 10px $primary; // optional
  // Sidebar resize button
  $color-resize-button: $color-global;
  $bgcolor-resize-button: $primary;
  $color-resize-button-hover: $color-global;
  $bgcolor-resize-button-hover: darken($bgcolor-resize-button, 5%);
  // Sidebar contents
  $bgcolor-sidebar-context: #3c403c;
  $color-sidebar-context: $color-global;
  // Sidebar list group
  // $bgcolor-sidebar-list-group: #; // optional

  // Icon colors
  $color-editor-icons: $color-global;

  // Border colors
  $border-color-theme: $primary;
  $bordercolor-inline-code: #4d4d4d; // optional

  // Dropdown colors
  $color-dropdown-link-active: $color-global;
  $color-dropdown-link-hover: $color-reversal;

  // admin theme box
  $color-theme-color-box: $primary;

  @import './theme/apply-colors';
  @import './theme/apply-colors-dark';

  // Navs
  .nav-tabs {
    border-bottom: $border-color-theme 1px solid;
    .nav-link {
      &:hover {
        border-color: lighten($border-color-theme, 10%);
        border-bottom: none;
      }
      &.active {
        color: $color-link;
        background-color: transparent;
        border-color: $border-color-theme;
      }
    }
  }

  // Table
  .table {
    color: white;
  }

  // Button
  .btn-group.grw-page-editor-mode-manager {
    .btn.btn-outline-primary {
      @include page-editor-mode-manager.btn-page-editor-mode-manager(#ffffff, $primary, $primary, darken($primary, 20%));
    }
  }
}
