/* The tokens every component reads, and the page under them. */

:root {
  color-scheme: light dark;
  --canvas: #f6f6f4;
  --raised: #ffffff;
  --ink: #15171a;
  --muted: #6c7177;
  --hairline: rgba(21, 23, 26, 0.12);
  --sent: #0e6b63;
  --sent-ink: #ffffff;
  --received: #e7e8e4;
  --received-ink: #15171a;
  --accent: #0e6b63;
  --accent-ink: #ffffff;
  --danger: #c2362b;
  --online: #2f9e5b;
  --bar: rgba(246, 246, 244, 0.82);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-rounded: ui-rounded, 'SF Pro Rounded', -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #000000;
    --raised: #1b1d1f;
    --ink: #f2f2f0;
    --muted: #8d9298;
    --hairline: rgba(242, 242, 240, 0.14);
    --sent: #138a7f;
    --received: #26292c;
    --received-ink: #f2f2f0;
    --accent: #2bb3a5;
    --accent-ink: #00201d;
    --danger: #ff6b5e;
    --online: #4cd07d;
    --bar: rgba(0, 0, 0, 0.78);
  }
}

/* With the keyboard up it covers the home indicator, so the bottom inset would only push the compose bar higher. */
:root[data-keyboard] {
  --safe-bottom: 0px;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  /* No double-tap zoom: a tap acts at once, as in a native app. */
  touch-action: manipulation;
}

app-shell {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--app-height, 100dvh);
  transform: translateY(var(--app-top, 0px));
  display: block;
}
