/* reset.css */

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

/* Remove default margin and padding */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
main, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* Set base line-height */
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* Remove list styles */
ol, ul {
  list-style: none;
}

/* Remove quotes from blockquotes and q */
blockquote, q {
  quotes: none;
}
blockquote::before, blockquote::after,
q::before, q::after {
  content: '';
  content: none;
}

/* Remove default table border spacing */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Remove default button and input styles */
button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  appearance: none;
}

/* Remove anchor underline */
a {
  text-decoration: none;
  color: inherit;
}

/* Remove image border */
img {
  border-style: none;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Remove heading styles */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  font-weight: normal;
}

/* Set base background and color */
body {
  background: #fff;
  color: #000;
}
:root {
  --color-primary: #2B323B;
  --color-primary-light: #55657b;
  --color-primary-dark: #21252a;
  --color-primary-contrast: #f3f3f3;
  --color-primary-contrast-dark: color-mix(in srgb, var(--color-primary-contrast) 70%, black);
  --color-primary-icon-filter: invert(100%);
  
  --color-secondary: #877148;
  --color-secondary-light: #b3955e;
  --color-secondary-dark: #6b5938;
  --color-secondary-contrast: #f3f3f3;
  --color-secondary-contrast-dark: color-mix(in srgb, var(--color-secondary-contrast) 70%, black);
  --color-secondary-icon-filter: invert(100%);
  
  --color-tertiary: #707A87;
  --color-tertiary-light: #929fb0;
  --color-tertiary-dark: #4e555e;
  --color-tertiary-contrast: #f1f1f1;
  --color-tertiary-contrast-dark: color-mix(in srgb, var(--color-tertiary-contrast) 70%, black);
  --color-tertiary-icon-filter: invert(100%);

  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-black-light: #4f4f4f;
  --color-black-extra-light: #cbcbcb;
  --color-grey: #dddddd;
  --color-grey-dark: #acacac;
  --color-grey-light: #e1e0e0;
  --color-grey-extra-light: #ededed;
  --color-grey-icon-filter: invert(100%);

  --color-success: #0a9728;
  --color-success-contrast: #f3f3f3;
  --color-success-light: #0eaa30;
  --color-success-light-contrast: #f3f3f3;
  --color-success-dark: #08721f;
  --color-success-dark-contrast: #f3f3f3;
  --color-success-icon-filter: invert(100%);

  --color-alert: #960B1B;
  --color-alert-contrast: #f3f3f3;
  --color-alert-light: #b00f1f;
  --color-alert-light-contrast: #f3f3f3;
  --color-alert-dark: #7a0916;
  --color-alert-dark-contrast: #f3f3f3;
  --color-alert-icon-filter: invert(100%);

  --color-warning: #E3A427;
  --color-warning-contrast: #f3f3f3;
  --color-warning-light: #f3b74d;
  --color-warning-light-contrast: #f3f3f3;
  --color-warning-dark: #c88b1f;
  --color-warning-dark-contrast: #f3f3f3;
  --color-warning-icon-filter: invert(100%);

  --color-info: #0C9CB0;
  --color-info-contrast: #f3f3f3;
  --color-info-light: #0fa4c1;
  --color-info-light-contrast: #f3f3f3;
  --color-info-dark: #0a7a8c;
  --color-info-dark-contrast: #f3f3f3;
  --color-info-icon-filter: invert(100%);
}

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700&display=swap');
:root {
  --border-radius-sm: 0.2rem;
  --border-radius-md: 0.4rem;
  --border-radius-lg: 0.8rem;
}
img.icon {
  width: 24px;
  height: 24px;
  display: inline-block;
  background-size: cover;

  &.icon-inverted {
    filter: invert(1);
  }

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

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

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

  &.icon-lg {
    width: 48px;
    height: 48px;
  }
}
dialog {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem;
  border: 1px solid var(--color-grey-light, #e1e0e0);
  border-radius: var(--border-radius-lg, 0.8rem);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.16),
    0 2px 8px rgba(0, 0, 0, 0.08);
  background: var(--color-white);
  background-repeat: no-repeat;
  background-size: cover;
  width: 480px;
  min-height: 220px;
  max-height: 90%;
  opacity: 1;

  transition:
    opacity 0.2s ease-out,
    transform 0.2s ease-out,
    overlay 0.1s ease-out allow-discrete,
    display 0.1s ease-out allow-discrete;

  &.right {
    transform: translateX(0);
    margin-top: 0;
    margin-bottom: 0;
    margin-right: 0;
    max-height: none !important;
    height: calc(100vh - 2rem) !important;
    width: 400px !important;
    border-radius: 0;

    &.sm {
      width: 420px !important;
    }

    &.md {
      width: 520px !important;
    }

    &.lg {
      width: 640px !important;
    }
  }
  
  &.sm {
    width: 320px;
    min-height: 160px;
  }

  &.md {
    width: 480px;
  }

  &.lg {
    width: 640px;
  }

  &.portrait {
    width: 520px;
    height: 90vh;
  }

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

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

  .title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary-dark, #21252a);
    margin: 0;
  }

  .content {
    flex-grow: 2;
    padding: 0;
    margin: 0;
    overflow-y: auto;
  }

  .buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.25rem;
  }
}

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

  dialog[open].right {
    opacity: 1;
    transform: translateX(100%);
  }
}

@starting-style {
  dialog[open]::backdrop {
    background-color: rgb(0 0 0 / 0%);
    backdrop-filter: blur(0);
  }
}

.button-group {
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: flex-end;
  
  button {
    border-radius: 0;
  }

  button:first-child {
    border-top-left-radius: var(--border-radius-sm);
    border-bottom-left-radius: var(--border-radius-sm);
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  button:last-child {
    border-top-left-radius: 0 !important;;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: var(--border-radius-sm);
    border-bottom-right-radius: var(--border-radius-sm);
  }

  button:nth-child(1):nth-last-child(1) {
    border-radius: var(--border-radius-sm) !important;
  }
}

button {
  cursor: pointer;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding: 0.5rem;
  border-radius: var(--border-radius-sm);
  transition: background 0.3s;

  &.submit {
    background: var(--color-primary);
    color: var(--color-primary-contrast);
  }

  &:hover {
    background: var(--color-primary-light);
  }

  &:active {
    background: var(--color-primary-dark);
  }

  &.sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  &.md {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;

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

  &.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    padding: 0;

    img {
      width: 100%;
      height: 100%;
      display: block;
    }
  }
}

html {
  overflow: hidden;
}

body {
  height: 100%;
  overflow: auto;
  margin: 0px;
  padding: 0px;
  font-family: 'Roboto', sans-serif;
  background-color: var(--background-color, #f0f0f0);
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.3);
}
