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

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

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

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

$themecolor: #b9b177;
$themelight: #f5f3ee;

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

  // Background colors
  $bgcolor-global: white;
  $bgcolor-card: #ece8de;
  $bgcolor-blinked-section: rgba($primary, 0.3);
  $bgcolor-keyword-highlighted: $grw-marker-blue;

  // Font colors
  // $color-global: black;
  $color-global: #433005;
  $color-reversal: #fffffc;
  $color-link: #9d7406;
  $color-link-hover: lighten($color-link, 10%);
  $color-link-wiki: $color-link;
  $color-link-wiki-hover: lighten($color-link-wiki, 10%);
  $color-link-nabvar: #a7a7a7;
  $color-search: white;

  // Inline code
  $bgcolor-inline-code: $themelight; //optional
  // $color-inline-code: # !default;
  $bordercolor-inline-code: $themecolor; //optional

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

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

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

  // Logo colors
  $bgcolor-logo: darken($themecolor, 10%);
  $fillcolor-logo-mark: lighten(desaturate($themecolor, 50%), 50%); // Icon colors
  $color-editor-icons: $color-global;

  // Sidebar
  $bgcolor-sidebar: transparent;
  // Sidebar contents
  $color-sidebar-context: #9d7406;
  $bgcolor-sidebar-context: transparent;
  // Sidebar list group
  $bgcolor-sidebar-list-group: rgba(#f7f5f1, 0.5);
  // Sidebar resize button
  $color-resize-button: white;
  $bgcolor-resize-button: $themecolor;

  // Border colors
  $border-color-theme: $gray-300; // former: `$navbar-border: $gray-300;`
  $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($primary, 20%);

  // alert
  $color-alert: $color-reversal;

  // portal
  $info: lighten($themecolor, 10%);

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

  /*
   * Modal
   */
  .modal-dialog .modal-header.bg-primary {
    background-image: url('/images/themes/wood/wood-navbar.jpg');
  }

  // Sidebar
  .grw-sidebar {
    div[data-testid='GlobalNavigation'] {
      background-image: url('/images/themes/wood/wood-navbar.jpg');

      button,
      .btn {
        border: none;
      }
    }
    div[data-testid='ContextualNavigation'] {
      > div {
        background-color: rgba(white, 0.6);
        background-image: url('/images/themes/wood/wood-navbar.jpg');
        background-blend-mode: lighten;
      }
    }
  }

  // login and register
  .nologin {
    background: white;

    .login-header,
    .login-dialog {
      background-color: rgba(black, 0.1);
    }

    .link-switch {
      color: rgba(black, 0.5);
    }

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

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