/* Default Button style */

.button {
  padding: 10px 20px;
  display: inline-block;
  text-align: center;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.button.disabled,
.button[disabled] {
  cursor: not-allowed;
}

.button.fade {
  box-shadow: 0px 0px 20px 3px rgba(0, 0, 0, 0.2);
}

.button.hover:not(.disabled):not(.no-shadow):not([disabled]):hover {
  box-shadow: 5px 5px 20px 0px rgba(0, 0, 0, 0.5);
}

/* Link styles */

a.link {
  color: blue;
}

a.link:after {
  font-family: "Font Awesome 5 Free";
  font-weight: 600;
  font-style: normal;

  display: inline-block;

  text-decoration: inherit;

  margin: auto 3px;
}

a.link:after {
  content: "\f35d";
  text-decoration: none;
}

/* Default header styles */

body,
html {
  height: 100%;
}

body {
  margin: 0px;
}

h1,
h2,
h3,
h4,
h5 {
  text-align: center;
}

h1 {
  font-size: 2.2em;
  margin: 0.6em 0;
}

h2 {
  font-size: 1.5em;
  margin: 0.5em 0;
}

h3 {
  font-size: 1em;
  margin: 0.3em 0;
}

h4 {
  font-size: 0.8em;
  margin: 0.4em 0;
}

@media (max-width: 767px) {
  h1 {
    font-size: 1.9em;
  }

  h2 {
    font-size: 1.5em;
  }

  h3 {
    font-size: 1.1em;
  }
}

/* Misc element styles */

iframe {
  border: none;
}

table {
  border-collapse: collapse;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: #222;
  text-decoration: none;
  cursor: pointer;
}

*:focus {
  outline: none;
}

/* Flex layout classes */

.flex {
  display: flex;
  justify-content: flex-start;
  position: relative;
  max-width: 100%;
  flex-flow: row nowrap;
}

.flex.wrap {
  flex-wrap: wrap;
}

.flex.col {
  flex-direction: column;
}

.flex.space {
  justify-content: space-between;
}

.flex.cen {
  justify-content: center;
  align-items: center;
}

.flex:not(.no-stretch) > *:not(.no-stretch) {
  flex-grow: 1;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 1083458237;
}

.dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3);
  border: 1px lightgray dashed;
  padding: 10px;
  max-width: 600px;
  overflow:auto;
  max-height:100%;
  box-sizing:border-box
}

.dialog p {
  margin: 15px;
}

/* Panel styles */

.panel {
  padding: 20px 20px;
  margin-top: 30px;
  margin-left: 10px;
  margin-right: 10px;

  text-align: center;

  position: relative;

  background: white;

  flex-grow: 1;
  overflow: hidden;
}

.closable {
  transition: opacity 1s;
}

.closable.initial-hidden {
  display: none;
  opacity: 0;
}

/* Roman list */

ul.roman {
  list-style-position: inside;
}

ul.roman li {
  font-weight: bolder;
  list-style-type: upper-roman;
  margin: 8px 0px;
}

/* General Input Styles */

input, textarea {
  border-radius: 0;
}

textarea {
  background: rgba(0, 0, 0, 0);
  border: 1px solid #ddd;
  padding: 5px;
  box-sizing: border-box;
  resize: none;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="password"],
textarea {
  border: 1px solid #ddd;
  min-width: 0; /* Firefox and Egde need this */

  padding: 0px 5px;

  background: rgba(0, 0, 0, 0);
  box-sizing: border-box;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="password"] {
  min-height: 1em;
  height: 2em;
}

form input[type="text"]:valid,
form input[type="number"]:valid,
form input[type="url"]:valid,
form input[type="password"]:valid,
textarea:valid {
  border-bottom: 1px solid lime;
}

form input[type="text"]:invalid,
form input[type="number"]:invalid,
form input[type="url"]:invalid,
form input[type="password"]:invalid,
textarea:invalid {
  border-bottom: 1px solid coral;
}

