html {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

body {
  height: 100%;
  overflow: hidden;
  position: relative;
  touch-action: pan-x pan-y;
}

.scrollable-body {
  height: calc(100% - 3.25rem);
  width: 100vw;
  min-width: 325px;
  overflow-y: auto;
  overflow-x: hidden;
  position: absolute;
  top: 3.25rem;
  left: 0;
}

/*  Main Container  */

#main-container {
  min-height: calc(100vh - 100px);
}

#main-container.webotsView {
  height: calc(100% - 48px);
  min-height: 10px;
}

div.table-container {
  display: grid;
}

.table-container tr {
  height: 50px;
}

.column-title {
  user-select: none;
}

.fa-sort-down {
  color: grey;
  position: absolute;
  padding-left: 6px;
  top: 60px;
}

.fa-sort-up {
  color: grey;
  position: absolute;
  padding-left: 6px;
  top: 67px;
}

/*  Footer  */

.footer {
  height: 48px;
  width: 100%;
  z-index: 30;
  padding-top: 10px;
  padding-right: 10px;
  padding-bottom: 0;
  background: linear-gradient(0deg, #003d66 0%, #007acc 70%);
  position: relative;
}

#footer-github {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
}

.footer-right {
  position: absolute;
  right: 15px;
  width: 200px;
  display: flex;
  justify-content: space-between;
}

#footer-cyberbotics {
  margin: 6px 0 0 0;
  position: relative;
  order: 1;
}

#footer-terms-of-service {
  margin: 6px 0 0 0;
  position: relative;
  order: 2;
}

#footer-privacy-policy {
  margin: 6px 0 0 0;
  position: relative;
  order: 3;
}

@media only screen and (max-width: 490px) {
  #footer-github {
    display: none;
  }

  .footer-right {
    right: 0;
    margin: 0 50px;
    width: calc(100% - 100px);
  }

  #footer-cyberbotics {
    order: 2;
  }

  #footer-terms-of-service {
    order: 1;
  }

  #footer-privacy-policy {
    order: 3;
  }
}

/*  Navbar  */

#navbar {
  background-color: #007acc;
  box-shadow: 0 -15px 15px 15px rgba(0, 0, 0, 0.4);
}

.navbar-link:hover {
  background-color: rgba(0, 0, 0, 0);
}

#sign-up:hover {
  background-color: #3abb67
}

#log-in:hover {
  background-color: #d9d9d9;
}

#email {
  pointer-events: none;
}

/*  Tabs  */

#tabs {
  margin-bottom: -10px;
}

#tab-content section {
  display: none;
}

#tab-content section.is-active {
  display: block;
}

.tabs>li {
  user-select: none;
}

.tabs a:hover {
  border-bottom-color: transparent;
  color: #007acc;
}

.tabs li.is-active a {
  border-color: #007acc;
  color: #007acc;
}

.tabs.is-small-medium {
  font-size: 0.875rem;
}

@media only screen and (max-width: 500px) {
  .panel-tabs>a {
    font-size: 12px;
    padding: 0.3em;
  }
}

/*  Webots view  */

#webots-view-container {
  height: 100%;
  max-width: none;
}

/*  Webots competition preview window  */

#competition-preview-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 10px;
  overflow: hidden;
}

img.competition-flag {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

/*  Pagination  */

nav.pagination>a[disabled] {
  background-color: #fff;
  border-color: #a7a5a5;
  box-shadow: none;
  opacity: 0.5;
  cursor: not-allowed;
}

nav.pagination>a {
  border-color: #a7a5a5;
}

.pagination-link.is-current {
  background-color: #007acc;
  border: none;
}

/*  Modals */

.modal-card {
  max-width: calc(100vw - 40px);
}

/* Thumbnails */

.container {
  position: relative;
}

.table-container {
  position: relative;
  overflow: visible;
  overflow-x: unset;
  z-index: 2;
}

.table-url {
  padding-bottom: 10px;
}

.thumbnail {
  display: auto;
  opacity: 0;
  position: relative;
  pointer-events: none;
  transform: scale(1);
}

.thumbnail-container {
  position: absolute;
  top: 5px;
  left: 120px;
  height: 180px;
  width: 640px;
  background: rgba(38, 38, 38, 1);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 10px black;
  display: flex;
  overflow: hidden;
}

.thumbnail-image {
  height: 180px;
  object-fit: cover;
  box-shadow: 0 0 10px black;
  z-index: 2;
}

.thumbnail-description {
  position: relative;
  height: 100%;
  color: white;
  padding: 10px;
  font-size: small;
  overflow: hidden;
  margin: auto;
}

.thumbnail-description-fade {
  position: absolute;
  height: 100%;
  width: 100%;
  background: linear-gradient(rgba(38, 38, 38, 0) 80%, rgba(38, 38, 38, 1) 95%);
  z-index: 1;
}

.thumbnail-button-container {
  position: relative;
}

.thumbnail-button-container button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  background-color: #555;
  color: white;
  font-size: 16px;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
}

