@import url("/admin/styles/gallery-style.css");

* {
  box-sizing: border-box;
}

html {
  padding: 0;
  margin: 0;
}

body {
  color: var(--text-color);
  font-family: var(--text-font);
  font-weight: var(--text-font-weight);
  background: var(--background-color);

  padding: 0;
  margin: 0;

  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--title-color);
  font-family: var(--title-font);
  font-weight: var(--title-font-weight);
}

button,
.button {
  background: var(--text-color);
  color: var(--background-color);
  border: none;
  padding: 0.5em 1em;
  border-radius: 2em / 100%;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;

  font-weight: 300;
}

button.success,
.button.success {
  background-color: var(--success-color);
}

ltbl-media-preview button[slot="modal-toolbar"] {
  border: solid 2px var(--modal-text-color, white);
  background: transparent;
  margin-left: 15px;
  transition: linear 0.3s background;
}

ltbl-media-preview button[slot="modal-toolbar"]:hover {
  background: rgba(255, 255, 255, 0.4);
}

button:disabled {
  opacity: 0.5;
}

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

a:hover {
  text-decoration: underline;
}

a.blocklink {
  display: block;
  color: inherit;
  text-decoration: none;
}

kbd {
  border: solid 1px rgb(146, 146, 146);
  font-weight: bold;
  padding: 1px 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  position: relative;
  top: -1px;
  font-size: 1.2em;
}

.hidden {
  display: none;
}

.main-loading {
  --spinner-size: 5rem;
  width: 100%;
  height: 100%;
}

.main-content {
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  flex-direction: column;
  min-height: 100vh;
}

.main-content .main-body {
  flex: 1;

  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  flex-direction: column;
}

