/* ************************************************************************** */
/* Import typography. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* */
@import url('./typography.theme.css');

/* ************************************************************************** */
/* Import the color themes. *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* */
@import url('./base.theme.css');
@import url('./light.theme.css');
@import url('./dark.theme.css');

/* ************************************************************************** */
/* Import the stylings for our components. -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* */
@import url('./components/action.component.css');
@import url('./components/alert.component.css');
@import url('./components/button.component.css');
@import url('./components/card.component.css');
@import url('./components/context-menu.component.css');
@import url('./components/data-table.component.css');
@import url('./components/dialog.component.css');
@import url('./components/icon.component.css');
@import url('./components/input.component.css');
@import url('./components/layout.component.css');
@import url('./components/list.component.css');
@import url('./components/menu.component.css');
@import url('./components/scrollbar.component.css');
@import url('./components/sidebar.component.css');
@import url('./components/theme.component.css');
@import url('./components/timeline.component.css');
@import url('./components/tree-grid.component.css');
@import url('./components/user.component.css');

:root {
  /* ************************************************************************** */
  /* Layout Settings ********************************************************** */
  --mw-divider-style: solid;
  --mw-border-style: solid;
  --mw-border-radius: 0.25em;
  --mw-divider-width: 0.12em;
  --mw-outline-width: 0.375em;
  --mw-default-margin: 1em;
  --mw-default-padding: 1em;
  --mw-default-gap: 1em;
  --mw-default-radius: 0.35em;
  --mw-default-border: 0.075em;
  --mw-scrollbar-width: 0.3125;
  --mw-scrollbar-border-width: 0.3rem;

  /* ************************************************************************** */
  /* Input Field Settings ***************************************************** */
  --mw-control-border-radius: var(--mw-default-radius);
  --mw-control-border-layout: var(--mw-default-border) var(--mw-border-style);
  --mw-control-padding: calc(var(--mw-default-padding) / 2);
}

/* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+- */
/* Global Styles                                       */
/* -+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+- */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
  border: none;
  margin: 0;
  padding: 0;
}

body,
html {
  background-color: var(--alternate-background-color);
  font-family: var(--primary-font-family);
  display: block;
  height: 100%;
  min-height: 100%;
}

*::backdrop {
  background-color: #efefef;
  opacity: 80%;
}

@media (prefers-color-scheme: dark) {

  body,
  html {
    background-color: #121212;
  }

  *::backdrop {
    background-color: #222222;
  }
}

/* ************************************************************************** */
/* Header Font Settings ***************************************************** */
h1,
h2,
h3,
h4,
h5 {
  color: var(--header-text-color);
  font: var(--secondary-font);
}

h1 {
  font: var(--text-h1-font);
}

h2 {
  font: var(--text-h2-font);
}

h3 {
  font: var(--text-h3-font);
}

h4 {
  font: var(--text-h4-font);
}

h5 {
  font: var(--text-h5-font);
}

h6 {
  font: var(--text-h6-font);
}

/* ************************************************************ */
/* Subtitle Font Settings ************************************* */
.subtitle {
  font: var(--text-subtitle-primary-font);
}

.secondary-subtitle {
  font: var(--text-subtitle-secondary-font);
}

/* ************************************************************ */
/* Paragraph Font Settings ************************************ */
p {
  font: var(--text-paragraph-primary-font);
}

p.secondary {
  font: var(--text-paragraph-secondary-font);
}

/* ************************************************************ */
/* Text Label Font Settings *********************************** */
label,
.label {
  font: var(--text-label-font);
}

/* ************************************************************ */
/* Text Form Label Font Settings ****************************** */
label.form-label {
  font: var(--text-label-font);
}

/* ************************************************************ */
/* Text Caption Font Settings ********************************* */
.caption {
  font: var(--text-caption-font);
}

/* ************************************************************ */
/* Code Block Styling ***************************************** */
code {
  background-color: var(--primary-background-color);
  font-family: var(--monospace-font-family);
  font-weight: 500;
  border-radius: 0.3em;
  padding: 0.25em 0.5em;
  font-size: 0.8em;
}

/* ************************************************************ */
/* Common Layouts Styling ************************************* */

header,
footer {
  padding: var(--mw-default-padding);
  display: flex;
  flex-direction: row;
  gap: var(--mw-default-gap);
  line-height: 1;
  box-sizing: content-box;
}

header>*,
footer>* {
  margin-top: auto;
  margin-bottom: auto;
}

header {
  border-bottom: var(--mw-primary-border);
  font-weight: 600;
  font-weight: bold;
}

footer {
  border-top: var(--mw-primary-border);
}

.hstack {
  display: flex;
  flex-direction: row;
  align-self: stretch;
}

.vstack {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

/* ************************************************************ */
/* Form Styling *********************************************** */

/* Add margin to all direct children. */
form>*:not(:first-child) {
  margin: var(--mw-default-margin) 0 0;
}

form.row {
  display: flex;
  flex-direction: row;
}

form.column {
  display: flex;
  flex-direction: column;
}

.form-label,
.form-caption {
  color: var(--hint-text-color);
  display: inline-block;
}

.form-caption {
  font: var(--text-form-small-font);
  margin-top: calc(var(--mw-default-margin) / 3);
}

/* ************************************************************ */
/* Helper Classes ********************************************* */
.hidden {
  display: none;
}

.full-width {
  width: 100%;
}

.clearfix::after {
  content: '';
  clear: both;
  display: table;
}
