/* http://meyerweb.com/eric/tools/css/reset/
   v5.0.1 | 20191019
   License: none (public domain)
*/

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;
}

/* HTML5 display-role reset for older browsers */

article, aside, details, figcaption, figure,
footer, header, hgroup, main, menu, nav, section {
	display: block;
}

/* HTML5 hidden-attribute fix for newer browsers */

*[hidden] {
    display: none;
}

body {
	line-height: 1;
}

menu, ol, ul {
	list-style: none;
}

blockquote, q {
	quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* basic variables + styles */

:root {
  --error: #ef4444;

  --dark-opacity: rgba(0, 0, 0, 0.3);
  --light-opacity: rgba(0, 0, 0, 0.3);
  --superdark-opacity: rgba(0, 0, 0, 0.8);
  --superlight-opacity: rgba(255, 255, 255, 0.8);

  --chat-background: rgba(255, 255, 255, 0.4);

  --box-shadow: 2px 2px 5px var(--light-opacity);

  --base-grey: #d2d2d2;
  --base-white: #ffffff;

  --brand-black: #000000;
  --brand-grey: #efefef;
  --brand-light-violet: #eee9f9;
  --brand-primary-violet: #cbbbec;

  --text-primary: #18181b;
  --text-secondary: #3f3f46;
  --text-tertiary: #71717a;

  --font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";

  background-color: #efefef;
  font-family: var(--font-family);
  font-size: 62.5%;

  --border-radius: 1rem;

  --gap-size: 0.8rem;
}

/* basic rules, for my own sanity */

* {
  box-sizing: border-box;
}

body {
  line-height: 1.25;
}

svg {
  vertical-align: middle;
}

/* for old OS */

#old-browser-warning {
  background: #fff;
  bottom: 0;
  height: 100%;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10000;
}

@supports (display: grid) and (inset: 0) and (height: 0dvh) {
  #old-browser-warning {
    display: none;
  }
}

/* for a11y */

.sr-only {
  height: 1px;
  left: -9999px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

/* to make it app-like */

::-webkit-scrollbar {
  display: none;
}

html {
  touch-action: manipulation;
}

body {
  overscroll-behavior-x: none;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
}

a,
button {
  color: var(--text-primary);
  outline: none;
  text-decoration: none;
}

* {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* The main screen layout */

.stack {
  inset: 0;
  position: fixed;
  display: grid;
  grid:
    "header" minmax(0, auto)
    "content" minmax(0, 1fr)
    "navigation" minmax(0, auto)
    / 100%;
  height: 100dvh;
  overflow: hidden;
}

.stack-container {
  grid-area: content;
  position: relative;
}

.stack-wrapper {
  bottom: 0;
  display: flex;
  height: 100%;
  position: absolute;
  top: 0;
}

.screen {
  height: 100%;
  overflow: auto;
}

#loading-dots {
  height: 30px;
}

#loading-dots #dot1 {
  animation: load 1s infinite;
}

#loading-dots #dot2 {
  animation: load 1s infinite;
  animation-delay: 0.2s;
}

#loading-dots #dot3 {
  animation: load 1s infinite;
  animation-delay: 0.4s;
}

@keyframes load {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
