/**
 * @name Noctalia Material
 * @version 3.0.6
 * @description A fork of 'Material Discord' for Noctalia Shell
 * @author CapnKitten
 *
 * @website http://github.com/CapnKitten
 * @source https://github.com/CapnKitten/BetterDiscord/blob/master/Themes/Material-Discord/css/source.css
 * @donate https://paypal.me/capnkitten
 * @invite jzJkA6Z
 */

@import url("https://capnkitten.github.io/BetterDiscord/Themes/Material-Discord/css/source.css");

/* Material You addon */
@import url("https://capnkitten.github.io/BetterDiscord/Themes/Material-Discord/css/addons/material-you/source.css");




/* MATERIAL YOU DARK THEME SETTINGS */
.theme-dark {
    --saturation-modifier: 0.31;
    --lightness-modifier: 0.225;
    --text-lightness-modifier: 1.0;
}

/* MATERIAL YOU LIGHT THEME SETTINGS */
.theme-light {
    --saturation-modifier: 0.74;
    --lightness-modifier: 2.125;
    --text-lightness-modifier: 1.0;
}

:root, .theme-dark, .theme-light {
  /* See options at https://github.com/CapnKitten/Material-Discord */
  /* Accent */
  --accent-hue: {{colors.primary.default.hue}};
  --accent-saturation: {{colors.primary.default.saturation}}%;
  --accent-lightness: {{colors.primary.default.lightness}}%;
  --accent-text-color: {{colors.on_primary.default.hex}};

  /* App */
  --app-bg: {{colors.surface.default.hex}};
  --main-color: {{colors.surface.default.hex}};
  --main-alt: {{colors.surface.default.hex}};
  --server-color: {{colors.surface.default.hex}};
  --status-picker-color: {{colors.surface_container.default.hex}};
  --sidebar-panel-color: {{colors.surface_container.default.hex}};
  --chat-color: {{colors.surface.default.hex}};
  --tooltip-color: {{colors.surface.default.hex}};
  --tooltip-text-color: {{colors.on_surface.default.hex}};

  /* Message */
  --message-color: {{colors.surface_container.default.hex}};
  --message-color-hover: hsl(
    var(--accent-hue),
    calc(var(--accent-saturation) * var(--saturation-modifier) * var(--saturation-factor)),
    calc(var(--accent-lightness) * var(--lightness-modifier) * var(--ui-darkness-modifier) * 4)
  ) !important;
  --message-color-alt: {{colors.on_secondary.default.hex}};
  --attachment-color: {{colors.on_primary.default.hex}};
  --main-textarea-color: {{colors.primary.default.hex}};
  --main-textarea-button-color: {{colors.on_primary.default.hex}};
  --main-textarea-color-alt: {{colors.secondary.default.hex}};
  --main-textarea-border: {{colors.surface_container.default.hex}};

  /* Card */
  --card-color-filled: {{colors.surface_container.default.hex}};
  --card-color-hover: {{colors.inverse_primary.default.hex}};
  --card-color-active: {{colors.inverse_primary.default.hex}};
  --card-color-alt: {{colors.secondary_container.default.hex}};
  --card-color-alt-hover: {{colors.secondary.default.hex}};
  --card-border-color: {{colors.surface_container.default.hex}};
  --card-header-text-color: {{colors.on_surface.default.hex}};

  /* Slider & Switch */
  --switch-knob-color: {{colors.surface_container.default.hex}};
  --switch-slider-color: {{colors.surface.default.hex}};

  /* Input */
  --input-text-color: {{colors.on_surface.default.hex}};

  /* Misc */
  --app-watermark-one: "Noctalia";
  --app-watermark-two: "Discord";

  /* Ensure channels-default is different from the active one - works in dark mode / light mode is another story... */
  --text-tertiary: hsl(
        var(--accent-hue),
        calc(var(--accent-saturation) * var(--saturation-modifier) * 0.78 * var(--saturation-factor)),
        calc(var(--accent-lightness) * var(--lightness-modifier) * var(--ui-darkness-modifier) * var(--text-lightness-modifier) * 3.0)
    ) !important;
}
