:root {
  --error-red:#ff4136;
  --success-green: #19a974;
  --information-blue: #357edd;
}

.b--error-red {
  border-color: var(--error-red);
}

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

.b--success-green {
  border-color: var(--success-green);
}

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

.b--information-blue {
  border-color: var(--information-blue);
}

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

body {
  margin: 0;
  width: 100%;
  height: 100%;
}

* {
  box-sizing: border-box;
  color: #001b44;
  font-family: Share, sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Megrim, sans-serif;
}

canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.close {
  cursor: pointer;
}

.light {
  background-color: #eee8d5;
}

.dark {
  background-color: #001b44;
}

.visible {
  visibility: visible;
}

.hidden {
  visibility: hidden;
  /* display: none; */
}

.stretch-space {
  flex-grow: 2;
}

/* BUTTONS
/*============================================================================*/

button.list-button, input[type=submit].list-button {
  margin: 5px;
  width: 100%;
  max-width: 300px;
  flex-grow: 1;
}

button, input[type=submit] {
  height: 48px;
  width: 150px;
  border-radius: 5px;

  vertical-align: middle;
  font-size: 22px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);

  cursor: pointer;
  transition: 0.1s background, 0.1s border-color, 0.1s width, 0.1s height;
}

button:active, input[type=submit]:active {
  width: calc(100% - 10px);
  max-width: 290px;
}

button.toggle, input[type=submit].toggle {
  margin: 5px;
  width: 48px;
}

button.white, input[type=submit].white {
  background: #ffffff;
  color: #808080;

  border: 1px solid #bfbfbf;
  border-bottom: 3px solid #bfbfbf;
}

button.toggle.white.off, button.white:active {
  background: #cccccc;
  color: #808080;

  border-color: #999999;
}

button.green, input[type=submit].green {
  background: #19a974;
  color: #ffffff;

  border: 1px solid #137f57;
  border-bottom: 3px solid #137f57;
}

button.blue, input[type=submit].blue {
  background: var(--information-blue);
  color: #ffffff;

  border: 1px solid #285EA6;
  border-bottom: 3px solid #285EA6;
}

button.red, input[type=submit].red {
  background: var(--error-red);
  color: #ffffff;

  border: 1px solid #BF3128;
  border-bottom: 3px solid #BF3128;
}


input[type=submit] {
  width: 100%;
}

button.hidden {
  visibility: hidden;
  display: none;
}

/* LAYOUTS */
/*============================================================================*/

.ui {
	position: absolute;
	padding-top: 16px;
	padding-left: 16px;
  box-sizing: border-box;
	height: 100%;
	width: 100%;
}

.line.ui {
	align-items: flex-start;
	justify-content: flex-start;
}

.search-results {
	max-height: 500px;
	width: 100%;
	border-radius: 5px;
	/* box-shadow: 0px 0px 30px #808080; */
	display: flex;
	flex-direction: column;
	overflow: auto;
}

.search-result {
	height: 48px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-left: 16px;
	padding-right: 16px;
	flex-shrink: 0;
}

.search-results > .search-result:not(:last-child) {
  border-bottom: 1px solid #888888;
}

.search-result-name {
	font-size: 18px;
}

.search-results.hidden {
  position: absolute;
  /* top: -9999px; */
  left: -9999px;
}

.search-results.fade.hidden {
	opacity: 0;
}

.search-results.fade.visible {
	opacity: 1;
}

.search-results.fade {
  /* transition: 0.5s 0.5s opacity; */
  transition: opacity 0.5s ease-in-out;
}

.column.search {
	height: 100%;
	padding-top: 0px;
	justify-content: flex-start;
	padding-right: 16px;
	padding-left: 16px;
	max-width: 300px;
	width: 100%;
}

/* MENU */
/*============================================================================*/

#userImage {
  width: 50px;
  height: 50px;

  cursor: pointer;

  filter: drop-shadow(0px 0px 4px #00000066);

  /*-webkit-animation: float 4s linear infinite;
  -moz-animation: float 4s linear infinite;
  animation: float 4s linear infinite;*/
}

/* TEXTINPUT */
/*============================================================================*/

#searchField, input[type=text], input[type=password] {
	height: 48px;
	/* flex-grow: 1; */
  max-width: 300px;
  border-radius: 5px;

  vertical-align: middle;
  font-size: 22px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);

	border: 0;
	border-radius: 5px;
	flex-shrink: 0;
}

#searchField {
	width: 100%;
	/* margin-left: 16px; */
}

#searchField:focus, input[type=text], input[type=password] {
  outline: none;
}

/* LOADER */
/*============================================================================*/

#loader-wrapper {
  background: #000000;
  opacity: 1;
  visibility: visible;
   transition: visibility 0s 1s, 1s opacity;
}

