/* Copyright (c) 2022 Ivan Teplov */

#sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  visibility: visible;
  transition: opacity 0.5s, visibility 0.5s;
}

#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-color:rgba(0,0,0,0.5);
  opacity: 0.5;
}

#sheet .contents {
  border-radius: 1rem 1rem 0 0;

  background: #fff;

  position: fixed;
  bottom: 0;
  overflow-y: hidden;

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

  transition: var(--default-transitions);
  transform: translateY(0);

  max-height: 100%;
  height: 30vh;
  width: 100%;

  box-sizing: border-box;
  padding: 1rem;
  padding-top: 3rem;

  box-shadow: 0 0 25px rgb(23 23 23 / 25%);
}

#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 .draggable-area {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 3rem;
  margin: auto;
  padding: 1rem;
  cursor: grab;
}

#sheet .draggable-thumb {
  width: inherit;
  height: 0.25rem;
  background: #CCC;
  border-radius: 0.125rem;
}

#sheet .close-sheet {
  position: absolute;
  right: 10px;
  top: 0;
  border: none;
  font-weight: 900;
  font-size: 14px;
  background: none;
}

#sheet .body {
  height: 100%;
  overflow-y: auto;
  gap: 1rem;
}
