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

// == Define Bootstrap theme colors
//

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

$themecolor: #b3000c;
$themelight: white;
$subthemecolor: #30882c;
$bgcolor-global: $themelight;
$linktext: $subthemecolor;
$linktext-hover: lighten($subthemecolor, 15%);
$sidebar-text: white;
$fillcolor-logo-mark: lighten(desaturate($themecolor, 50%), 50%);
$color-link-wiki: lighten($subthemecolor, 5%);
$color-link-wiki-hover: lighten($color-link-wiki, 15%);

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

//== Light Mode
//
html[light],
html[dark] {
  $primary: #d3c665;
  // Background colors
  $bgcolor-card: $gray-50;
  $bgcolor-inline-code: $gray-100; //optional
  $bgcolor-blinked-section: rgba($primary, 0.5);
  //$bgcolor-keyword-highlighted: $grw-marker-yellow;

  // Font colors
  $color-global: #112744;
  $color-reversal: $gray-100;
  $color-link: $subthemecolor;
  $color-link-hover: lighten($color-link, 10%);
  $color-link-nabvar: $color-reversal;
  $color-inline-code: #c7254e; // optional
  $color-modal-header: $themelight;

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

  // List Group colors
  // $color-list: $color-global;
  $bgcolor-list: transparent;
  // $color-list-hover: $color-reversal;
  $color-list-active: $themelight;
  $bgcolor-list-active: $themecolor;

  // Navbar
  $bgcolor-navbar: $themecolor;
  $bgcolor-search-top-dropdown: $primary;
  $border-color-navbar-gradient-left: #545fff;
  $border-color-navbar-gradient-right: #00a6e5;
  $border-image-navbar: linear-gradient(to right, $primary 0%, $subthemecolor 100%);

  // Logo colors
  $bgcolor-logo: $themecolor;

  // Sidebar
  $bgcolor-sidebar: $subthemecolor;
  $bgcolor-sidebar-nav-item-active: rgba(black, 0.37); // optional
  $text-shadow-sidebar-nav-item-active: 0px 0px 10px $primary; // optional
  // Sidebar resize button
  $color-resize-button: $color-reversal;
  $bgcolor-resize-button: $primary;
  $color-resize-button-hover: $color-reversal;
  $bgcolor-resize-button-hover: lighten($bgcolor-resize-button, 5%);
  $color-sidebar-context: $linktext;
  $bgcolor-sidebar-context: #f4fcf6;
  // Sidebar list group
  $bgcolor-sidebar-list-group: #fafbff; // optional

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

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

  // Dropdown colors
  $bgcolor-dropdown-link-active: $themecolor;

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

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

  // change color of highlighted header in wiki (default: orange)

  .sidebar {
    background: $themecolor;
  }

  .rbt-menu {
    background: $themelight;
  }

  #wrapper > #page-wrapper,
  .page-editor-preview-container {
    background-image: url('/images/themes/christmas/christmas.jpg');
    background-attachment: fixed;
    background-size: cover;
  }

  // login page
  .nologin {
    .input-group {
      .input-group-text {
        color: $gray-700;
        background-color: rgba(darken(white, 20%), 0.6);
      }
      .form-control {
        color: $gray-700;
        background-color: rgba(white, 0.6);
      }
    }

    .login-header,
    .login-dialog {
      background-color: rgba(#ccc, 0.5);
    }
    .link-switch {
      color: #bd3425;
    }

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

  /*
  * Modal
  */
  .modal-dialog .modal-header.bg-primary {
    background-image: url('/images/themes/christmas/christmas-navbar.jpg');
    border-bottom: 2px solid $subthemecolor;
  }

  /*
  * Card
  */
  .card {
    &.border-primary {
      border-color: $themecolor !important;
    }
    .card-header.bg-primary {
      color: white;
      background-image: url('/images/themes/christmas/christmas-navbar.jpg') !important;
    }
  }

  .grw-navbar {
    background-image: url('/images/themes/christmas/christmas-navbar.jpg');
  }

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