/* ==UserStyle==
@name           SearXNG Catppuccin
@namespace      github.com/catppuccin/searxng
@homepageURL    https://github.com/catppuccin/searxng
@version        0.2.1
@description    Soothing pastel theme for SearXNG
@author         Catppuccin
@updateURL      https://github.com/catppuccin/searxng/raw/main/catppuccin.user.css
@preprocessor   stylus
@var select lighttheme "Light Variant" ["Latte*", "Frappe", "Macchiato", "Mocha"]
@var select darktheme "Dark Variant" ["Latte", "Frappe", "Macchiato", "Mocha*"]
@var checkbox additions "Additional Tweaks" 0
==/UserStyle== */

@-moz-document url-prefix("http://ransack.i2p/"),
url-prefix("https://darmarit.org/searx/"),
url-prefix("https://de.xcxc.ml/"),
url-prefix("https://dynabyte.ca/"),
url-prefix("https://etsi.me/"),
url-prefix("https://icanfindit.online/"),
url-prefix("https://jackgoss.xyz/"),
url-prefix("https://jsearch.pw/"),
url-prefix("https://metasearch.nl/"),
url-prefix("https://northboot.xyz/"),
url-prefix("https://notsearch.uk/"),
url-prefix("https://opnxng.com/"),
url-prefix("https://paulgo.io/"),
url-prefix("https://priv.au/"),
url-prefix("https://privatus.live/"),
url-prefix("https://s.frlt.one/"),
url-prefix("https://s.zhaocloud.net/"),
url-prefix("https://saber.tk/"),
url-prefix("https://search.0relay.com/"),
url-prefix("https://search.affusio.com/"),
url-prefix("https://search.bus-hit.me/"),
url-prefix("https://search.callmeecho.dev/"),
url-prefix("https://search.chemicals-in-the-water.eu/"),
url-prefix("https://search.cronobox.one/"),
url-prefix("https://search.disroot.org/"),
url-prefix("https://search.ethibox.fr/"),
url-prefix("https://search.gcomm.ch/"),
url-prefix("https://search.kiwitalk.de/"),
url-prefix("https://search.mdosch.de/"),
url-prefix("https://search.mpx.wtf/"),
url-prefix("https://search.neet.works/"),
url-prefix("https://search.ononoki.org/"),
url-prefix("https://search.privacyguides.net/"),
url-prefix("https://search.projectsegfau.lt/"),
url-prefix("https://search.rabbit-company.com/"),
url-prefix("https://search.rhscze.cf/"),
url-prefix("https://search.rowie.at/"),
url-prefix("https://search.sapti.me/"),
url-prefix("https://search.serginho.dev/"),
url-prefix("https://search.smnz.de/"),
url-prefix("https://search.snopyta.org/"),
url-prefix("https://search.stinpriza.org/"),
url-prefix("https://search.teamriverbubbles.com/"),
url-prefix("https://search.trom.tf/"),
url-prefix("https://search.unlocked.link/"),
url-prefix("https://search.uspersec.com/"),
url-prefix("https://search.vidhukant.xyz/"),
url-prefix("https://search.zzls.xyz/"),
url-prefix("https://searx.baczek.me/"),
url-prefix("https://searx.be/"),
url-prefix("https://searx.becomesovran.com/"),
url-prefix("https://searx.bissisoft.com/"),
url-prefix("https://searx.chocoflan.net/"),
url-prefix("https://searx.divided-by-zero.eu/"),
url-prefix("https://searx.dresden.network/"),
url-prefix("https://searx.ebnar.xyz/"),
url-prefix("https://searx.ericaftereric.top/"),
url-prefix("https://searx.esmailelbob.xyz/"),
url-prefix("https://searx.fi/"),
url-prefix("https://searx.fmac.xyz/"),
url-prefix("https://searx.fossencdi.org/"),
url-prefix("https://searx.gnous.eu/"),
url-prefix("https://searx.gnu.style/"),
url-prefix("https://searx.kujonello.cf/"),
url-prefix("https://searx.mastodontech.de/"),
url-prefix("https://searx.mha.fi/"),
url-prefix("https://searx.mistli.net/"),
url-prefix("https://searx.mxchange.org/"),
url-prefix("https://searx.nakhan.net/"),
url-prefix("https://searx.namejeff.xyz/"),
url-prefix("https://searx.netzspielplatz.de/"),
url-prefix("https://searx.nixnet.services/"),
url-prefix("https://searx.org/"),
url-prefix("https://searx.orion-hub.fr/"),
url-prefix("https://searx.priv.pw/"),
url-prefix("https://searx.prvcy.eu/"),
url-prefix("https://searx.rimkus.it/"),
url-prefix("https://searx.roflcopter.fr/"),
url-prefix("https://searx.ru/"),
url-prefix("https://searx.run/"),
url-prefix("https://searx.semipvt.com/"),
url-prefix("https://searx.sethforprivacy.com/"),
url-prefix("https://searx.sev.monster/"),
url-prefix("https://searx.slipfox.xyz/searx/"),
url-prefix("https://searx.sp-codes.de/"),
url-prefix("https://searx.stuehieyr.com/"),
url-prefix("https://searx.tiekoetter.com/"),
url-prefix("https://searx.tuxcloud.net/"),
url-prefix("https://searx.tyil.nl/"),
url-prefix("https://searx.vanwa.tech/"),
url-prefix("https://searx.webheberg.info/"),
url-prefix("https://searx.xyz/"),
url-prefix("https://searx.zapashcanon.fr/"),
url-prefix("https://searx.zcyph.cc/"),
url-prefix("https://searxng.ir/"),
url-prefix("https://searxng.nicfab.eu/"),
url-prefix("https://searxng.zackptg5.com/"),
url-prefix("https://serx.ml/"),
url-prefix("https://sh0.it/"),
url-prefix("https://soek.allesbeste.com/"),
url-prefix("https://spot.ecloud.global/"),
url-prefix("https://srx.cosmohub.io/"),
url-prefix("https://searx.oakleycord.dev/"),
url-prefix("https://suche.dasnetzundich.de/"),
url-prefix("https://suche.tromdienste.de/"),
url-prefix("https://suche.uferwerk.org/"),
url-prefix("https://swag.pw/"),
url-prefix("https://sx.catgirl.cloud/"),
url-prefix("https://timdor.noip.me/searx/"),
url-prefix("https://trydex.tk/searxng/"),
url-prefix("https://www.gruble.de/"),
url-prefix("https://www.webrats.xyz/"),
url-prefix("https://xcxc.ml/"),
url-prefix("https://xo.wtf/") {

  colourscheme(flavour) {
    if (flavour=="Latte") {
      --ctp-rosewater: #dc8a78;
      --ctp-flamingo: #dd7878;
      --ctp-pink: #ea76cb;
      --ctp-mauve: #8839ef;
      --ctp-red: #d20f39;
      --ctp-maroon: #e64553;
      --ctp-peach: #fe640b;
      --ctp-yellow: #df8e1d;
      --ctp-green: #40a02b;
      --ctp-teal: #179299;
      --ctp-sky: #04a5e5;
      --ctp-sapphire: #209fb5;
      --ctp-blue: #1e66f5;
      --ctp-lavender: #7287fd;
      --ctp-text: #4c4f69;
      --ctp-subtext1: #5c5f77;
      --ctp-subtext0: #6c6f85;
      --ctp-overlay2: #7c7f93;
      --ctp-overlay1: #8c8fa1;
      --ctp-overlay0: #9ca0b0;
      --ctp-surface2: #acb0be;
      --ctp-surface1: #bcc0cc;
      --ctp-surface0: #ccd0da;
      --ctp-base: #eff1f5;
      --ctp-mantle: #e6e9ef;
      --ctp-crust: #dce0e8;
    }

    if (flavour=="Frappe") {
      --ctp-rosewater: #f2d5cf;
      --ctp-flamingo: #eebebe;
      --ctp-pink: #f4b8e4;
      --ctp-mauve: #ca9ee6;
      --ctp-red: #e78284;
      --ctp-maroon: #ea999c;
      --ctp-peach: #ef9f76;
      --ctp-yellow: #e5c890;
      --ctp-green: #a6d189;
      --ctp-teal: #81c8be;
      --ctp-sky: #99d1db;
      --ctp-sapphire: #85c1dc;
      --ctp-blue: #8caaee;
      --ctp-lavender: #babbf1;
      --ctp-text: #c6d0f5;
      --ctp-subtext1: #b5bfe2;
      --ctp-subtext0: #a5adce;
      --ctp-overlay2: #949cbb;
      --ctp-overlay1: #838ba7;
      --ctp-overlay0: #737994;
      --ctp-surface2: #626880;
      --ctp-surface1: #51576d;
      --ctp-surface0: #414559;
      --ctp-base: #303446;
      --ctp-mantle: #292c3c;
      --ctp-crust: #232634;
    }

    if (flavour=="Macchiato") {
      --ctp-rosewater: #f4dbd6;
      --ctp-flamingo: #f0c6c6;
      --ctp-pink: #f5bde6;
      --ctp-mauve: #c6a0f6;
      --ctp-red: #ed8796;
      --ctp-maroon: #ee99a0;
      --ctp-peach: #f5a97f;
      --ctp-yellow: #eed49f;
      --ctp-green: #a6da95;
      --ctp-teal: #8bd5ca;
      --ctp-sky: #91d7e3;
      --ctp-sapphire: #7dc4e4;
      --ctp-blue: #8aadf4;
      --ctp-lavender: #b7bdf8;
      --ctp-text: #cad3f5;
      --ctp-subtext1: #b8c0e0;
      --ctp-subtext0: #a5adcb;
      --ctp-overlay2: #939ab7;
      --ctp-overlay1: #8087a2;
      --ctp-overlay0: #6e738d;
      --ctp-surface2: #5b6078;
      --ctp-surface1: #494d64;
      --ctp-surface0: #363a4f;
      --ctp-base: #24273a;
      --ctp-mantle: #1e2030;
      --ctp-crust: #181926;
    }

    if (flavour=="Mocha") {
      --ctp-rosewater: #f5e0dc;
      --ctp-flamingo: #f2cdcd;
      --ctp-pink: #f5c2e7;
      --ctp-mauve: #cba6f7;
      --ctp-red: #f38ba8;
      --ctp-maroon: #eba0ac;
      --ctp-peach: #fab387;
      --ctp-yellow: #f9e2af;
      --ctp-green: #a6e3a1;
      --ctp-teal: #94e2d5;
      --ctp-sky: #89dceb;
      --ctp-sapphire: #74c7ec;
      --ctp-lavender: #b4befe;
      --ctp-blue: #89b4fa;
      --ctp-text: #cdd6f4;
      --ctp-subtext1: #bac2de;
      --ctp-subtext0: #a6adc8;
      --ctp-overlay2: #9399b2;
      --ctp-overlay1: #7f849c;
      --ctp-overlay0: #6c7086;
      --ctp-surface2: #585b70;
      --ctp-surface1: #45475a;
      --ctp-surface0: #313244;
      --ctp-base: #1e1e2e;
      --ctp-mantle: #181825;
      --ctp-crust: #11111b;
    }

  }

  .theme-light {
    if (lighttheme=="Latte")     { colourscheme(Latte) }
    if (lighttheme=="Frappe")    { colourscheme(Frappe) }
    if (lighttheme=="Macchiato") { colourscheme(Macchiato) }
    if (lighttheme=="Mocha")     { colourscheme(Mocha) }
  }
  .theme-dark {
    if (darktheme=="Latte")     { colourscheme(Latte) }
    if (darktheme=="Frappe")    { colourscheme(Frappe) }
    if (darktheme=="Macchiato") { colourscheme(Macchiato) }
    if (darktheme=="Mocha")     { colourscheme(Mocha) }
  }

  .theme-auto {
    if (lighttheme=="Latte")     { colourscheme(Latte) }
    if (lighttheme=="Frappe")    { colourscheme(Frappe) }
    if (lighttheme=="Macchiato") { colourscheme(Macchiato) }
    if (lighttheme=="Mocha")     { colourscheme(Mocha) }
  }

  @media (prefers-color-scheme: dark) {
    .theme-auto {
      if (darktheme=="Latte")     { colourscheme(Latte) }
      if (darktheme=="Frappe")    { colourscheme(Frappe) }
      if (darktheme=="Macchiato") { colourscheme(Macchiato) }
      if (darktheme=="Mocha")     { colourscheme(Mocha) }
    }
  }

    :root.theme-auto, :root.theme-dark, :root.theme-light {
        --color-base-font: var(--ctp-text);
        --color-base-background: var(--ctp-base);
        --color-base-background-mobile: var(--ctp-base);
        --color-url-font: var(--ctp-lavender);
        --color-url-visited-font: var(--ctp-mauve);
        --color-header-background: var(--ctp-mantle);
        --color-header-border: var(--ctp-mantle);
        --color-footer-background: var(--ctp-mantle);
        --color-footer-border: var(--ctp-mantle);
        --color-sidebar-border: var(--ctp-base);
        --color-sidebar-font: var(--ctp-text);
        --color-sidebar-background: var(--ctp-base);
        --color-backtotop-font: var(--ctp-subtext1);
        --color-backtotop-border: var(--ctp-surface0);
        --color-backtotop-background: var(--ctp-surface0);
        --color-btn-background: var(--ctp-lavender);
        --color-btn-font: var(--ctp-base);
        --color-show-btn-background: var(--ctp-lavender);
        --color-show-btn-font: var(--ctp-base);
        --color-search-border: var(--ctp-surface0);
        --color-search-shadow: 0 2px 8px var(--ctp-crust);
        --color-search-background: var(--ctp-surface0);
        --color-search-font: var(--ctp-text);
        --color-search-background-hover: var(--ctp-lavender);
        --color-error: $red;
        --color-error-background: var(--ctp-surface0);
        --color-warning: $yellow;
        --color-warning-background: var(--ctp-surface0);
        --color-success: $green;
        --color-success-background: var(--ctp-surface0);
        --color-categories-item-selected-font: var(--ctp-text);
        --color-categories-item-border-selected: var(--ctp-mauve);
        --color-autocomplete-font: var(--ctp-subtext1);
        --color-autocomplete-border: var(--ctp-surface0);
        --color-autocomplete-shadow: 0 2px 8px var(--ctp-crust);
        --color-autocomplete-background: var(--ctp-surface0);
        --color-autocomplete-background-hover: var(--ctp-surface1);
        --color-answer-font: var(--ctp-text);
        --color-answer-background: var(--ctp-mantle);
        --color-result-background: var(--ctp-mantle);
        --color-result-border: var(--ctp-base);
        --color-result-url-font: var(--ctp-subtext1);
        --color-result-vim-selected: var(--ctp-surface0);
        --color-result-vim-arrow: var(--ctp-lavender);
        --color-result-description-highlight-font: var(--ctp-text);
        --color-result-link-font: var(--ctp-lavender);
        --color-result-link-font-highlight: var(--ctp-lavender);
        --color-result-link-visited-font: var(--ctp-mauve);
        --color-result-publishdate-font: var(--ctp-surface2);
        --color-result-engines-font: var(--ctp-surface2);
        --color-result-search-url-border: var(--ctp-surface2);
        --color-result-search-url-font: var(--ctp-text);
        --color-result-detail-font: var(--ctp-text);
        --color-result-detail-label-font: var(--ctp-surface1);
        --color-result-detail-background: var(--ctp-base);
        --color-result-detail-hr: var(--ctp-base);
        --color-result-detail-link: var(--ctp-lavender);
        --color-result-detail-loader-border: rgba(255, 255, 255, 0.2);
        --color-result-detail-loader-borderleft: var(--ctp-crust);
        --color-result-image-span-font: var(--ctp-text);
        --color-result-image-span-font-selected: var(--ctp-base);
        --color-result-image-background: var(--ctp-mantle);
        --color-settings-tr-hover: var(--ctp-surface0);
        --color-settings-engine-description-font: var(--ctp-text);
        --color-settings-engine-group-background: var(--ctp-surface0);
        --color-toolkit-badge-font: var(--ctp-text);
        --color-toolkit-badge-background: var(--ctp-surface0);
        --color-toolkit-kbd-font: var(--ctp-text);
        --color-toolkit-kbd-background: var(--ctp-mantle);
        --color-toolkit-dialog-border: var(--ctp-mantle);
        --color-toolkit-dialog-background: var(--ctp-mantle);
        --color-toolkit-tabs-label-border: var(--ctp-base);
        --color-toolkit-tabs-section-border: var(--ctp-base);
        --color-toolkit-select-background: var(--ctp-surface0);
        --color-toolkit-select-border: var(--ctp-surface0);
        --color-toolkit-select-background-hover: var(--ctp-surface1);
        --color-toolkit-input-text-font: var(--ctp-text);
        --color-toolkit-checkbox-onoff-off-background: var(--ctp-surface0);
        --color-toolkit-checkbox-onoff-on-background: var(--ctp-surface0);
        --color-toolkit-checkbox-onoff-on-mark-background: var(--ctp-green);
        --color-toolkit-checkbox-onoff-on-mark-color: var(--ctp-mantle);
        --color-toolkit-checkbox-onoff-off-mark-background: var(--ctp-red);
        --color-toolkit-checkbox-onoff-off-mark-color: var(--ctp-mantle);
        --color-toolkit-checkbox-label-background: var(--ctp-base);
        --color-toolkit-checkbox-label-border: var(--ctp-mantle);
        --color-toolkit-checkbox-input-border: var(--ctp-blue);
        --color-toolkit-engine-tooltip-border: var(--ctp-surface0);
        --color-toolkit-engine-tooltip-background: var(--ctp-surface0);
        --color-toolkit-loader-border: rgba(255, 255, 255, 0.2);
        --color-toolkit-loader-borderleft: var(--ctp-crust);
        --color-doc-code: var(--ctp-rosewater);
        --color-doc-code-background: var(--ctp-mantle);
    }
    if (additions) {
      article.result {
          background-color: var(--color-result-background);
          border-radius: .75em;
          padding: .75em;
          margin: .5em;
      }
      article.category-images {
          padding-bottom: 4em;
      }
    }
}