/*** Map ***/
body {
  overflow: hidden;
  /* Prevent ios scroll */
  position: fixed;
  width: 100%;
}

#map {
  height: 100vh;
}

.mapboxgl-map {
  font-family: inherit;
}

.mapboxgl-ctrl-top-right {
  display: none;
  right: 10px !important;
  top: 150px !important;
}

.mapboxgl-ctrl-group {
  border-radius: 100px !important;
  background-color: white !important;
  box-shadow: 0px 2px 4px 0px #00000040 !important;
}

.mapboxgl-ctrl-zoom-in,
.mapboxgl-ctrl-zoom-out {
  display: none !important;
}

.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl {
  margin: 0px;
}

.mapboxgl-ctrl-compass {
  width: 40px !important;
  height: 40px !important;
  border: 0 !important;
  padding: 10px !important;
  border-radius: 100px !important;
}

.mapboxgl-ctrl-compass span {
  background-image: url("../Resources/map/controls/ic_compass.png") !important;
  background-size: cover;
}

.mapboxgl-ctrl-geolocate {
  width: 40px !important;
  height: 40px !important;
}

.mapboxgl-ctrl-geolocate span {
  height: 65% !important;
}

.mapboxgl-ctrl-bottom-right {
  bottom: 50px;
  right: 16px;
  transition: all 0.5s ease-out;
}

.mapboxgl-ctrl-bottom-left {
  z-index: 1;
}

.mapboxgl-ctrl-attrib {
  display: none;
}

/*** Top Container ***/
#map-top-container {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
}

/*** Header ***/
#map-header {
  height: 50px;
  position: relative;
  padding: 14px;
  background: white;
  border-radius: 10px;
  box-shadow: 0px 2px 4px 0px #00000040;
  margin-bottom: 10px;
}

#map-header-initial {
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

#map-header-initial > img {
  height: 35px;
}

#map-header-initial div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#map-header-initial-claim {
  width: 80%;
}

#map-header-initial-title {
  font-size: 18px;
  font-weight: 700;
  text-align: left;
  color: var(--main-color);
}

#map-header-initial-subtitle {
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  text-align: left;
  color: var(--main-color);
}

#map-header-poi-selected {
  position: absolute;
  display: none;
}

#map-header-title-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 4px;
}

#map-header-title-container svg {
  width: 22px;
  margin-right: 4px;
  transition: all 0.5s ease-out;
}

#map-header-title {
  font-size: 18px;
  width: 60%;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#map-header-title span {
  color: var(--current-section-color);
  transition: all 0.5s ease-out;
}

#map-header-subtitle {
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  color: var(--grey);
}

/*** Progress ***/
#map-progress {
  display: none;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.map-progress-item {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  background: white;
  padding: 8px 10px;
  border-radius: 10px;
  box-shadow: 0px 1px 4px 0px #00000040;
  gap: 6px;
  isolation: isolate;
}

.map-progress-item img {
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 5px;
  background-color: var(--current-section-color);
  transition: all 0.5s ease-out;
}

.map-progress-item-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.map-progress-item-text-title {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: normal;
  color: var(--grey);
}

.map-progress-item-text-value {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.map-progress-item-text span {
  display: inherit;
  font-size: 14px;
  font-weight: 600;
}

#map-progress-bg-decoration {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  height: 10px;
  background: white;
  box-shadow: 0px 2px 4px 0px #00000040;
  z-index: -1;
}

.map-progress-item::before,
.map-progress-item::after {
  content: "";
  position: absolute;
  width: var(--progress-connector-width);
  height: 10px;
  background-color: white;
  z-index: -1;
}

.map-progress-item::before {
  left: 100%;
}

.map-progress-item::after {
  right: 100%;
}

/* Hide the connectors for the first and last bubbles */
.map-progress-item:first-child::after,
.map-progress-item:last-child::before {
  display: none;
}

/*** Controls ***/
#map-controls {
  position: absolute;
  bottom: -200px;
  right: 0;
  left: 0;
  height: 100px;
  z-index: 2;
  transition: all 0.5s ease-out;
}

#map-controls::before {
  content: "";
  border-top-left-radius: 50% 100%;
  border-top-right-radius: 50% 100%;
  position: absolute;
  bottom: 0;
  left: -30%;
  width: 160%;
  height: 100%;
  background-color: rgba(var(--ultra-light-grey-rgb), 0.85);
}