#loader-wrapper.fade-out {
  opacity: 0;
  visibility: hidden;
  /*transition: 1s opacity;*/
}

#loader-wrapper.fade-in {
  opacity: 1;
  transition: 1s opacity;
  /*animation: load 2s linear;*/
}

#loader {
  -webkit-animation:spin 4s linear infinite;
  -moz-animation:spin 4s linear infinite;
  animation:spin 4s linear infinite;
}

/* MODALS */
/*============================================================================*/

.modal {
  display: flex;
  justify-content: center;
  align-items: flex-start;

  position: fixed;
  box-shadow: 0px 0px 30px #808080;

  transition: width 0.5s ease-in-out 0s, height 0.5s ease-in-out 0s, max-width 0.5s ease-in-out 0s;
}

.modal.center {
  border-radius: 5px;
  margin: 16px 16px 16px 16px;
  max-width: 500px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
}

.modal.right {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
  margin: 16px 0px 16px 16px;
  width: calc(50% - 16px);
  height: calc(100% - 32px);
  display: flex;
}

.modal.left {
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
  margin: 16px 16px 16px 0px;
  width: calc(100% - 16px);
  height: calc(100% - 32px);
  max-width: 500px;
}

.modal.top {
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  margin: 0px 16px 16px 16px;
  height: calc(50% - 16px);
  width: calc(100% - 32px);
  display: flex;
  flex-direction: column-reverse;
}

.modal.left.enabled {
  transform: none;
  transition: transform 300ms linear;
}

.modal.left.disabled {
  transform: translate(-600px);
  transition: transform 300ms linear;
}

.modal.right.enabled {
  transform: none;
  transition: transform 300ms linear;
}

.modal.right.disabled {
  transform: translate(600px);
  transition: transform 300ms linear;
}

.modal.center.enabled {
  transform: none;
  transition: transform 300ms linear;
}

.modal.center.disabled {
  transform: scale(0, 0);
  transition: transform 300ms linear;
}

.modal.top.enabled {
  transform: none;
  transition: transform 300ms linear;
}

.modal.top.disabled {
  transform: translate(0, calc(0px - 50% - 16px - 200px));
  transition: transform 300ms linear;
}

.wrapper.disabled {
  visibility: hidden;
  transition: visibility 0s 0.5s;
}

.wrapper.enabled {
  visibility: visible;
  transition: visibility 0s;
}

.wrapper.center {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  width: 100%;
  height: 100%;
}

.wrapper.right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: fixed;
  width: 100%;
  height: 100%;
}

.wrapper.left {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: fixed;
  width: 100%;
  height: 100%;
}

.wrapper.top {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: fixed;
  width: 100%;
  height: 100%;
}

.list {
  display: flex;
  justify-content: flex-start;
  /* align-items: center; */
  align-items: flex-start;
  flex-direction: column;
  padding: 5px;
  visibility: hidden;
  opacity: 0;
  transition: 0.5s 0.5s opacity;
  max-width: 300px;
  width: 100%;
}

.line {
  display: flex;
  /* justify-content: space-between; */
  align-items: center;
  /* width: 100%; */
}

.column {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  /* width: 100%; */
  overflow: auto;
  padding-top: 16px;
  padding-bottom: 16px;
}

.column > * {
  margin: 5px;
}

.grid {
  display: grid;
  grid-gap: 10px;
}

.grid > .one {
  grid-column: 1;
  text-align: right;
}

.grid > .second {
  grid-column: 2;
}

form {
  padding-left: 5px;
  padding-right: 5px;
}

form > * {
	width: 100%;
	max-width: 300px;
}

form {
  width: 100%;
  max-width: 300px;
}

.toggles {
  justify-content: space-around;
  margin: 5px;
  width: 100%;
  max-width: 300px;
}

.modal.enabled > .list {
  visibility: visible;
  opacity: 1;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 80px;
  padding-right: 5px;
  width: 100%;
  height: 60px;
  font-size: 22px;
}

.infos-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 5px;
  padding-right: 5px;
  width: 100%;
  height: 60px;
  font-size: 22px;
}

.panel {
  /*margin: 16px;*/
  width: 100%;
  height: 100%;
  overflow: auto;
}

.panel.hidden {
  position: absolute;
  /* top: -9999px; */
  left: -9999px;
}

.panel.fade.hidden {
  /* display: inherit; */
  opacity: 0;
}

.panel.fade.visible {
  opacity: 1;
}

.panel.fade {
  /* transition: 0.5s 0.5s opacity; */
  transition: opacity 0.5s ease-in-out;
}

.modal > .close {
  position: absolute;
  font-size: 48px;
}

.modal.center > .close {
  right: 16px;
}

