@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans&display=swap');

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'IBM Plex Sans', sans-serif;
  margin: 0;
  font-size: 17px;
}

html, body {
  height: 100%;
  overflow-y: hidden;
}

h1 {
  margin: 0.2rem 0 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}

h3 {
  margin: 0.2rem 0;
  font-weight: 400;
  line-height: 1.2;
}

header {
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
  padding: 0 20px 5px;
  border-bottom: 4px solid #ced4da;
  box-sizing: border-box;
  height: 80px;
}
main {
  display: flex;
  flex-direction: row;
  padding: 20px 10px 0;
  /*extra 5 to make it easy to see*/
  height: calc(100vh - 85px);
  box-sizing: border-box;
}

.dnd-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-grow: 1;
}

#dnd {
  max-width: 900px;
  flex-grow: 1;
  margin: 0 auto;
  height: 300px;
  transition: background 600ms ease;
  text-align: center;
  border: 2px dashed #ced4da;
  color: #868e96;
  padding-top: 1rem;
}

.dragover {
  /* slightly change the white to hint at drop */
  background: #eff7ff;
}

#error {
  color: #dc3545;
  font-style: italic;
}

.image-area {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  padding: 0 10px 10px 0;
}

.main-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  /*a bit less than main to allow for the label*/
  max-height: calc(100vh - 85px - 50px);
  border: 1px solid black;
}

.checkerboard {
  background-image: linear-gradient(45deg, #aaa 25%, transparent 25%), linear-gradient(-45deg, #aaa 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #aaa 75%), linear-gradient(-45deg, transparent 75%, #aaa 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.label {
  color: #868e96;
  font-style: italic;
  width: 100%;
  text-align: center;
}

.conversation {
  flex-grow: 1;
  min-width: 20%;
  max-width: 500px;
  max-height: 100%;
  overflow-y: auto;
}

.hidden {
  display: none;
}

.message {
  border-top: 4px solid #ced4da;
}

p, dl {
  margin: 0.25rem 0 0.5rem;
}

dl {
  display: grid;
  grid-template-columns: 180px auto;
}

dt {
  font-weight: bold;
  text-align: right;
  color: #666;
}

dd {
  margin-inline-start: 10px;
}

.flex-justify-right {
  display: flex;
  justify-content: flex-end;
}

textarea {
  width: calc(100% - 6px);
  height: 80px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 17px;
}

/* spinner from https://loading.io/css/ */
.lds-ellipsis {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}
.lds-ellipsis div {
  position: absolute;
  top: 33px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: black;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.lds-ellipsis div:nth-child(1) {
  left: 8px;
  animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
  left: 8px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
  left: 32px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
  left: 56px;
  animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes lds-ellipsis3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
@keyframes lds-ellipsis2 {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(24px, 0);
  }
}
