@import '../variables';
@import '../override-bootstrap-variables';

// == Define Bootstrap theme colors
//

// colors for overriding bootstrap $theme-colors
// $secondary: #;
// $info: #;
// $success: #;
// $warning: #;
// $danger: #;
// $light: #;
// $dark: #;

.growi:not(.login-page) {
  // add background-image
  #page-wrapper,
  .page-editor-preview-container {
    background-image: url('/images/themes/antarctic/bg.svg');
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
  }
}

.growi.login-page {
  #page-wrapper {
    background-image: url('/images/themes/antarctic/topimage.svg');
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
  }
}

$themecolor: #000080;
$themelight: #f0f8ff;
$accentcolor: #ffd700;

.grw-navbar {
  border-bottom: $accentcolor 4px solid;
}

//== Light Mode
//
html[light],
html[dark] {
  $primary: $themecolor;

  // Background colors
  $bgcolor-global: $themelight;
  $bgcolor-inline-code: $gray-100; //optional
  $bgcolor-card: $gray-50;
  $bgcolor-highlighted: rgba($primary, 0.15);

  // Font colors
  $color-global: black;
  $color-reversal: #eeeeee;
  // $color-header: #2b2b2b;
  $color-link: lighten($themecolor, 20%);
  $color-link-hover: lighten($color-link, 20%);
  $color-link-wiki: lighten($primary, 20%);
  $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: $bgcolor-global;
  // $color-list-hover: $color-reversal;
  // $bgcolor-list-hover: ;
  // $color-list-active: $color-reversal;
  // $bgcolor-list-active: $primary;

  // Navbar
  $bgcolor-navbar: #35393f;
  $bgcolor-search-top-dropdown: #fa9913;
  $border-image-navbar: linear-gradient(to right, #f6d02e 0%, #f87c00 47%, #f6d02e 100%);
  // Logo colors
  $bgcolor-logo: $bgcolor-navbar;
  $fillcolor-logo-mark: lighten(desaturate($bgcolor-inline-code, 10%), 15%);

  // Sidebar
  $bgcolor-sidebar: $themecolor;
  $bgcolor-sidebar-nav-item-active: rgba(black, 0.37); // optional
  $text-shadow-sidebar-nav-item-active: 0px 0px 10px #0099ff; // optional
  // Sidebar resize button
  $color-resize-button: $color-reversal;
  $bgcolor-resize-button: #fa9913;
  $color-resize-button-hover: $color-reversal;
  $bgcolor-resize-button-hover: lighten($bgcolor-resize-button, 5%);
  // Sidebar contents
  $color-sidebar-context: $themecolor;
  $bgcolor-sidebar-context: #f4f6fc;
  // Sidebar list group
  $bgcolor-sidebar-list-group: #fafbff; // optional

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

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

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

  // admin theme box
  $color-theme-color-box: lighten($themecolor, 20%);

  @import 'apply-colors';
  @import 'apply-colors-light';

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

  .table {
    background-color: $themelight;
  }

  #search-typeahead-asynctypeahead {
    background-color: $bgcolor-global;
    .table {
      background-color: transparent;
    }
  }

  // login and register
  .nologin {
    a#login.link-switch,
    a#register.link-switch {
      color: rgba(black, 0.5);
    }

    .grw-external-auth-form {
      border-color: #aaa !important;
    }
  }
}

//== Dark Mode
//
// html[dark] {
//   $primary: #d65a31;

//   $basecolor: #222831;

//   // Background colors
//   $bgcolor-global: $basecolor;
//   $bgcolor-navbar: #151515;
//   $bgcolor-inline-code: darken($basecolor, 5%);
//   $bgcolor-card: darken($basecolor, 5%);

//   // Font colors
//   $color-global: #eeeeee;
//   $color-reversal: $gray-900;
//   // $color-header: desaturate($primary, 20%);
//   $color-link: $primary;
//   $color-link-hover: lighten($color-link, 10%);
//   $color-link-wiki: lighten($basecolor, 50%);
//   $color-link-wiki-hover: darken($color-link-wiki, 5%);
//   $color-link-nabvar: $color-global;
//   $color-inline-code: #c7254e; // optional

//   // List Group colors
//   $color-list: $color-global;
//   $bgcolor-list: $bgcolor-global;
//   $color-list-active: $color-reversal;
//   $bgcolor-list-active: $primary;
//   $color-list-hover: $color-reversal;

//   // Logo colors
//   $bgcolor-logo: $bgcolor-navbar;
//   $fillcolor-logo-mark: $gray-700;

//   // Icon colors
//   $color-editor-icons: darken($accentcolor, 15%);

//   // Border colors
//   $border-color-theme: black; // former: `$navbar-border: $gray-300;`

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

//   // Sidebar
//   $bgcolor-sidebar: $bgcolor-navbar;
//   $color-sidebar-context: $color-global;
//   $bgcolor-sidebar-context: lighten($bgcolor-navbar, 5%);

//   @import 'apply-colors';
//   @import 'apply-colors-dark';
// }
