html,
body {
  font-family: sans-serif;
  height: 100%;
  margin: 0;
  min-width: 100%;
}

h1 {
  margin: 0;
  padding-top: 0.5em;
  padding-bottom: 0.5em;
}

* {
  box-sizing: border-box;
}

.page-container {
  background: #fef;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1px;
  width: 100%;
}

.page {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  margin: 8px;
}

.page.no-border {
  margin: 0;
}

h1 {
  border-bottom: 1px dashed grey;
  text-align: center;
}

.input-field {
  margin: 5px 0;
}

.input-field label {
  display: block;
}

input {
  border: 1px solid black;
  margin: 4px 0;
  outline: none;
  padding: 5px;
}

.btn,
button {
  background-color: #eee;
  border: none;
  border-radius: 5px;
  box-shadow: 0 2px #bbb;
  color: black;
  cursor: default;
  display: inline-block;
  font-size: 90%;
  margin-top: 2px;
  padding: 10px 15px;
  position: relative;
  outline: none;
  text-decoration: none;
}

.btn:hover,
button:hover {
  box-shadow: 0 4px #bbb;
  top: -2px;
}

.btn:active,
button:active {
  box-shadow: 0 0 #bbb;
  top: 2px;
}

/* Fullscreen Popups */

.fullscreen-popups {
  width: 100%;
  height: 100%;
}

.fullscreen-popup-backing {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(100, 100, 100, 0.9);
  z-index: 1000;
}

.fullscreen-popup {
  background-color: white;
  border: 2px solid #000;
  position: fixed;
  margin: auto;
  padding: 1em;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  width: fit-content;
  height: fit-content;
  overflow-y: auto;
  max-height: 100%;
}

.fullscreen-popup.wide {
  width: unset;
}

.popup-title {
  font-size: 150%;
  margin-bottom: 1em;
  text-align: center;
}

.fullscreen-popup .buttons {
  display: flex;
  margin-top: 1em;
}

.fullscreen-popup .buttons button {
  margin-bottom: 0;
  margin: auto;
}

/* Messages */

.msg {
  border: 1px solid black;
  display: flex;
}

.msgcontent {
  flex: 1;
  padding: 9px;
}

.msgclose {
  padding: 9px;
}

/* Scripts Overview */

.scripts-overview {
  border: 1px solid grey;
  margin-bottom: 9px;
}

.scripts-overview .scripts-name {
  background-color: #eee;
  border-bottom: 1px dashed black;
  cursor: pointer;
  font-size: 120%;
  padding: 9px;
}

/* Documents Overview */

.documents-overview {
  border: 1px solid grey;
  margin-bottom: 9px;
}

.documents-overview .document-name {
  background-color: #eee;
  border-bottom: 1px dashed black;
  cursor: pointer;
  font-size: 120%;
  padding: 9px;
}

/* Document Editor */

#document-editor {
  flex-grow: 1;
  min-height: 100px;
}

.menu-bar {
  display: flex;
}

.menu-bar .document-name {
  margin: 0.5em;
}


/* Loading */
.loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.5;
  background-color: cyan;
}
