/* Copyright (c) 2022 Ivan Teplov */

* {
  margin: 0;
  padding: 0;
}

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

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000;
    --foreground: #fff;
    --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 {
  padding: 1rem;
  font-size: 1rem;
  border-radius: 1rem;
  border: 0.0625rem solid var(--divider);

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

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

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

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

/*
 height: 30vh;
*/
#ai_sheet .contents {
  border-radius: 1rem 1rem 0 0;

  background: var(--background);

  position: relative;
  overflow-y: hidden;

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

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

  max-height: 99vh;
  height: 30vh;

  max-width: 70rem;

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

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

#ai_sheet .contents.fullscreen {
  /*border-radius: 0;*/
}

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

#ai_sheet .draggable-area {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 3rem;
  margin: auto;
  padding: 1rem;
  cursor: grab;
}

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

#ai_sheet .close-ai_sheet {
  position: absolute;
  right: 0;
  top: 0;
  border: none;
   font-size: 44px;
}

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