.main-content .main-body .content {
  flex: 1;

  width: 100%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.main-header {
  width: 100%;
  padding: 20px;

  background: var(--secondary-color);
  color: var(--on-secondary-color);

  z-index: 1000;

  position: fixed;
  bottom: 0;

  display: flex;
  justify-content: stretch;
  align-items: center;
}

@media print {
  .main-header {
    display: none;
  }
}

.main-header .site-title {
  flex: 1;
  font-size: 32px;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.main-header .site-title h1 {
  margin: 0;
  color: var(--on-secondary-color);
  display: inline;
  font-size: inherit;
  margin-left: 15px;
}

.main-header .tour-selection-button {
  padding: 0;
}

.main-header .site-title.single-tour .hamburger-menu {
  display: none;
}

@media screen and (max-width: 600px) {
  .main-header .site-title {
    font-size: 5vw;
  }
}

.main-header .toolbar {
  --badge-padding: 0.4em;
}

.main-header .toolbar button,
.icon-button {
  width: 3rem;
  height: 3rem;
  padding: 0;
  font-size: 1.5rem;

  background: 0;
  border: 0;

  display: inline-flex;
  justify-content: center;
  align-items: center;

  cursor: pointer;

  position: relative;
}

.main-header .toolbar button::after,
.icon-button::after {
  content: "";

  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border-radius: 100%;
  z-index: 0;
  opacity: 0.3;
  background-color: currentColor;
  pointer-events: none;

  transition: ease 0.2s;
  transition-property: transform opacity;

  transform: translateX(-50%) translateY(-50%) scale(0);
}

.main-header .toolbar button:disabled:after,
.icon-button.disabled::after,
.icon-button:disabled::after {
  content: unset;
}

.main-header .toolbar button:focus,
.icon-button:focus {
  border: none;
  outline: none;
}

.main-header .toolbar button:hover::after,
.main-header .toolbar button:focus::after,
.icon-button:focus::after,
.icon-button:hover::after {
  opacity: 0.2;
  transform: translateX(-50%) translateY(-50%) scale(1);
}

.main-header .toolbar button:active::after,
.icon-button:active::after {
  opacity: 0.3;
  transform: translateX(-50%) translateY(-50%) scale(1);
}

.icon-button.primary-button {
  color: var(--primary-color);
}

.login-block {
  min-height: 100vh;
}

.login-form {
  width: 90%;
  max-width: 200px;
}

.login-form > * {
  margin-bottom: 15px;
}

.login-form .error-container {
  color: var(--error-color, red);
  text-align: center;
}

.login-form .error-container.hidden {
  display: none;
}

.login-form .submit-form-control {
  text-align: center;
}

/* ----- load more ----- */

.load-more-container {
  text-align: center;
  padding: 20px;
}

.load-more-container button:disabled {
  display: none;
}

/* ----- welcome panel ----- */

.welcome-panel {

  display: grid;
  grid-auto-rows: min-content;
  grid-auto-columns: min-content;
  grid-template-columns: min-content 1fr min-content;
  column-gap: 15px;

  margin-top: 30px;
  margin-bottom: 30px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px;

  width: 100%;
  max-width: 1000px;
}

.welcome-panel > * {
  grid-column: 2;
}

.welcome-panel h1 {
  font-size: 4em;
  margin: 0;
  color: var(--primary-color);
  word-wrap: break-word;
}

.welcome-panel .logo {
  grid-column: 1;
  grid-row: span 2;
  margin: 0;
  object-fit: scale-down;
}

/* ----- Hotspot card ------ */

.hotspot-list {
  text-align: center;

  padding-bottom: 90px;
}

.hotspot-list > * {
  text-align: initial;
}

.hotspot-card {
  margin: 10px;

  background: var(--background-color);
  border-top: solid 1px var(--secondary-color);
}

.hotspot-card .hotspot-content {
  padding: 20px 0;
}

.hotspot-card .hotspot-content > * {
  padding: 0 20px;
  display: block;
}

.hotspot-card .hotspot-content > hr {
  padding: 0;
  margin-top: 20px;
  margin-bottom: 20px;
  color: var(--text-color);
  opacity: 0.2;
}

.hotspot-card .hotspot-id,
.hotspot-title {
  word-wrap: break-word;
}

.hotspot-card .hotspot-content .object-rendered {
  margin: 0;

  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.hotspot-card .hotspot-content .label {
  font-weight: bold;
  margin-bottom: 0.1em;
}

.hotspot-card .hotspot-content .value {
  margin: 0;
  margin-bottom: 1em;
}

.hotspot-card .hotspot-content dd:last-child {
  margin-bottom: 0;
}

@media screen and (max-width: 1000px) {
  .hotspot-card .hotspot-content .object-rendered {
    grid-template-columns: repeat(1, 1fr);
  }

  .hotspot-card .hotspot-id {
    text-align: center;
  }
}

.media-gallery-popup {
  z-index: 1500;
  padding: 25px;
  box-sizing: border-box;
  width: calc(100% - 15px);
  max-width: 700px;
  min-height: 45vh;
  max-height: calc(100vh - 70px);
}

.media-gallery-popup .media-list {
  min-height: calc(45vh - 120px);
}

.media-gallery-popup [slot="title"] {
  color: var(--on-primary-color);
  margin: 0;
}

ltbl-media-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

ltbl-media-preview {
  --spinner-size: 100px;
}

.protip {
  text-align: center;
  font-size: 0.85em;
  color: #848484;
}

.index-page {
  padding-bottom: 88px;
}

.index-page .welcome-panel {
  display: block;
  text-align: center;
}

.index-page .tour-list {
  margin-top: 10vh;
}

.tour-list {
  width: calc(100% - 40px);
  max-width: 400px;

  margin-left: auto;
  margin-right: auto;

  border-radius: 10px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

ltbl-dropdown.main-dropdown {
  width: calc(100% - 40px);
  max-width: 400px;

  background: transparent;
  box-shadow: none;

  margin-bottom: 50px;
}

ltbl-dropdown.main-dropdown .tour-list {
  margin: 0;
  width: 100%;
  background: white;
  margin-top: 25px;
}

ltbl-dropdown.main-dropdown .dropdown-menu {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

ltbl-dropdown.main-dropdown .dropdown-menu > * {
  color: var(--primary-color);
}

ltbl-dropdown.main-dropdown .dropdown-menu hr {
  background: none;
  flex: 1;
  border: none;
}

.tour-list > * {
  width: 100%;
  border-bottom: solid 1px var(--surface-color);
}

.tour-list > :last-child {
  border: none;
}

a.tour-card,
.tour-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 20px;

  transition: linear 0.1s background-color;
}

a.tour-card:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.tour-card * {
  margin: 0;
  padding: 0;
}

.tour-card .tour-content {
  flex: 1;
}

.tour-card .tour-content .tour-title {
  font-weight: normal;
}

.tour-card .tour-toolbar {
  font-size: 35px;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;

  color: var(--primary-color);
}

/* ----- ----- */

.app-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: white;
  z-index: 3000;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.app-loading.hidden {
  display: none;
}

.app-loading.animate-leave-active {
  transition: linear 0.1s opacity;
}

.app-loading.animate-leave-end {
  opacity: 0;
}

.page.animate-enter-active,
.page.animate-leave-active {
  transition: ease 0.1s;
  transition-property: opacity transform;
}

.page.animate-enter,
.page.animate-leave-end {
  opacity: 0;
  transform: translateY(10px);
}

.index-page.animate-enter-active {
  transition: ease-out 0.8s;
  transition-property: opacity;
}

.index-page.animate-enter {
  opacity: 0;
}

.index-page.animate-enter-active .tour-list {
  transition: ease-out 0.5s;
  transition-delay: 0.3s;
  transition-property: transform opacity;
}

.index-page.animate-enter .tour-list {
  transform: translateY(10px);
  opacity: 0;
}

/* ----- Analytics Report ----- */

.analytics-report-page {
  padding-bottom: 25vh;
}

.stat-toolbar {
  margin-bottom: 25px;
  padding-left: 10px;
  padding-right: 10px;

  display: flex;
  flex-direction: row;
  align-items: center;
}

.stat-toolbar > .form-control {
  flex: 1;
}

.stat-toolbar > *:not(:last-child) {
  margin-right: 15px;
}

@media screen and (max-width: 800px) {
  .stat-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-toolbar > *:not(:last-child) {
    margin-right: 0;
    margin-bottom: 15px;
  }

  .stat-toolbar button {
    align-self: flex-end;
  }
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  padding: 10px;
}

.stats-panel > * {
  grid-row: span 1;
  grid-column: span 1;
}

.stats-panel hr {
  grid-column: 1 / 4;
  width: 100%;
  border-color: transparent;
  margin: 25px 0;
}

.stat-card {
  border: solid 1px rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.03);

  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px;
}

.stat-card.primary-stat-card {
  border-color: var(--primary-color);
  background: var(--primary-color);
  color: var(--on-primary-color);
}

.stat-card .value {
  flex: 1;
  padding: 0 5px;

  font-weight: normal;
  font-size: 4em;
}

.stat-card .value.large-text {
  font-size: 2em;
}

.stat-card .secondary-value {
  opacity: 0.75;
  padding: 0 5px;
}

.stat-card .value .unit {
  font-size: 0.35em;
  opacity: 0.8;
}

.stat-card .value .secondary {
  opacity: 0.5;
}

.stat-card .value .empty {
  display: block;
  text-align: center;
  opacity: 0.5;
}

.stat-card ul.value {
  list-style-type: none;
  margin: 0;
  font-size: 1.2em;
}

.stat-card ul.value li {
  display: inline;
}

.stat-card ul.value li:not(:last-child)::after {
  content: " • ";
  opacity: 0.8;
}

.stat-card .description {
  margin: 0;
  margin-top: 10px;
  font-weight: bold;
  max-width: 90%;
  align-self: flex-end;
  text-align: right;
}

.stat-card .learn-more {
  text-align: center;
  padding: 25px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.stat-card .learn-more .icon {
  font-size: 3em;
  opacity: 0.5;
}

.stat-card.hidden {
  display: none;
}

.stat-chart,
.stat-list,
.stat-title,
.stat-card.wide {
  grid-column: 1 / 4;
}

.stat-chart .stat-chart-container {
  border-radius: 10px;
  padding: 10px;
  width: 100%;
  max-width: 100%;
}

.stat-chart .stat-chart-content {
  width: 100%;
  height: 20vh;
  --chart-line-color: var(--primary-color);
}

.stats-panel h3 {
  margin: 0;
  margin-bottom: 25px;
  font-size: 2em;
  font-weight: normal;
}

.stat-session-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  break-inside: avoid-page;
  margin-bottom: 30px;
}

.stat-session-card * {
  grid-column: span 1;
}

.stat-session-card .stat-session-title {
  grid-column: 1 / 4;
  margin: 0;
}

.stat-session-card .hotspots:not(.wide) {
  grid-column: span 1;
}

.stat-list {
  break-inside: auto;
  page-break-inside: auto;
}

@media screen and (max-width: 1000px) {
  .stats-panel,
  .stat-session-card {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-session-card .hotspots:not(.wide) {
    grid-column: span 1;
  }

  .stat-chart,
  .stats-panel hr,
  .stats-panel h3,
  .stat-list,
  .stat-session-card .stat-session-title,
  .stat-title,
  .stat-card.wide {
    grid-column: 1 / 3;
  }
}

@media screen and (max-width: 800px) {
  .stats-panel,
  .stat-session-card {
    grid-template-columns: 1fr;
  }

  .stat-chart,
  .stats-panel hr,
  .stats-panel h3,
  .stat-list,
  .stat-session-card .stat-session-title,
  .stat-title,
  .stat-card.wide {
    grid-column: 1;
  }
}

@media print {
  .stat-card,
  .stat-card.primary-stat-card {
    background-color: transparent;
    border-color: rgba(0, 0, 0, 0.8);
    color: black;
  }

  .stat-card *,
  .stat-card.primary-stat-card * {
    color: black;
    opacity: 1;
  }

  .stat-card.primary-stat-card .value,
  .stat-card.primary-stat-card .value * {
    color: var(--primary-color);
  }
}

.stats-panel .loading {
  display: none;
}

.stats-panel .animate-enter-active {
  transition: 0.5s ease-out;
  transition-property: transform opacity;
}

.stats-panel .animate-leave-active {
  transition: 0.1s linear;
  transition-property: opacity;
}

.stats-panel .animate-leave-end {
  opacity: 0;
}

.stats-panel .animate-enter {
  opacity: 0;
  transform: translateY(25px);
}

/* ------ Tour Map ----- */

.map-page {
  padding-bottom: 25vh;
}

.map > li {
  font-weight: bold;
  margin-bottom: 10px;
}

.map > li:not(:first-child){
  margin-top: 25px;
}

/* ----- Logo ----- */

.cea-logo {
  width: 150px;
  margin-bottom: 10px;
  margin-top: 10px;
}