/**
 * Base SLOT Stylesheet
 *
 * @author Simon Bayer <simon.bayer@fau.de>
 */

:root {
  --max-width: 1440px;
  --text-dark: #424242;
  --text-light: #ededed;
  --background-light: #eaeaed;
  --background-dark: #323232;
  --font-size: 15px;
  --responsive-font-size: var(--font-size);
}

@media only screen and (max-width: 950px) {
  :root { --responsive-font-size: calc(var(--font-size) * 0.87); }
}
@media only screen and (max-width: 850px) {
  :root { --responsive-font-size: calc(var(--font-size) * 0.80); }
}
@media only screen and (max-width: 750px) {
  :root { --responsive-font-size: calc(var(--font-size) * 0.73); }
}

body {
  color: var(--text-dark);
  background-color: var(--background-light);
  font-family: Verdana, sans-serif;
  font-size: var(--font-size);
  margin: 0;
}

#nav, #auth, .page-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* OWNEDIT */
#masterlink {
  padding: 2px;
  font-size: calc(0.9 * var(--responsive-font-size));
  z-index: 70;
  background-color: inherit;
}

@media print {
  #masterlink { display: none; }
  #legal { display: none; }
}

#masterlink:link {
   color: #9ac2ff;
   text-decoration: underline;
}
#masterlink:visited {
  color: #ff9100;
   text-decoration: underline;
}
#masterlink:hover {
  color: #6ea8ff;
  /* color: #0000EE; */
   text-decoration: underline;
}
#masterlink:active {
   color: #ff9100;
   text-decoration: underline;
}

#legal {
  position: fixed;
  right: 0;
  bottom: 0;
  padding: 2px;
  font-size: calc(0.9 * var(--responsive-font-size));
  z-index: 70;
  background-color: inherit;
}

@media print {
  #legal { display: none; }
}

#legal a {
  color: inherit;
  text-decoration: none;
}

button, input[type='submit'] {
  cursor: pointer;
  border: 0;
  color: var(--text-dark);
  background-color: transparent;
}

select, input[type='text'] {
  color: black;
}

/* iOS appearance */
input:not([type='radio']):not([type='checkbox']) {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

/* ==== navigation ==== */

#nav-wrapper {
  display: block;
  width: 100%;
  font-size: var(--font-size);
  background-color: var(--background-dark);
  z-index: 50;
}

@media print {
  #nav-wrapper { display: none; }
}

.nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  position: relative;
  font-size: inherit;
  background-color: inherit;
  z-index: 53;
  color: white;
}

.nav a {
  text-decoration: none;
  color: inherit;
}

.nav-item {
  height: 3em;
  transition: color .15s;
  /* OWNEDIT */
  border-radius: 5px;
}

.nav-item:active {
  color: #b4b4b4;
  transition: none;
}

.nav-item:hover, .nav-item button:focus, .nav-item a:focus > img, .nav-item a:focus > div {
  background-color: #242424;
}

.nav-item button:focus, .nav-item a:focus {
  outline: 0;
}

.nav-no-hover:hover {
  background-color: transparent;
}

.nav-item > button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
}

.nav-item .icon {
  font-size: 1.4em;
  padding: .55em;
}

.nav-item img {
  box-sizing: border-box;
  padding: .75em;
}

.nav-item img, .nav-item button {
  height: 100%;
  font-size: inherit;
}

.nav-group {
  display: flex;
}

.nav-left { order: 1; }
.nav-middle { order: 2; }
.nav-right { order: 3; }

/* OWNEDIT */
/* @media only screen and (max-width: 28em) { */
@media only screen and (max-width: 36em) {
  .nav-left { order: 1; }
  .nav-right { order: 2; }
  .nav-middle { /* move to center of next line */
    order: 3;
    width: 100%;
    justify-content: center;
  }
}

#logo {
  padding: .8em;
}

.nav-loader {
  width: 1.6em;
  height: 1.6em;
  margin: .7em;
  border: .2em solid transparent;
  -webkit-animation: spin 0.8s linear infinite;
  animation: spin 0.8s linear infinite;
  border-top: .2em solid #f3f3f3;
  border-radius: 50%;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity .5s cubic-bezier(1, 0, 1, 1);
}

.nav-loader.hidden {
  -webkit-animation: none;
  animation: none;
  visibility: hidden;
  opacity: 0;
}

@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==== nav-popup ==== */

#nav-popup-bg {
  display: none;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 51;
  background-color: transparent;
}

#nav-popup-bg.enabled {
  display: block;
  animation: show-bg .15s cubic-bezier(0, 0, 0, 1) forwards;
}
@keyframes show-bg { to { background-color: rgba(0, 0, 0, 0.33); } }

#nav-popup {
  background-color: white;
  position: absolute;
  z-index: 52;
  box-shadow: 0 0 4em rgba(0, 0, 0, 0.4);
  left: 0;
  right: 0;
  width: 700px;
  margin: 0 auto;
  transition: all .15s cubic-bezier(0, 0, 0, 1);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-70%);
}