#map-direction-button {
  position: absolute;
  bottom: 105px;
  right: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: white;
  border: 0;
  border-radius: 100px;
  box-shadow: 0px 2px 4px 0px #00000040;
  z-index: 2;
  transition: all 0.5s ease-out;
}

#map-direction-button img {
  width: 20px;
  height: 20px;
}

#map-direction-button:active {
  box-shadow: 0px 0px 2px 0px #00000040; /* Reduce shadow to simulate pressed effect */
  transform: scale(0.95); /* Slightly shrink the button to simulate pressing */
}

#map-profile-button {
  position: absolute;
  bottom: 50px;
  left: 16px;
  z-index: 2;
  transition: all 0.5s ease-out;
}

#map-profile-button img {
  width: 65px;
}

#map-profile-button-text-stroke {
  -webkit-text-stroke: 3px var(--ultra-light-grey);
  text-shadow: 0px 0px 6px #000000;
}

.map-profile-button-text {
  position: absolute;
  bottom: 0px;
  width: 100%;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Main buttons */
#map-controls-main-buttons {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 140px;
  z-index: 2;
}

#map-controls-main-container {
  position: relative;
  width: 100px;
  height: 100px;
  overflow: hidden;
  border-radius: 100px;
  box-shadow: 0px 1px 10px 0px #00000040;
}

.map-controls-main {
  position: absolute;
  top: -65%;
  left: 50%;
  transform: translate(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  background-color: black;
  background-size: cover;
  border: 4px solid white;
  border-radius: 100px;
  box-shadow: 0px 1px 10px 0px #00000040;
  z-index: 3;
}

.map-controls-main img {
  height: 50px;
}

.map-controls-main-stamp-img {
  height: 100% !important;
}

#map-controls-text-container {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  max-width: 250px;
  gap: 6px;
  padding: 6px 10px;
  background: white;
  box-shadow: 0px 1px 4px 0px #00000040;
  border-radius: 10px;
}

#map-controls-text-container img {
  width: 22px;
  height: 22px;
}

#map-controls-text {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-controls-arrows {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: white;
  border: 0;
  border-radius: 100px;
  box-shadow: 0px 0px 4px 0px #00000040;
  transition: box-shadow 0.2s, transform 0.2s; /* Add transition for smooth effect */
}

.map-controls-arrows img {
  width: 34px;
  height: 34px;
}

.map-controls-arrows:active {
  box-shadow: 0px 0px 2px 0px #00000040; /* Reduce shadow to simulate pressed effect */
  transform: scale(0.95); /* Slightly shrink the button to simulate pressing */
}

@keyframes moveLeft {
  0% {
    left: 50%;
    top: -65%;
    transform: translate(-50%) rotate(0deg);
    opacity: 1;
  }
  100% {
    left: -20%;
    top: -55%; /* Curva pronunciada hacia abajo */
    transform: translate(-50%) rotate(-180deg);
    opacity: 1;
  }
}

@keyframes moveRight {
  0% {
    left: 50%;
    top: -65%;
    transform: translate(-50%) rotate(0deg);
    opacity: 1;
  }
  100% {
    left: 120%;
    top: -55%; /* Curva pronunciada hacia abajo */
    transform: translate(-50%) rotate(180deg);
    opacity: 1;
  }
}

@keyframes moveRightToCenter {
  0% {
    left: 120%;
    top: -55%;
    transform: translate(-50%) rotate(180deg);
    opacity: 1;
  }
  100% {
    left: 50%;
    top: -65%; /* Curva pronunciada hacia abajo */
    transform: translate(-50%) rotate(0deg);
    opacity: 1;
  }
}

@keyframes moveLeftToCenter {
  0% {
    left: -20%;
    top: -55%;
    transform: translate(-50%) rotate(-180deg);
    opacity: 1;
  }
  100% {
    left: 50%;
    top: -65%; /* Curva pronunciada hacia abajo */
    transform: translate(-50%) rotate(0deg);
    opacity: 1;
  }
}

.animate-left {
  animation: moveLeft 0.85s cubic-bezier(0.68, -0.25, 0.27, 1.25) forwards;
}

.animate-right {
  animation: moveRight 0.85s cubic-bezier(0.68, -0.25, 0.27, 1.25) forwards;
}

.animate-left-to-center {
  animation: moveLeftToCenter 0.85s cubic-bezier(0.68, -0.25, 0.27, 1.25)
    forwards;
}

.animate-right-to-center {
  animation: moveRightToCenter 0.85s cubic-bezier(0.68, -0.25, 0.27, 1.25)
    forwards;
}

