
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}


:root {
  --color-primary: #303d52;
  --color-primary-text: #ffffff;
  --color-primary-light: #5a6f8f;
  --color-primary-lighter: #7f94b0;
  --color-primary-extra-light: #8da1b9;
  --color-primary-dark: #001f3f;
  
  --color-secondary: #73524C;
  --color-secondary-text: #ffffff;
  --color-secondary-light: #A9746D;
  --color-secondary-dark: #4F3732;

  --color-tertiary: #A3A96F;
  --color-tertiary-text: #202020;
  --color-tertiary-light: #BFC6A1;
  --color-tertiary-dark: #6E7343;

  --color-quaternary: #5C677B;
  --color-quaternary-text: #ffffff;
  --color-quaternary-light: #7F8A9E;
  --color-quaternary-dark: #3B4455;

  --color-quinary: #7D8465;
  --color-quinary-text: #202020;
  --color-quinary-light: #B2B99A;
  --color-quinary-dark: #505738;

  --color-grey: #f5f5f5;
  --color-grey-text: #000000;
  --color-grey-light: #ffffff;
  --color-grey-dark: #e0e0e0;

  --color-success: #4CAF50;
  --color-success-text: #ffffff;
  --color-success-light: #81c784;
  --color-success-dark: #388e3c;

  --color-warning: #FFC107;
  --color-warning-text: #ffffff;
  --color-warning-light: #ffd54f;
  --color-warning-dark: #ffa000;
  
  --color-error: #F44336;
  --color-error-text: #ffffff;
  --color-error-light: #e57373;
  --color-error-dark: #d32f2f;

  --color-info: #2196F3;
  --color-info-text: #ffffff;
  --color-info-light: #64b5f6;
  --color-info-dark: #1976d2;

  --color-white: #ffffff;
  --color-black: #000000;
}
:root {
  --border-radius-sm: 2px;
  --border-radius-md: 4px;
  --border-radius-lg: 8px;
  --border-radius-xl: 16px;
}
.button {
  background: var(--color-primary);
  border-radius: var(--border-radius-sm);
  border: none;
  color: var(--color-primary-text);
  cursor: pointer;

  transition: all 0.2s ease-in-out;

  &:hover {
    filter: brightness(0.9);
  }

  &.active {
    box-shadow: 0 0 5px 0px whitesmoke;
  }

  &.white {
    background: white;
    color: var(--color-primary);

    &:hover {
      background: rgba(255, 255, 255, 0.8)
    }
  }

  &.secondary {
    background: var(--color-secondary);
    color: var(--color-secondary-text);

    img.icon {
      filter: invert(1);
    }
  }

  &.tertiary {
    background: var(--color-tertiary);
    color: var(--color-tertiary-text);

    img.icon {
      filter: invert(0);
    }
  }

  &.quaternary {
    background: var(--color-quaternary);
    color: var(--color-quaternary-text);

    img.icon {
      filter: invert(1);
    }
  }

  &.square {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  &.icon-only {
    background: none;
  }

  &.sm {
    font-size: 0.7rem;
    padding: 3px 5px;
  }

  &.md {
    font-size: 0.8rem;
    padding: 5px 8px;
  }

  &.lg {
    font-size: 1rem;
    padding: 8px 12px;
  }
}
dialog[open] {
  opacity: 1;
  transform: scaleY(1);
  display: flex;

  &::backdrop {
    background-color: rgba(0, 0, 0, 0.8);
  }
}

dialog {
  border: none;
  border-radius: 4px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  background: var(--color-white);
  background-repeat: no-repeat;
  background-size: cover;
  width: 480px;
  min-height: 220px;
  max-height: 90%;
  flex-direction: column;

  opacity: 0;
  transform: scaleY(0);
  transition:
    opacity 0.2s ease-out,
    transform 0.1s ease-out,
    overlay 0.1s ease-out allow-discrete,
    display 0.1s ease-out allow-discrete;
  
  &.sm {
    width: 320px;
    min-height: 160px;
  }

  &.md {
    width: 480px;
  }

  &.lg {
    width: 640px;
  }

  &.huge {
    width: calc(100vw - 20%);
    height: calc(100vh - 20%);
    max-width: 800px;
  }

  &::backdrop {
    background-color: rgb(0 0 0 / 0%);
    transition:
      display 0.2s allow-discrete,
      overlay 0.2s allow-discrete,
      background-color 0.2s;
  }

  .title {
    user-select: none;
    font-size: 1rem;
    font-weight: 300;
  }

  .content {
    flex-grow: 2;
    padding: 12px 0;
  }

  .buttons {
    display: flex;
    justify-content: space-between;
  }
}

@starting-style {
  dialog[open] {
    opacity: 0;
    transform: scaleY(0);
  }
}

@starting-style {
  dialog[open]::backdrop {
    background-color: rgb(0 0 0 / 0%);
  }
}
.icon {
  width: 32px;
  height: 32px;

  &.icon-lg {
    width: 32px;
    height: 32px;
  }

  &.icon-md {
    width: 24px;
    height: 24px;
  }

  &.icon-sm {
    width: 16px;
    height: 16px;
  }

  &.icon-xs {
    width: 12px;
    height: 12px;
  }
}

body {
  margin: 0px;
  padding: 0px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  background: var(--color-grey);
}