@media only screen and (max-width: 950px) { #nav-popup { width: 600px; } }
@media only screen and (max-width: 600px) { #nav-popup { width: 100%; } }

#nav-popup.open {
  transition: all .2s cubic-bezier(0, 0, 0, 1);
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

#nav-popup-content {
  margin: 2em;
  margin-top: 1.5em;
}

@media not print {
  .blurred {
    -webkit-filter: blur(10px);
    filter: blur(10px);
  }
}

/* ==== popup contents ==== */

.nav-popup hr {
  border: 0;
  height: 0;
  border-bottom: 1px solid #a7a7a7;
}

.nav-popup input[type='text'],
.nav-popup input[type='time'],
.nav-popup input[type='submit'],
.nav-popup button,
.nav-popup select {
  outline: 0;
  background-color: #f2f2f2;
  width: 100%;
  border: 0;
  margin-bottom: 1.5em;
  padding: 1em;
  box-sizing: border-box;
  font-size: 100%;
  font-family: inherit;
}

.nav-popup input[type="checkbox"] {
  margin-bottom: 1.5em;
}

.nav-popup input[type='time']::-webkit-inner-spin-button {
  display: none;
}

.nav-popup select {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}

.nav-popup input[type='submit'].form-last-button,
.nav-popup button.form-last-button {
  margin-bottom: 0;
}

.nav-popup input[type="submit"]:hover, .nav-popup button:hover {
  background-color: #d8d8d8;
}

.nav-popup input[type="submit"]:active:enabled, .nav-popup button:active:enabled {
  background-color: #a1a1a1;
}

.loading-button {
  transform: translateZ(0);
}

@keyframes loading {
  0% { left: 0; right: 100%; }
  50% { left: 0; right: 0; }
  100% { left: 100%; right: 0; }
}

.loading-button.loading {
  background-color: #d8d8d8;
  cursor: default;
}

.loading-button.loading:before {
  animation: loading 1s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.loading-button:before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 100%;
  bottom: 0;
  background: #2098D1;
  height: 7%;
  max-height: 4px;
}

.errorlist {
  color: rgb(189, 0, 0);
}

/* ==== toasts ==== */

#toasts {
  position: fixed;
  right: 0;
  width: 28em;
  max-width: 100%;
  max-height: calc(100vh - 7em);
  overflow-y: hidden;
  overflow-x: hidden;
  z-index: 55;
}

.toast {
  display: block;
  padding: 1em;
  margin: 1em;
  box-shadow: 0 .3em 1em rgba(0, 0, 0, 0.15);
  background-color: rgb(126, 203, 223);
  color: rgb(67, 67, 67);
  animation: create-toast .4s cubic-bezier(0, 0, 0, 1) backwards;
}
@keyframes create-toast { from { transform: translateX(110%); } }

.toast.clickable {
  cursor: pointer;
}

.toast.clickable:hover {
  background-color: rgb(114, 212, 224);
  box-shadow: 0 .3em 1em rgba(0, 107, 126, 0.15);
}

.toast.error {
  background-color: rgb(255, 163, 163);
  color: rgb(50, 50, 50);
}

.toast.burned {
  transform: translateX(110%);
  transition: transform .3s ease-in;
}

/* ==== tooltips ==== */

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 12em;
  background-color: #2a2a2a;
  color: #ededed;
  text-align: center;
  padding: 5px 0;
  border-radius: 6px;
  font-size: 88%;
  position: absolute;
  z-index: 54;
  top: 111%;
  left: 50%;
  margin-left: -6em;
}

.tooltip .tooltip-text::after {
  content: " ";
  position: absolute;
  bottom: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-bottom-color: #2a2a2a;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
}

/* ==== page-content ==== */

.page-content {
  padding: 20px;
}

.page-content a[href] {
  text-decoration: none;
  cursor: pointer;
  color: #007bff;
  transition: color .1s;
}

.page-content button {
  outline: 0;
  border: 0;
  background-color: #f2f2f2;
  margin-bottom: 1.5em;
  padding: 1em;
  box-sizing: border-box;
  font-size: 100%;
}

.page-content button:hover {
  filter: brightness(0.9);
}

.page-content button:active:enabled {
  filter: brightness(0.8);
}

.page-content input {
  outline: 0;
  border: 1px solid #dcdcdc;
  padding: .4em 0 .3em .6em;
  margin-bottom: 0;
  font-size: 100%;
  background: #f6f6f6;
  box-sizing: border-box;
}

/* ==== login / logout ==== */

#auth {
  width: 100%;
}

#auth a {
  text-decoration: none;
  cursor: pointer;
  color: inherit;
  margin: .6em;
  float: right;
  transition: color .1s;
}

#auth a:hover {
  color: #007bff;
}

.center-form {
  width: 100%;
  max-width: 22em;
  margin: 1em auto;
  box-sizing: border-box;
}

.center-form span.center {
  display: block;
  width: 100%;
  text-align: center;
  margin-bottom: 1.5em;
}

.center-form button {
  outline: 0;
  border: 0;
  background-color: var(--background-dark);
  color: white;
  margin-bottom: 1.5em;
  padding: 1em;
  box-sizing: border-box;
  font-size: 100%;
}

.center-form button:hover {
  filter: brightness(1.5);
}

.center-form button, .center-form input {
  width: 100%;
}

#login-form #sso {
  background-color: #007bff;
}

#login-form #sso:hover {
  background-color: #0064cf;
}

/* ==== other ==== */

.field-error {
  color:#ff0000;
}