.modal.left > .close {
  right: 16px;
  top: 50%;
}

.modal.right > .close {
  /* left: 16px;
  top: 50%; */
  position: static;
  align-self: center;
  margin-left: 16px;
}

.modal.top > .close {
  /* bottom: 16px;
  left: 50%; */
  transform: rotate(-90deg);
  position: static;
  align-self: center;
}

#back-connection, #back-register, #back-favorites {
  position: absolute;
  bottom: 16px;
  left: 50%;
  width: 200px;
  margin-left: -100px;
  text-align: center;
  cursor: pointer;
}

.data-fragment {
  width: calc(100% - 32px);
  max-width: 300px;
  border: 1px solid #888888;
  border-radius: 3px;
}

.data-fragment.shrink {
  width: auto;
}

.data-title {
  border-bottom: 1px solid #888888;
  background-color: #357edd;
  color: #eee8d5;
  min-height: 32px;
  text-align: center;
  font-family: Megrim;
  font-size: 24px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.data-content {
  /*min-height: 32px;*/
}

.data-row {
  min-height: 32px;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

.data-row.space-between {
  justify-content: space-between;
}

.data-type {
  width: 100px;
  display: flex;
  min-height: 32px;
  align-items: center;
  margin-left: 16px;
}

.data-content > .data-row:not(:last-child) {
  border-bottom: 1px solid #888888;
}

.data-value, .data-index, .data-remove {
  display: flex;
}

.data-value, .search-result {
	display: flex;
	min-height: 32px;
	align-items: center;
	flex-wrap: wrap;
}

.data-value.alone {
  justify-content: center;
  width: 100%;
}

.data-value.link, .data-row.link, .search-result {
  cursor: pointer;
  transition: background-color 0.5s;
  /* text-decoration: underline; */
}

.data-value.link:hover, .data-row.link:hover, .search-result:hover {
  background-color: #888888;
}

.data-row.link > .data-value {
  text-decoration: underline;
}

.data-index, .data-remove {
  text-decoration: none;
  min-height: 32px;
  align-items: center;
}

.data-index {
  padding-left: 5%;
}

.data-remove {
  font-size: 150%;
  padding-right: 5%;
  transition: font-size 0.3s ease-in-out;
  transition: color 0.3s ease-in-out;
  width: 32px;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.data-remove:hover {
  font-size: 175%;
  color: var(--error-red);

}

ol.data-content {
  padding: 0;
  margin: 0;
}

.modal .f1 {
  text-align: center;
}

.shadow-inset {
  box-shadow: 0 0 2px 2px #000 inset;
}

.tag-list {
  display: flex;
  max-width: 300px;
  flex-wrap: wrap;
  justify-content: center;
}

.tag-list .tag {
  margin: 5px;
}

.tag {
  background-color: #357edd;
  color: #eee8d5;
  height: 32px;
  padding-left: 8px;
  padding-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;

  transition: x 1s, y 1s;
}

.add-tag {
  cursor: pointer;

  border: 1px solid #285EA6;
  border-bottom: 3px solid #285EA6;

  transition: width 1s;
  min-width: 32px;
}

.add-tag > input {
  background-color: #357edd;
  color: #eee8d5;
  padding-left: 8px;
  padding-right: 8px;
  border: 0px;
  max-width: 100px;
  width: 100px;
}

.tag.clickable, .search-result-name {
	cursor: pointer;
	text-decoration: underline;
}

#picture-container {
	width: 256px;
	height: 256px;
}

img.rotating {
	/* -webkit-animation:spin 4s linear infinite;
	-moz-animation:spin 4s linear infinite;
	animation:spin 4s linear infinite; */
}

#about-panel {
	padding-left: 32px;
	padding-right: 32px;
}

.spacer {
  width: 100%;
  height: 16px;
}

#show-card {
  background-image: url("../res/images/cardinals.png");
  background-position: center;
  background-repeat: no-repeat;
}

#set-orien {
  background-image: url("../res/images/orientation.png");
  background-position: center;
  background-repeat: no-repeat;
}

.line.hidden {
  visibility: hidden;
  display: none;
}

/* ANIMATIONS
==============================================================================*/

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

@keyframes float {
  0% {
    -webkit-transform: translate(0, 10px);
    transform: translate(0, 5px) rotate(30deg);
  }
  50% {
    -webkit-transform: translate(0, -10px);
    transform: translate(0, -5px) rotate(30deg);
  }
  100% {
    -webkit-transform: translate(0, 10px);
    transform: translate(0, 5px) rotate(30deg);
  }
}

@keyframes load {
  0% {
    opacity: 0;
    visibility: hidden;
  }
  50% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

.over {
  background-color: #357eddb0
}