.thumbnail-button-container button:hover {
  background-color: black;
}

.table-title:hover~.thumbnail {
  opacity: 1;
  transition: all 0.2s ease-in-out;
  transition-delay: 0.5s;
}

@media screen and (max-width: 850px) {
  .thumbnail-container {
    left: 40px;
    height: 144px;
    width: 512px;
  }

  .thumbnail-image {
    height: 144px;
  }
}

@media screen and (max-width: 656px) {
  .thumbnail-container {
    width: 420px;
  }
}

@media screen and (max-width: 565px) {
  .thumbnail {
    display: none;
  }

  .table-container {
    overflow: auto;
    overflow-x: auto;
  }
}

::placeholder {
  opacity: 1;
  color: #aaa;
}

/* Proto */

.proto-title {
  text-align: center;
  font-weight: 600;
  line-height: 1.125;
  font-size: 3rem;
  padding-bottom: 40px;
}

#proto-webots-container {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.modal-window {
  display: none;
  position: fixed;
  z-index: 100;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.9);
}

.modal-window-load-image {
  margin: auto;
  display: block;
  cursor: pointer;
  padding: 60px 120px;
  background-color: white;
  -webkit-box-shadow: 0px 0px 10px 0px rgba(255,255,255,0.5);
  -moz-box-shadow: 0px 0px 10px 0px rgba(255,255,255,0.5);
  box-shadow: 0px 0px 10px 0px rgba(255,255,255,0.5);
  border-radius: 6px;
}

.modal-window-image-content {
  margin: auto;
  max-height: 80%;
  max-width: 90%;
  display: block;
  cursor: pointer;
  transition: 0.05s;
  background-color: white;
}

.modal-window-close-button {
  position: absolute;
  top: 10px;
  right: 35px;
  color: #f1f1f1;
  font-size: 30px;
  font-weight: bold;
  transition: 0.2s;
}

.modal-window-close-button:hover,
.modal-window-close-button:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.modal-window-caption {
  margin: auto;
  display: block;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  -webkit-animation-name: zoom;
  -webkit-animation-duration: 0.6s;
  animation-name: zoom;
  animation-duration: 0.4s;
}

.proto-doc p {
  color: black;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 16px;
  text-align: justify;
  line-height: 140%;
  word-wrap: break-word;
}

.proto-doc h3 {
  font-size: 26px;
}

.proto-doc h4 {
    font-size: 18px;
}

.proto-doc h1, .proto-doc h2, .proto-doc h3, .proto-doc h4, .proto-doc h5, .proto-doc h6 {
  font-style: normal;
  font-weight: normal;
  color: #007acc;
  clear: both;
  margin: 20px auto;
  word-wrap: break-word;
}

.proto-doc ul {
  margin: 0.5em 1em;
  padding-left: 1em;
  list-style-type: disc;
}

.proto-doc .illustrated-section {
  overflow: hidden;
  padding: 10px 0px;
  margin: 20px 10px;
}

.proto-doc .illustrated-section img {
  max-width: 30%;
  min-width: 120px;
  float: left;
  padding: 3px 10px 0px 0px;
}

.proto-doc .illustrated-section p {
  margin: 0px;
}

.proto-doc p > code, .proto-doc li > code {
    color: #222;
    background: #eee;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: normal;
    font-size: 15px;
    word-wrap: break-word;
}

.proto-doc {
  padding-top: 50px;
}

.proto-doc iframe {
    width: 70%;
    height: 400px;
    margin: 30px auto;
    display: block;
}

.proto-doc a {
  color: #007acc;
}

.proto-doc a:hover {
  color: darkblue;
}

.proto-doc .proto-info-array {
  display: grid;
  border: 1px solid #a7a5a5;
  margin-bottom: 50px;
}

.proto-doc .proto-info-array .info-array-cell {
  border-bottom: 1px solid #a7a5a5;
  line-height: 50px;
}

.proto-doc .proto-info-array .first-row-cell {
  border-top: 1px solid #a7a5a5;
}

