:root {
  --color-black: #1f1f1f;
}

html {
  font-size: 14px;
  font-family: helvetica, sans-serif;

  --bg-hover: #dddcdc;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
    height: 100vh;
  margin: 0;
  color: var(--color-black);
}
.container {
    padding: 6em 2em 0;
    height: 100%;
    box-sizing: border-box;
}

main {
    display: flex;
    flex-direction: column;
    height: 100%;
}

h1 {
  text-align: center;
  padding: 0.5em 0;
}

hr {
  margin: 1.5em 0;
}

button, .btn {
  border: 1px solid var(--bg-hover);
  border-radius: 0.5em;
  padding: 0.5em 1em;
  background-color: white;
  color: var(--color-black);
  transition: 150ms;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  font-size: 0.85em;
  text-decoration: none;
  font-family: inherit;
}
button:not(.button-as-link, [disabled]):hover, .btn:not([disabled]):hover {
  background-color: var(--bg-hover);
  color: white;
}
.back-btn {
  border-radius: 2em;
  margin: 0 0 1em;
  padding: 0.4em 1.2em;
  background-color: #f2f2f2;
  border-color: #b0b0b0;
}
.icon-text-button {
  display: inline-flex;
  gap: 0.4em;
}
.button-as-link, a {
  border: none;
  padding: 0;
  color: var(--color-black);
  background-color: transparent;
  text-decoration: underline;
  font-size: 1em;
}
.button-as-link:hover, a:hover {
  color: var(--color-black);
}
.btn-primary {
  color: #fff;
  background-color: #18954b;
  border-color: #18954b;
}
.btn-primary:not([disabled]):hover {
  background-color: #94b9ee !important;
  border-color: #94b9ee !important;
}
.icon-button {
  padding: 0.8em 1em;
}
.close-button {
  text-align: right;
  width: 100%;
  padding: 0.7em 0.8em 0.6em;
  box-sizing: border-box;
  border-bottom: 1px solid #62626245;
}
button[disabled], .btn[disabled] {
  background-color: grey;
  border-color: grey;
  cursor: not-allowed;
}

textarea {
   max-width: 100%;
   width: 25em;
 }
input:not([type="checkbox"]), textarea {
  margin: 0.4em 0;
  border-radius: 0.4em;
  border: 1px solid grey;
  padding: 0.4em 1em;
}
input[type="text"] {
  min-width: min-content;
}

label {
  position: relative;
  display: block;
  margin-top: 0.5em;
}
label[required=required]:after {
  content: "*";
}
.inline-right-margin {
  display: inline-block;
  margin-right: 1em;
}


.loading:after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: #54545424;
  animation: fadein 200ms 200ms linear forwards;
}
.loading {
  position: relative;
  min-height: 10em;
}
.loading:before {
  position: absolute;
  content: "";
  background: url(../media/spinner.svg) no-repeat;
  width: 25px;
  height: 25px;
  top: calc(50% - 12px);
  left: calc(50% - 12px);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tag {
  display: inline;
  border: 1px solid grey;
  padding: 0.4em 0.8em;
  border-radius: 1.5em;
  margin: 0 0.5em 0.2em 0;
}
.tag-warning {
  border-color: darkorange;
  background-color: #ffefdb;
}
.tag-green {
  border-color: #45ab45;
  background-color: #dbffe0;
}

.details-content {
  width: 40em;
  max-width: 100%;
  min-height: 14em;
}
.details-content-information::after {
  content: " ";
  display: block;
  height: 0;
  clear: both;
}
.details-content-information img {
  width: 21em;
  float: right;
  border-radius: 0.5em;
  margin-left: 2em;
}
.details-content section h3 {
  margin: 0;
}

.details-content .sectionHeading {
  margin-top: 2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.change-entry {
  font-size: 0.8em;
  background: none;
  border: 0.2em solid #afceff;
  padding: 1.2em 1.5em 0.5em;
  border-radius: 1em;
  margin: 0.5em 0;
}
.change-entry p {
  margin: 0.5em 0;
}
.change-entry.hover-background {
  cursor: pointer;
}

.hover-background:hover {
  background-color: var(--bg-hover);
}

.alert-entry {
  padding: 1.3em 1.7em;
  cursor: pointer;
  border-radius: 2em;
  margin: 1em 0;
}
.alert-entry:hover {
  background-color: var(--bg-hover);
}
.alert-entry::before {
  font-family: "Font Awesome 5 Free";
  font-weight: bold;
}
.alert-warning {
  background-color: #ffd39e;
}
.alert-warning::before {
  content: "\f06a ";
}
.alert-error {
  background-color: #ffcaca;
}
.alert-error::before {
  content: "\f057 ";
}

.icon {
  font-family: "Font Awesome 5 Free";
  font-weight: bold;
}

.switch {
  display: inline-flex;
  cursor: pointer;
  margin: 0.4em 0;
  gap: 0.4em;
  align-items: center;
}

.switch input {
  display:none;
}

.slider {
  background-color: #ccc;
  transition: 200ms;
  position: relative;
  display: inline-block;
  width: 3em;
  height: 1.5em;
  border-radius: 1em;
}

.slider:before {
  background-color: #fff;
  top: 0.15em;
  content: "";
  height: 1.2em;
  left: 4px;
  position: absolute;
  transition: 200ms;
  width: 1.2em;
  border-radius: 50%;
}

input:disabled + .slider {
  background-color: #979797;
}
input:disabled + .slider:before {
  background-color: #ccc;
}

input:checked + .slider {
  background-color: #66bb6a;
}
input:checked + .slider:before {
  /* width slider - width dot - offset left - offset right */
  transform: translateX(calc(3em - 100% - 4px - 4px));
}

.flex-space-between {
  display: flex;
  justify-content: space-between;
}
.no-display {
  display: none;
}

.position-sticky-0 {
    position: sticky;
    top: 0;
    background-color: white;
}