.form-input > * {
  text-align: left;
  font-style: italic;

  margin: 2px 10px !important;
}

.form-input .error {
  font-size: 60% !important;
  color: coral;
}

.form-input {
  display: flex;
  flex-direction: column;

  margin: 10px 0px;
}

/* Turns out browser checkboxes are ass-ugly */
/* Customize the label (the container) */
.cb-container {
  display: block;
  position: relative;
  padding-left: 1.5em;
  cursor: pointer;
}

/* Hide the browser's default checkbox */
.cb-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  left: 0;
  top: 0;
  margin-top: 2px;
  z-index: 100;
}

/* Create a custom checkbox */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 1em;
  width: 1em;
  background-color: #eee;
  margin-top: 2px;
}
.stats-container .checkmark {
  font-size: 111%;
}

/* On mouse-over, add a grey background color */
.cb-container:hover input ~ .checkmark {
  background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.cb-container input:checked ~ .checkmark {
  background-color: #2196f3;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the checkmark when checked */
.cb-container input:checked ~ .checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
.cb-container .checkmark:after {
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
/* Search UI Element */

.search {
  padding: 0px 4px;

  border: 1px solid #999;
  border-radius: 0px;

  display: flex;
  justify-content: space-between;
}

.search:before,
.search:after {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-style: normal;

  cursor: pointer;

  display: inline-block;

  text-decoration: inherit;

  margin: auto 3px;
}

.search:before {
  content: "\f002";
}

.search:after {
  content: "\f057";
}

.search input {
  margin: 5px;
  border: 0;
  flex-grow: 2;
}

.search.seperated input {
  border-left: 1px solid #888;
  border-right: 1px solid #888;
}

/*
 * Stats Viewer like Panels:
 * + .viewer is the element that contains the paginator and the content
 * + .viewer-content is the element that contains the content of the viewer, displayed to the right of the paginator
 */

.viewer {
  margin-top: 10px;
}

/* Hidden until first element in paginator is selected */
.viewer .viewer-content {
  display: none;
  margin-left: 10px;
}

.viewer .viewer-welcome {
  text-align: center;
  margin-left: 10px;
}

@media (min-width: 768px) {
  .viewer .paginator {
    max-width: 35%;
  }

  .viewer .viewer-content,
  .viewer .viewer-welcome {
    max-width: 65%;
  }
}

@media (max-width: 767px) {
  .viewer .viewer-content,
  .viewer .viewer-welcome,
  .viewer .paginator {
    max-width: 100%;
  }

  .viewer {
    flex-wrap: wrap;
  }
}

.stats-container {
  margin: 5px 0%;
  flex-wrap: wrap;
}

.stats-container > * {
  margin: 5px 1%;
}

.stats-container b {
  font-size: 110%;
}

.stats-container :not(b):not(.fa) {
  font-size: 90%;
}

/* Dropdown selection menu thingy styles */

.dropdown-menu {
  position: relative;
  display: inline-block;
}

.dropdown-menu .menu {
  position: absolute;
  display: none;
  top: 2em; /* place it below the box! */

  width: calc(100% - 2px);
  max-height: 400px;
  overflow-y: scroll;

  background: white;

  border: 1px solid #bbb;

  z-index: 100;

  box-shadow: 0px 8px 10px #ccc, -10px 8px 15px #ccc, 10px 8px 15px #ccc;
}

h1 .dropdown-menu ul,
h2 .dropdown-menu ul {
  font-size: 0.55em;
  font-weight: normal;
}

.dropdown-menu > input[type="text"] {
  border: none;
  border-bottom: 1px dotted #555;
  width: 100%;
  font-size: 1em;
}

.dropdown-menu > input:focus {
  border: 1px solid #bbb;
  border-bottom: none;
  box-shadow: 0px 0px 10px 5px #ccc;
}

.dropdown-menu input:focus + .menu {
  /*opacity: 0.95;*/
  border-top: none;
}

.dropdown-menu .menu ul {
  margin: 0;
}

.dropdown-menu .menu ul li {
  padding: 3px 10px;
  text-align: left;
  cursor: pointer;
}

/* DropDown styles */
.dropdown {
  z-index: 10;
  width: 100%;
  position: absolute;
  display: none;
  left: 0;
}

/*
 * Tooltip stuff
 */

.tooltip {
  position: static;
  display: inline-block;
  border-bottom: 1px dotted #555;
}

.tooltip .tooltiptext {
  opacity: 0;
  font-weight: normal;
  font-size: 0.9em;
  text-align: center;

  visibility: hidden;
  z-index: 9;

  border: 3px solid #ddd;
  background: #fff;

  left: 50%;
  transform: translateX(-50%);

  padding: 5px;
  margin: 5px;

  position: absolute;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 0.9;
  transition: 1s opacity;
}

/* (Under)lines */
.underlined {
  margin-bottom: 5px;

  /*border-bottom: 1px solid transparent;
  border-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0) 0%,
      rgba(211, 211, 211, 1) 15%,
      rgba(211, 211, 211, 1) 85%,
      rgba(0, 0, 0, 0) 100%
    )
    1;*/
  border-bottom: 1px solid rgba(211, 211, 211, 1);
}

.underlined.pad {
  padding-bottom: 10px;
}

.leftlined {
  margin-left: 5px;

  /*border-left: 1px solid transparent;
  border-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(211, 211, 211, 1) 15%,
      rgba(211, 211, 211, 1) 85%,
      rgba(0, 0, 0, 0) 100%
    )
    1;*/
  border-left: 1px solid rgba(211, 211, 211, 1);
}

.leftlined.pad {
  padding-left: 10px;
}

.rightlined {
  margin-right: 5px;

  /*border-right: 1px solid transparent;
  border-image: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0) 0%,
      rgba(211, 211, 211, 1) 15%,
      rgba(211, 211, 211, 1) 85%,
      rgba(0, 0, 0, 0) 100%
    )
    1;*/
  border-right: 1px solid rgba(211, 211, 211, 1);
}

.rightlined.pad {
  padding-right: 10px;
}

.overlined {
  margin-top: 5px;

  /*border-top: 1px solid transparent;
  border-image: linear-gradient(
      to right,
      rgba(0, 0, 0, 0) 0%,
      rgba(211, 211, 211, 1) 15%,
      rgba(211, 211, 211, 1) 85%,
      rgba(0, 0, 0, 0) 100%
    )
    1;*/
  border-top: 1px solid rgba(211, 211, 211, 1);
}

.overlined.pad {
  padding-top: 10px;
}

.info-green {
  background: #ddffdd;
  border: 1px solid #a8ff93;
  padding: 5px 15px;
  color: #074d07;
  margin: 25px 0px;
}

.info-green a {
  color: #68bf0b !important;
}

.info-yellow {
  background: #fffadd;
  border: 1px solid #e0e37b;
  padding: 5px 15px;
  color: #4d4707;
  margin: 25px 0px;
}

.info-red {
  background: #fdd;
  border: 1px solid #ff9393;
  padding: 5px 15px;
  color: #4d0707;
  margin: 25px 0px;
}

.output {
  display: none;
  font-style: italic;
  font-size: 80%;
  margin: 0px;
}

form .output {
  margin: 0px 10px;
}

ul.selection-list {
  overflow-y: scroll;
  border: 1px solid #999;
  font-size: 80%;
  margin: 10px 0px;
}

ul.selection-list li {
  padding: 5px;
  text-align: left;
  cursor: pointer;
}

/* Tab panel stuff */
.tab-content:not(.tab-content-active) {
  display: none;
}

.tab {
  cursor: pointer;
}

.tab-active {
  color: #0881c6;
}
