/* Copyright (c) 2022 Ivan Teplov */

* {
  margin: 0;
  padding: 0;
}

:root {
  --background: #506E61;
  --foreground: #000;
  --divider: #dcdcdc;
  --overlay: #888;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000;
    --foreground: #506E61;
    --divider: #333;
  }
}
/*
html,
body {
  height: 100%;
}*/

body {
  /*background: var(--background);*/
  color: var(--foreground);

  overflow: hidden;
  line-height: 1.5;

  -webkit-tap-highlight-color: transparent;
}
/*
button,
input,
textarea,
[contenteditable="true"] {
  box-sizing: border-box;
  padding: 1rem;

  border-radius: 1rem;
  border: 0.0625rem solid var(--divider);

  font-family: inherit;
  font-size: 1rem;

  background: var(--background);
  color: var(--foreground);
}

textarea {
  resize: none;
}

button {
  cursor: pointer;
}*/
button {
  cursor: pointer;
  background: var(--background);
}

.sheet {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;

 /* position: fixed;*/
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20000;
  visibility: visible;
  transition: opacity 0.5s, visibility 0.5s;
  position: sticky;
  opacity: 1;
  width: 30%;
  float: right;
}

.sheet[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/*.sheet .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: var(--overlay);
  opacity: 0.5;
}*/

.sheet .contents {
  display: flex;
  flex-direction: column;

  /*border-radius: 1rem 1rem 0 0;*/

  background: var(--background);

  overflow-y: hidden;

  --default-transitions: transform 0.5s, border-radius 0.5s;

  transition: var(--default-transitions);
  transform: translateY(0);
  max-height: 100vh;
  height: 30vh;
  box-sizing: border-box;
  width: 100%;
  opacity: 0.9;
}

.sheet .contents:not(.not-selectable) {
  transition: var(--default-transitions), height 0.5s;
}

.sheet .contents.fullscreen {
  border-radius: 0;
}

.sheet[aria-hidden="true"] .contents {
  transform: translateY(100%);
}

.sheet .controls {
  display: flex;
}

.sheet .contents h3{
  color: #fff;
  font-weight: 700;
  padding: 1rem;
}

.sheet .draggable-area {
  width: 2rem;
  margin: auto;
  padding: 1rem;
  cursor: grab;
}

.sheet .draggable-thumb {
  width: inherit;
  height: 0.25rem;
  background: var(--divider);
  border-radius: 0.125rem;
}

.sheet .close-sheet {
  position: absolute;
  right: 20px;
  top: 20px;
  width: 31px;
  height: 31px;
  color: #333;
  font-size: 31px;
  font-weight: 800;
  line-height: 1em;
  text-align: center;
  background: white;
  -webkit-border-radius: 16px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  z-index: 10000000;
}

.sheet .body {
  flex-grow: 1;
  height: 100%;

  display: flex;
  flex-direction: column;

  overflow-y: auto;
  gap: 1rem;

  padding: 1rem;
  box-sizing: border-box;
}