.proto-doc .proto-info-array .first-column-cell {
  border-left: 1px solid #a7a5a5;
}

.proto-doc .proto-info-array .last-column-cell {
  border-right: 1px solid #a7a5a5;
  padding-left: 10px;
  padding-right: 10px;
}

.proto-doc pre {
  padding: 20px 10px 20px 40px;
  margin: 20px 10px;
  background-color: #f1f1f1;
  color: #333;
  border-radius: 2px;
  overflow-x: auto;
  font-size: 16px;
}

.proto-doc figure {
  overflow: visible;
  text-align: center;
  margin: 20px auto 20px auto;
}

.proto-doc figure > table {
  width: 100%;
}

.proto-doc table {
  table-layout: fixed;
  width: 100%;
  text-align: left;
  color: #333;
  border-width: 1px;
  border-color: #aaa;
  border-collapse: collapse;
}

.proto-doc table th {
  border-width: 1px;
  border-style: solid;
  border-color: #ddd;
  background-color: #ddd;
  word-wrap: break-word;
}

.proto-doc table td {
  padding: 6px;
  border-width: 1px;
  border-style: solid;
  border-color: #ddd;
  background-color: transparent;
  word-wrap: break-word;
}

.search-results {
  display: flex;
  flex-wrap: wrap;
}

.result-element {
  flex-grow: 0;
  flex-shrink: 0;
  width: 192px;
  position: relative;
  margin: 15px;
  margin-bottom: 30px;
  word-wrap: normal;
  background-color: #ffffff80;
  box-sizing: content-box;
  color: #363636;
}

.result-thumbnail {
  width: 128px;
  height: 128px;
  margin-left: 32px;
  margin-top: 15px;
  margin-bottom: 15px;
}

.result-title {
  padding: 0 12px 6px 12px;
  border-top: #f0f0f0 solid 1px;
  background-color: #f8f8f8;
  border-right: #f0f0f0 solid 1px;
  border-left: #f0f0f0 solid 1px;
  box-shadow: 5px 5px 5px 0 #ddd;
  overflow: hidden;
}

.result-details {
  padding: 0px 6px 4px 4px;
  font-size: 0.7em;
  background-color: #f8f8f8;
  border-bottom: #f0f0f0 solid 1px;
  border-right: #f0f0f0 solid 1px;
  border-left: #f0f0f0 solid 1px;
  box-shadow: 5px 5px 5px 0 #ddd;
  color: #888;
}

.result-views {
  position: absolute;
  left: 12px;
  display: flex;
  align-items:center;
}

.result-views img {
  width: 16px;
  padding-right: 4px;
  opacity: 0.6;
}

.result-version {
  text-align: right;
}

.result-title:hover {
  color: #485fc7;
}

.result-element:hover .description-container {
  opacity: 1;
  transition: all 0.2s ease-in-out;
  transition-delay: 0.5s;
}

.description-container {
  display: auto;
  opacity: 0;
  pointer-events: none;
  transform: scale(1);
  position: absolute;
  top: 5px;
  left: 120px;
  width: 240px;
  background: rgba(38, 38, 38, 1);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 10px black;
  display: flex;
  overflow: hidden;
  z-index: 2;
}

.sort-by-div {
  position: absolute;
  top: 0px;
  left: 285px;
}

.update-proto {
  padding-left: 5px;
}

.first-level-keyword-container {
  height: 85px;
  width: 100%;
  display: flex;
  overflow: auto;
  justify-content: center;
}

@media screen and (max-width: 1200px) {
  .first-level-keyword-scroll {
    overflow-x: auto;
  }
  .first-level-keyword-container {
    display: block;
    min-width: 1090px;
  }
  .first-level-keyword {
    display: inline-block;
  }
}

.first-level-keyword {
    text-align: center;
    width: 64px;
    margin: 8px;
    font-size: 0.875rem;
    flex-shrink: 0;
    flex-grow: 0;
    cursor: pointer;
}

.first-level-keyword img {
    display: block;
    margin: 0 auto;
    height: 40px;
    pointer-events: none;
}

.first-level-keyword p {
  pointer-events: none;
}

.first-level-keyword:hover {
  color: #007acc;
}

.first-level-keyword-container .is-active {
  color: #007acc;
  border-bottom: 1px solid #007acc;
}

.second-level-keyword-container {
  height: 40px;
  width: 100%;
  margin-bottom: 10px;
  display: none;
  text-align: center;
}

.second-level-keyword-container .is-active {
  color: #007acc;
}

.second-level-keyword {
  margin: 10px;
  cursor: pointer;
}
