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

// == 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-editor-preview-container {
    background-image: url('/images/themes/antarctic/bg.svg');
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
  }
}

.nologin {
  background: unset !important;
  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
//
:root {
  $primary: $themecolor;

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

  // 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;

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

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

  &, body {
    background-image: url('../images/antarctic/bg.svg');
    background-attachment: fixed;
    background-position: 50%;
    background-size: cover;
  }

  //Button
  .btn-group.grw-page-editor-mode-manager {
    .btn.btn-outline-primary {
      @include page-editor-mode-manager.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;
    }
  }
}
