/*
 * SearXNG, A privacy-respecting, hackable metasearch engine
 *
 * To change the colors of the site, simple edit this variables
 */

/// Light Theme
:root {
  /// Base Colors
  --color-base-font: #4d5156;
  --color-base-font-rgb: 77, 81, 86;
  --color-base-background: #fff;
  --color-base-background-mobile: #f1f3f4;
  --color-url-font: #1a0dab;
  --color-url-visited-font: #609;
  /// Header Colors
  --color-header-background: #fff;
  --color-header-border: #ebebeb;
  /// Footer Colors
  --color-footer-background: #f2f2f2;
  --color-footer-border: #dadce0;
  /// Sidebar Colors
  --color-sidebar-border: #dfe1e5;
  --color-sidebar-font: #000;
  --color-sidebar-background: #fff;
  /// BackToTop Colors
  --color-backtotop-font: #4d5156;
  --color-backtotop-border: #dfe1e5;
  --color-backtotop-background: #fff;
  /// Button Colors
  --color-btn-background: #1a73e8;
  --color-btn-font: #fff;
  --color-show-btn-background: #f2f2f2;
  --color-show-btn-font: #4d5156;
  /// Search Input Colors
  --color-search-border: #ebebeb;
  --color-search-shadow: 0 2px 5px 1px rgba(64, 60, 67, 0.16);
  --color-search-shadow-hover: 0 2px 8px 1px rgba(64, 60, 67, 0.24);
  --color-search-background: #fff;
  --color-search-font: #000;
  --color-search-background-hover: #1a73e8;
  /// Modal Colors
  --color-error: #db3434;
  --color-error-background: lighten(#db3434, 40%);
  --color-warning: #dbba34;
  --color-warning-background: lighten(#dbba34, 40%);
  --color-success: #42db34;
  --color-success-background: lighten(#42db34, 40%);
  /// Categories Colors
  --color-categories-item-selected-font: #1a73e8;
  --color-categories-item-border-selected: #1a73e8;
  /// Autocomplete Colors
  --color-autocomplete-font: #000;
  --color-autocomplete-border: transparent;
  --color-autocomplete-shadow: 0 2px 8px 1px rgba(64, 60, 67, 0.24);
  --color-autocomplete-background: #fff;
  --color-autocomplete-background-hover: #f2f2f2;
  /// Answer Colors
  --color-answer-border: #dfe1e5;
  --color-answer-font: #000;
  --color-answer-background: #f2f2f2;
  /// Results Colors
  --color-result-background: #fff;
  --color-result-border: #dfe1e5;
  --color-result-url-font: #202124;
  --color-result-vim-selected: #f2f2f2;
  --color-result-vim-arrow: #1a73e8;
  --color-result-description-highlight-font: #4d5156;
  --color-result-link-font: #1a0dab;
  --color-result-link-font-highlight: #1a0dab;
  --color-result-link-visited-font: #609;
  --color-result-publishdate-font: #4d5156;
  --color-result-engines-font: #4d5156;
  --color-result-search-url-border: #dfe1e5;
  --color-result-search-url-font: #000;
  // Images Colors
  --color-result-image-span-font: #202124;
  --color-result-image-span-font-selected: #fff;
  --color-result-image-background: #fff;
  /// Settings Colors
  --color-settings-tr-hover: #f2f2f2;
  --color-settings-engine-description-font: #909090;
  --color-settings-table-group-background: #f2f2f2;
  /// Detail modal
  --color-result-detail-font: #fff;
  --color-result-detail-label-font: lightgray;
  --color-result-detail-background: #000;
  --color-result-detail-hr: #3c4043;
  --color-result-detail-link: #8ab4f8;
  --color-result-detail-loader-border: rgba(255, 255, 255, 0.2);
  --color-result-detail-loader-borderleft: rgba(0, 0, 0, 0);
  /// Toolkit Colors
  --color-toolkit-badge-font: #fff;
  --color-toolkit-badge-background: #4d5156;
  --color-toolkit-kbd-font: #fff;
  --color-toolkit-kbd-background: #000;
  --color-toolkit-dialog-border: #ebebeb;
  --color-toolkit-dialog-background: #fff;
  --color-toolkit-tabs-label-border: #fff;
  --color-toolkit-tabs-section-border: #ebebeb;
  --color-toolkit-select-background: #f2f2f2;
  --color-toolkit-select-border: #ddd;
  --color-toolkit-select-background-hover: #bbb;
  --color-toolkit-input-text-font: #000;
  --color-toolkit-checkbox-onoff-off-background: #dfe1e5;
  --color-toolkit-checkbox-onoff-on-background: #dfe1e5;
  --color-toolkit-checkbox-onoff-on-mark-background: #1a73e8;
  --color-toolkit-checkbox-onoff-on-mark-color: #fff;
  --color-toolkit-checkbox-onoff-off-mark-background: #4d5156;
  --color-toolkit-checkbox-onoff-off-mark-color: #fff;
  --color-toolkit-checkbox-label-background: #dfe1e5;
  --color-toolkit-checkbox-label-border: #f2f2f2;
  --color-toolkit-checkbox-input-border: #1a73e8;
  --color-toolkit-engine-tooltip-border: #f2f2f2;
  --color-toolkit-engine-tooltip-background: #fff;
  --color-toolkit-loader-border: rgba(0, 0, 0, 0.2);
  --color-toolkit-loader-borderleft: rgba(255, 255, 255, 0);
  --color-doc-code: #fff;
  --color-doc-code-background: #1a73e8;
}

.dark-themes() {
  /// Base Colors
  --color-base-font: #bdc1c6;
  --color-base-font-rgb: 189, 193, 198;
  --color-base-background: #202124;
  --color-base-background-mobile: #171717;
  --color-url-font: #8ab4f8;
  --color-url-visited-font: #c58af9;
  /// Header Colors
  --color-header-background: #202124;
  --color-header-border: #3c4043;
  /// Footer Colors
  --color-footer-background: #171717;
  --color-footer-border: #212327;
  /// Sidebar Colors
  --color-sidebar-border: #3c4043;
  --color-sidebar-font: #fff;
  --color-sidebar-background: #171717;
  /// BackToTop Colors
  --color-backtotop-font: #bdc1c6;
  --color-backtotop-border: #212327;
  --color-backtotop-background: #171717;
  /// Button Colors
  --color-btn-background: #8ab4f8;
  --color-btn-font: #202124;
  --color-show-btn-background: #171717;
  --color-show-btn-font: #bdc1c6;
  /// Search Input Colors
  --color-search-border: transparent;
  --color-search-shadow: 0 1px 3px rgba(23, 23, 23, 0.24);
  --color-search-shadow-hover: 0 4px 12px rgba(23, 23, 23, 0.9);
  --color-search-background: #303134;
  --color-search-font: #fff;
  --color-search-background-hover: #8ab4f8;
  /// Modal Colors
  --color-error: #f55b5b;
  --color-error-background: darken(#db3434, 40%);
  --color-warning: #f1d561;
  --color-warning-background: darken(#dbba34, 40%);
  --color-success: #79f56e;
  --color-success-background: darken(#42db34, 40%);
  /// Categories Colors
  --color-categories-item-selected-font: #8ab4f8;
  --color-categories-item-border-selected: #8ab4f8;
  /// Autocomplete Colors
  --color-autocomplete-font: #fff;
  --color-autocomplete-border: transparent;
  --color-autocomplete-shadow: 0 4px 12px rgba(23, 23, 23, 0.9);
  --color-autocomplete-background: #303134;
  --color-autocomplete-background-hover: #171717;
  /// Answer Colors
  --color-answer-font: #fff;
  --color-answer-background: #171717;
  /// Results Colors
  --color-result-background: #202124;
  --color-result-border: #3c4043;
  --color-result-url-font: #bdc1c6;
  --color-result-vim-selected: #171717;
  --color-result-vim-arrow: #8ab4f8;
  --color-result-description-highlight-font: #bdc1c6;
  --color-result-link-font: #8ab4f8;
  --color-result-link-font-highlight: #8ab4f8;
  --color-result-link-visited-font: #c58af9;
  --color-result-publishdate-font: #bdc1c6;
  --color-result-engines-font: #bdc1c6;
  --color-result-search-url-border: #3c4043;
  --color-result-search-url-font: #fff;
  /// Detail modal : same as the light version
  --color-result-detail-font: #fff;
  --color-result-detail-label-font: lightgray;
  --color-result-detail-background: #000;
  --color-result-detail-hr: #3c4043;
  --color-result-detail-link: #8ab4f8;
  --color-result-detail-loader-border: rgba(255, 255, 255, 0.2);
  --color-result-detail-loader-borderleft: rgba(0, 0, 0, 0);
  // Images Colors
  --color-result-image-span-font: #bdc1c6;
  --color-result-image-span-font-selected: #222;
  --color-result-image-background: #222;
  /// Settings Colors
  --color-settings-tr-hover: #3c4043;
  --color-settings-engine-description-font: #bdc1c6;
  --color-settings-table-group-background: #171717;
  /// Toolkit Colors
  --color-toolkit-badge-font: #202124;
  --color-toolkit-badge-background: #bdc1c6;
  --color-toolkit-kbd-font: #000;
  --color-toolkit-kbd-background: #fff;
  --color-toolkit-dialog-border: #3c4043;
  --color-toolkit-dialog-background: #202124;
  --color-toolkit-tabs-label-border: #202124;
  --color-toolkit-tabs-section-border: #3c4043;
  --color-toolkit-select-background: #303134;
  --color-toolkit-select-border: #555;
  --color-toolkit-select-background-hover: #3c4043;
  --color-toolkit-input-text-font: #fff;
  --color-toolkit-checkbox-onoff-off-background: #303134;
  --color-toolkit-checkbox-onoff-on-background: #303134;
  --color-toolkit-checkbox-onoff-on-mark-background: #8ab4f8;
  --color-toolkit-checkbox-onoff-on-mark-color: #202124;
  --color-toolkit-checkbox-onoff-off-mark-background: #bdc1c6;
  --color-toolkit-checkbox-onoff-off-mark-color: #202124;
  --color-toolkit-checkbox-label-background: #202124;
  --color-toolkit-checkbox-label-border: #3c4043;
  --color-toolkit-checkbox-input-border: #8ab4f8;
  --color-toolkit-engine-tooltip-border: #3c4043;
  --color-toolkit-engine-tooltip-background: #202124;
  --color-toolkit-loader-border: rgba(0, 0, 0, 0.2);
  --color-toolkit-loader-borderleft: rgba(255, 255, 255, 0);
  --color-doc-code: #202124;
  --color-doc-code-background: #8ab4f8;
}

/// Dark Theme (autoswitch based on device pref)
@media (prefers-color-scheme: dark) {
  :root.theme-auto {
    .dark-themes();
  }
}

// Dark Theme by preferences
:root.theme-dark {
  .dark-themes();
}

/// General Size
@results-width: 45rem;
@results-sidebar-width: 25rem;
@results-offset: 10rem;
@results-tablet-offset: 0.5rem;
@results-gap: 5rem;
@results-margin: 0.125rem;
@result-padding: 1rem;
@results-image-row-height: 12rem;
@results-image-row-height-phone: 6rem;
@search-width: 46rem;
// heigh of #search, see detail.less
@search-height: 8.7rem;

/// Device Size
/// @desktop > @tablet
@tablet: 79.75em; // see https://github.com/searxng/searxng/issues/874
@phone: 50em;
@small-phone: 35em;
@ultra-small-phone: 20rem;

/// From style.less
@stacked-bar-chart: rgb(0, 0, 0);

/// Override search bar height for autcomplete position
.autocomplete {
  &.open {
    margin-top: 4rem !important;
  }
}

/// Load fonts from this directory.
@icon-font-path:          "../../../fonts/";
//** File name for all font files.
@icon-font-name:          "glyphicons-halflings-regular";
//** Element ID within SVG icon file.
@icon-font-svg-id:        "glyphicons_halflingsregular";

// decoration of the select HTML elements
@select-light-svg-path:   "../svg/select-light.svg";
@select-dark-svg-path:    "../svg/select-dark.svg";
