$theme-colors: () !default;
// stylelint-disable-next-line scss/dollar-variable-default
$theme-colors: map-merge(
    (
        "theme": $theme
    ),
    $theme-colors
);

// Alpha value (RGBA) e.g. for header background.
$shimmering: 0.8 !default;

// Thumb color of scrollbar.
$scrollbar-thumb-color: white !default;

// Thumb color of scrollbar as RGB (like `255, 255, 255`).
$scrollbar-thumb-color-rgb:
    red($scrollbar-thumb-color), green($scrollbar-thumb-color), blue($scrollbar-thumb-color) !default;

// Default size for many components, like sidebar menu items.
$normal-size: calc(
    var(--bs-btn-border-width, 1px) + var(--bs-btn-padding-y, 0.375rem) +
        (var(--bs-btn-font-size, 1rem) * var(--bs-btn-line-height, 1.5)) + var(--bs-btn-padding-y, 0.375rem) +
        var(--bs-btn-border-width, 1px)
) !default;

// Height of actions menu when it is expanded, like on mobile devices.
$actions-height: 7.5rem !default;

// Background color of menu toggle button.
$bla-button-bg-normal: rgba(0, 0, 0, 0.1) !default;

// Background color of menu toggle button on hover state.
$bla-button-bg-hover: rgba(white, 0.25) !default;

// Font size for sidebar menu items.
$bla-btn-font-size: 1em !default;

// Padding for action menu items.
$bla-header-nav-padding: 0.75rem !default;

// Width of the sidebar.
$bla-sidebar-width: 234px !default;

// Background of sidebar.
$sidebar-bg: $theme !default;
$sidebar-bg-dark: $theme-dark !default;

// Background of sidebar when it's opened (on mobile devices).
$sidebar-open-bg: darken($sidebar-bg, 30%) !default;

// Background of sidebar menu dropdown menus
$sidebar-deep-bg: darken($sidebar-bg, 4%) !default;

// Text color of sidebar.
$sidebar-color: color-contrast($sidebar-bg, $gray-900) !default;
$sidebar-color-dark: color-contrast($sidebar-bg-dark, $gray-900) !default;

// Color of indicator for active menu item in sidebar.
$sidebar-indicator-color: $primary !default;
$sidebar-indicator-color-dark: $white !default;

// Background of search control in sidebar.
$sidebar-search-bg: $input-bg !default;

// Background of the body element
$app-bg: $theme !default;
$app-bg-dark: $theme-dark !default;

// Background color of Header
$header-bg: $theme !default;
$header-bg-dark: $theme-dark !default;

// Text color of header elements
$header-color: color-contrast($header-bg, $gray-900) !default;
$header-color-dark: color-contrast($header-bg-dark, $gray-900) !default;

// Background of header action menu dropdown menus
$header-deep-bg: darken($header-bg, 4%) !default;

// Background color, when hovering action menu item.
$actions-control-bg-hover: $bla-button-bg-hover !default;

// Shrink sidebar on smaller screens
$sidebar-shrink: true !default;

// Breakpoint for sidebar shrink
$sidebar-shrink-breakpoint: 600px !default;

// Breakpoint for sidebar fully expanded
$sidebar-expanded-breakpoint: 1400px !default;

$corner-shape: #{round} !default;

:root {
    --blue-app-bg: #{$app-bg};

    --blue-scrollbar-thumb-color-rgb: #{$scrollbar-thumb-color-rgb};

    --blue-sidebar-width: #{$bla-sidebar-width};
    --blue-sidebar-color: #{$sidebar-color};
    --blue-theme: var(--theme, #{$theme});
    --blue-shimmering: 0.9;

    --blue-sidebar-bg: #{$sidebar-bg};
    --blue-header-bg: #{$header-bg};

    --blue-header-height: 48px;
    --blue-header-color: #{$header-color};
    --blue-action-link-bg-color: var(--blue-theme);
    --blue-menu-item-indicator-bg: #{$sidebar-indicator-color};
    --blue-menu-item-height: #{$normal-size};

    --blue-corner-shape: #{$corner-shape};
}

:root,
:host {
    --blue-read-view-padding-x: #{$input-btn-padding-x};
    --blue-read-view-padding-y: #{$input-btn-padding-y};
    --blue-read-view-transition: background 0.2s;
}

@include color-mode(dark, true) {
    --blue-app-bg: #{$app-bg-dark};

    --blue-sidebar-color: #{$sidebar-color-dark};

    --blue-sidebar-bg: #{$sidebar-bg-dark};
    --blue-header-bg: #{$header-bg-dark};

    --blue-header-color: #{$header-color-dark};

    --blue-menu-item-indicator-bg: #{$sidebar-indicator-color-dark};
}
