

/* 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;
  border-radius: 4px 4px 4px 4px;
}

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

/* Link styles */

a.link {
  color: #ce8bff;
}

a.link:after {
  font-family: "Font Awesome 6 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;
  border-radius: 8px;
  /* remove color scheme styling as it makes iframe bg white */
  color-scheme: auto;
}

table {
  border-collapse: collapse;
  border: 0px;
}

table tr:first-child th:first-child {
  border-top-left-radius: 4px;
}

table tr:first-child th:last-child {
  border-top-right-radius: 4px;
}

table tr:last-child td:first-child {
  border-bottom-left-radius: 4px;
}

table tr:last-child td:last-child {
  border-bottom-right-radius: 4px;
}

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

a {
  color: white;
  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(0, 0, 0, 0.8);
  z-index: 1083458237;

  backdrop-filter: blur(16px);
}

.dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #121212;
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3);
  border: 1px solid #333;
  padding: 1rem;
  max-width: 600px;
  overflow:auto;
  max-height:100%;
  box-sizing:border-box;
  border-radius: 4px;
}

.dialog p {
  margin: 15px;
}

/* Panel styles */

.panel {
  background: #121212;

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

  text-align: center;

  position: relative;
  border-radius: 4px 4px 4px 4px;

  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"],
input[type="datetime-local"],
textarea {
  border: 1px solid #444;
  min-width: 0; /* Firefox and Egde need this */

  padding: 0.5rem;

  background: #1f1f1f;
  box-sizing: border-box;

  border-radius: 4px;

  color: white;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="password"],
input[type="datetime-local"]{
  min-height: 1em;
  padding: 0.65rem;
}

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

form input[type="text"]:focus:invalid,
form input[type="number"]:focus:invalid,
form input[type="url"]:focus:invalid,
form input[type="password"]:focus:invalid,
form input[type="datetime-local"]:focus:invalid,
textarea:focus:invalid {
  border-color: rgb(255, 0, 0);
}

.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;
  cursor: pointer;
}

/* 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;
  display: flex;
  justify-content: space-between;
}

.search:before,
.search:after,
.dropdown-menu div:first-child:after {
  font-family: "Font Awesome 6 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";
}

.dropdown-menu div:first-child:after {
  content: "\f078";
  position: absolute;
  right: 0;
  top: .8rem;
  right: .8em;
}

.search input {
  margin: 5px;
  flex-grow: 2;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/*
 * 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: 290px;
  overflow-y: scroll;

  background: #1f1f1f;

  border: 1px solid #333;
  border-radius: 4px;

  z-index: 100;

  margin-top: 1.5rem;
}

.dropdown-menu input[type="text"]:focus:invalid {
  border-color: black;
}

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

.dropdown-menu > div {
  border-bottom: inherit;
  width: 100%;
}

.dropdown-menu input[type="text"] {
  font-size: 1em;
  width: 100%
}

.dropdown-menu div:focus-within {
  border-bottom: none;
}

.dropdown-menu input:focus, .dropdown-menu input:invalid {
  border: 1px solid #333;
}

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

.dropdown-menu .menu ul li {
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;

  white-space: nowrap;
  text-overflow: ellipsis;
  overflow-x: hidden;
}

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

/*
 * Tooltip stuff
 */

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 2px dotted #888;
}

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

  visibility: hidden;
  z-index: 9;

  background: #121212;

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

  padding: 5px;
  margin: 5px;

  border-radius: 4px;

  position: absolute;

  overflow-wrap: normal;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1.0;
  transition: 0.25s 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;*/
}

.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;*/
}

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

.info-green {
  background: #181818;
  padding: 10px 15px;
  color: white;
  margin: 25px 0px;

  border-radius: 4px;

  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: lightgreen;
}

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

.info-yellow {
  background: #181818;
  padding: 10px 15px;
  color: white;
  margin: 25px 0px;

  border-radius: 4px;

  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: yellow;
}

.info-blue {
  background: #181818;
  padding: 10px 15px;
  color: white;
  margin: 25px 0px;

  border-radius: 4px;

  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: #6e7dff;
}

.info-red {
  background: #181818;
  padding: 10px 15px;
  color: white;
  margin: 25px 0px;

  border-radius: 4px;

  border-left-width: 4px;
  border-left-style: solid;
  border-left-color: red;
}

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

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

ul.selection-list {
  overflow-y: auto;
  border: 1px solid #333;
  font-size: 80%;
  margin: 10px 0px;
  border-radius: 4px;
  background: #1f1f1f;
}

ul.selection-list li {
  padding: 0.5rem;
  margin: 0.25rem;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.tab {
  cursor: pointer;
}

.tab-active {
  color: #cccccc;
}
