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

$color-primary: #97cbc3;
$color-themelight: rgba(183, 226, 219, 1);

:root {
  $primary: $color-primary;
  // Background colors
  $bgcolor-card: $gray-50;
  $bgcolor-global: lighten($color-themelight, 10%);
  $bgcolor-inline-code: $gray-100; //optional
  $bgcolor-blinked-section: rgba($primary, 0.3);
  //$bgcolor-keyword-highlighted: $grw-marker-yellow;

  // Font colors
  $color-global: #112744;
  $color-reversal: #eeeeee;
  // $color-header: #2b2b2b;
  $color-link: #3c6d72;
  $color-link-hover: lighten($color-link, 20%);
  $color-link-wiki: $color-link;
  $color-link-wiki-hover: lighten($color-link-wiki, 20%);
  $color-link-nabvar: $color-reversal;
  $color-inline-code: #c7254e; // optional

  // List Group colors
  // $color-list: $color-global;
  // $bgcolor-list: lighten($color-themelight, 10%);
  // $color-list-hover: ;
  $bgcolor-list-hover: $color-themelight;
  $color-list-active: $color-global;
  $bgcolor-list-active: $primary;

  // Table colors
  // $color-table: #; // optional
  // $bgcolor-table: #; // optional
  $border-color-table: $primary; // optional
  // $color-table-hover: #; // optional
  // $bgcolor-table-hover: #; // optional

  // Navbar
  $bgcolor-navbar: #302e2e;
  $bgcolor-search-top-dropdown: $color-primary;
  $border-image-navbar: linear-gradient(to right, #5ce4ef 0%, #5953eb 100%);

  // Logo colors
  $bgcolor-logo: #0d3955;
  $fillcolor-logo-mark: lighten(desaturate($bgcolor-inline-code, 10%), 15%);

  // Sidebar
  $bgcolor-sidebar: #0d3955;
  $bgcolor-sidebar-nav-item-active: rgba(black, 0.37);
  // $bgcolor-sidebar-nav-item-active: rgba(#969494, 0.3); // optional
  $text-shadow-sidebar-nav-item-active: 0px 0px 10px #0099ff; // optional
  // Sidebar resize button
  $color-resize-button: white;
  $bgcolor-resize-button: $primary;
  $color-resize-button-hover: white;
  $bgcolor-resize-button-hover: darken($bgcolor-resize-button, 5%);
  // Sidebar contents
  $bgcolor-sidebar-context: #e2f3f1;
  $color-sidebar-context: $color-link;
  // Sidebar list group
  $bgcolor-sidebar-list-group: #eff8f7; // optional

  // Tabs
  $bordercolor-nav-tabs: $gray-300; // optional

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

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

  // Dropdown colors
  $bgcolor-dropdown-link-active: $growi-blue;

  // admin theme box
  $color-theme-color-box: darken($primary, 15%);

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

  &, body {
    background-image: url('../images/island/island.png');
    background-attachment: fixed;
  }

  .rbt-menu {
    background: lighten($color-themelight, 5%);
  }

  .page-editor-preview-container {
    background-image: url('/images/themes/island/island.png');
    background-attachment: fixed;
  }

  // login page
  .nologin {
    background-image: unset !important;
  }

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

  // Cards
  .admin-bot-card {
    .grw-botcard-title-active {
      color: $color-reversal;
    }
  }

  /*
   * GROWI Sidebar
  */
  .grw-sidebar {
    // Pagetree
    .grw-pagetree {
      .grw-pagetree-triangle-btn {
        @include mixins-buttons.button-outline-svg-icon-variant($gray-400, $bgcolor-sidebar);
      }
    }
    // Foldertree
    .grw-foldertree {
      .grw-foldertree-triangle-btn {
        @include mixins-buttons.button-outline-svg-icon-variant($gray-400, $bgcolor-sidebar);
      }
    }
  }
}
