/* Template Name: Lotus Docs
   Author: Colin Wilson
   E-mail: colin@aigis.uk
   Created: October 2022
   Version: 1.2.0
   File Description: Main CSS file for Lotus Docs
*/

// Custom Font Variables
$font-family-secondary:  {{ .Site.Params.secondary_font | default "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Ubuntu'" }};
$font-family-sans-serif: {{ .Site.Params.sans_serif_font | default "-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Ubuntu'" }};
$font-family-monospace:  {{ .Site.Params.mono_font | default "SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace" }};

// Code Padding Variables
$code-block-padding-top: {{ if eq .Site.Params.docs.prism true -}}0{{ else }}1.25rem 0 0 0{{ end }};

// Icon Fonts
@import "custom/plugins/icons/google-material";

// Core files
@import "../../scss/bootstrap/functions";
@import "../../scss/bootstrap/variables";
@import {{ printf "'%s%s'" "custom/colors/" (.Site.Params.docs.themeColor | default "blue") }}; // current theme color
@import "../../scss/bootstrap/mixins";
@import "../../scss/bootstrap/bootstrap";
@import "variables";

{{ if and (.Site.Params.docsearch.appID) (.Site.Params.docsearch.apiKey) -}}
@import "custom/plugins/docsearch/style";
{{ end }}

// Structure
@import "custom/structure/general";
@import "custom/structure/content";
@import "custom/structure/sidebar";
@import "custom/structure/doc-nav";
@import "custom/structure/toc";
@import "custom/structure/footer";

// Components
@import "custom/components/buttons";
@import "custom/components/breadcrumb";
@import "custom/components/badge";
@import "custom/components/backgrounds";
@import "custom/components/alerts";
@import "custom/components/card";
@import "custom/components/forms";
@import "custom/components/table";
@import "custom/components/tabs";
@import "custom/components/tooltip";

// Pages
@import "custom/pages/features";
@import "custom/pages/helper";

// Plugins

// Prism / Chroma
{{- if eq .Site.Params.docs.prism true }}
@import {{ printf "'%s%s'" "custom/plugins/prism/themes/" (.Site.Params.docs.prismTheme | default "lotusdocs") }}; // current prism theme
@import "custom/plugins/prism/prism";
{{- else }}
@import "custom/plugins/chroma/default";
{{- end -}}

// FlexSearch
{{ if or (not (isset .Site.Params.flexsearch "enabled")) (eq .Site.Params.flexsearch.enabled true) -}}@import "custom/plugins/flexsearch/flexsearch";{{ end }}

// Feedback Widget
{{ if .Site.Params.feedback.enabled | default false -}}@import "custom/plugins/feedback/feedback";{{ end}}

// Mermaid
@import "custom/plugins/mermaid/mermaid";

h1 {
    margin-top: .5em;
    font-weight: 900 !important;
    margin-left: auto;
    margin-right: auto;
    padding: 0.1em 0.4em;
    border-radius: 0.8em 0.3em;
    background: transparent;
    background-image: linear-gradient(
        to right,
        hsla(226, 66, 51, 0.3),
        hsla(226, 66, 51, 0.1)
    );
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

h2 {
    padding-top: 1.5em;
    padding-bottom: 0.5em;
}

h4 {
    padding-top: 0.75em;
}

div.code-toolbar, .docs-content .main-content pre {
    border-radius: 1rem;
}

code[class*="language-"], pre[class*="language-"], .code-toolbar, .docs-content .main-content pre, code[class*="language-"]::-webkit-scrollbar, pre[class*="language-"]::-webkit-scrollbar {
    background: var(--inline-code-bg) !important;
    color: var(--body-color) !important;
}

.top-header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#toc-mobile > ul {
    padding-left: 1rem;
    padding-right: 1rem;
}

#doc-nav {
    .doc-prev .card-title {
        margin-left: auto;
    }
    .doc-next .card-title {
        margin-right: auto;
    }

    .card-body {
        display: flex;

        .card-title {
            align-items: center;
            display: flex;
        }
    }
}

.alert > .w-100 {
    overflow: hidden
}