/* Navigation bar */
#map-controls-nav {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  height: 60px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 0px 12px;
  background-color: var(--ultra-light-grey);
  border-radius: 10px;
  box-shadow: 0px 0px 4px 0px #00000040;
}

.map-controls-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: white;
  border-radius: 10px;
}

.map-controls-nav-item img {
  width: 22px;
  height: 22px;
}

.map-controls-nav-item-selected {
  width: 50px;
  height: 50px;
  background-color: var(--main-color);
}
.map-controls-nav-item-selected img {
  width: 26px;
  height: 26px;
}

/*** Dialog Tutorial ***/
#tutorial-container {
  z-index: 10;
}

#tutorial-dialog {
  display: none;
  width: min-content;
  padding: 15px;
  overflow: hidden;
  transition: all 0.5s ease-out;
}

#tutorial-pages {
  position: relative;
  display: inline-block; /* Adjust size to content */
  margin-bottom: 30px;
  transition: all 0.5s ease-out;
}

.tutorial-dialog-page {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
}

#tutorial-dialog-page-1 {
  position: relative;
}

.tutorial-image {
  width: 300px;
  border-radius: 10px;
  margin-bottom: 15px;
}

.tutorial-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
}

.tutorial-description {
  font-size: 14px;
}

.tutorial-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tutorial-indicators {
  display: flex;
  flex-direction: row;
  gap: 4px;
}

.tutorial-indicator {
  width: 8px;
  height: 8px;
  border-radius: 100px;
  background-color: var(--light-grey);
}

.tutorial-indicator-selected {
  background-color: var(--main-color);
}

#tutorial-button {
  background-color: var(--main-color);
  border-radius: 10px;
  font-family: "Lato";
  font-size: 16px;
  font-weight: 600;
  color: white;
  padding: 10px 30px;
  border: 0px;
  box-shadow: 0px 1px 4px 0px #00000040;
  transition: all 0.5s ease-out;
}

/*** Dialog Activate location ***/
#map-activate-location-container {
  z-index: 5;
}

#map-activate-location {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: 100%;
  margin: 34px;
  background: white;
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}

#map-activate-location-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

#map-activate-location img {
  height: 250px;
  margin-bottom: 12px;
}

#map-activate-location-description {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 14px;
}

#map-activate-location a {
  font-size: 12px;
  margin-bottom: 20px;
  text-decoration: underline;
  color: blue;
}

#map-activate-location button {
  padding: 8.5px 54px;
  font-family: Lato;
  font-size: 16px;
  font-weight: 600;
  color: white;
  border: 0;
  border-radius: 10px;
  background: var(--main-color);
  box-shadow: 0px 2px 4px 0px #00000040;
}

#map-activate-location-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 13px;
  height: 13px !important;
}

/*** Install PWA ***/
#install-pwa-container {
  z-index: 100;
}

#install-pwa-dialog {
  width: 100%;
  margin: 34px;
  background: white;
  border-radius: 10px;
  text-align: center;
}

#install-pwa-ios {
  display: none;
  position: absolute;
  padding: 24px;
}

.install-pwa-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

#install-pwa-generic {
  padding: 24px;
}

#install-pwa-generic img {
  height: 250px;
  margin-bottom: 12px;
}

.install-pwa-description {
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 14px;
}

.install-pwa-button {
  padding: 8.5px 54px;
  font-family: Lato;
  font-size: 16px;
  font-weight: 600;
  color: white;
  border: 0;
  border-radius: 10px;
  background: var(--main-color);
  box-shadow: 0px 2px 4px 0px #00000040;
}

#install-pwa-ios-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.install-pwa-ios-option {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  text-align: start;
}

.install-pwa-ios-option img {
  width: 20px;
  height: 20px;
}

/*** Loading ***/
.loading-container {
  z-index: 11;
  position: absolute;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
}

.u-loading {
  width: 128px;
  height: 128px;
  animation: loading-new 3s infinite;
}

#loading-progress-container .u-loading {
  width: 80px;
  height: 80px;
}

.loading-route {
  background: #ffffff82;
}

.loading-route .u-loading {
  width: 60px;
  height: 60px;
}

@keyframes loading-new {
  0% {
    transform: perspective(150px) rotateX(0deg) rotateY(0deg);
  }

  50% {
    transform: perspective(200px) rotateX(0deg) rotateY(180deg);
  }

  100% {
    transform: perspective(150px) rotateX(0deg) rotateY(360deg);
  }
}
