/* helpers */
.flex-grow-1 {
  flex-grow: 1;
}
.flex-column {
  flex-direction: column;
}
.color-primary {
  /* color: var(--clr-primary); */
  color: var(--clr-secondary);
}
.color-secondary {
  color: var(--clr-secondary);
}

/* skeleton */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}
.skeleton {
  position: relative;
  display: flex;
}
.skeleton:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.1em;
  background: #e5e8ee;
  animation: pulse 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  animation-delay: 0.5s;
  width: 100%;
  border-radius: 4px;
}
.skeleton:after {
  content: '\00a0 ';
  width: 0;
}
.skeleton.cover:before {
  inset: 0;
  border-radius: inherit;
}
.skeleton * {
  opacity: 0;
}

/* typography */
.text-link {
  cursor: pointer;
  font-weight: 500;
  display: inline-block;
  padding-right: 1rem;
  position: relative;
  transition: 0.15s;
}
.text-link:after {
  content: '';
  position: absolute;
  top: 50%;
  right: 2px;
  transform: translateY(-50%) rotate(-45deg);
  width: 0.5rem;
  height: 0.5rem;
  border-width: 0 2px 2px 0;
  border-style: solid;
  border-color: currentColor;
}
@media (hover: hover) {
  .text-link:hover {
    color: var(--clr-black);
  }
}
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* content */
#map-list {
  position: relative;
  display: flex;
  flex-direction: column;
  --map-list-header-height: 0px;
  --map-base-height: 100vh;
  --map-base-height: 100svh;
  --map-height: calc(
    var(--map-base-height) - var(--h-height) - var(--map-list-header-height)
  );
  --fixed-height: calc(var(--map-height) + var(--map-list-header-height));
}
#map-list-fixed-header {
  height: var(--fixed-height);
  position: sticky;
  top: var(--h-height);
  pointer-events: none;
  z-index: 2;
}
#map-list-header {
  pointer-events: all;
}
#map-list-view {
  display: flex;
  flex-direction: row;
  margin-top: calc(var(--map-list-header-height) - var(--fixed-height));
}
#list-view {
  width: max(min(40vw, 760px), 600px);
}
#map-view {
  position: relative;
  flex-grow: 1;
  height: var(--map-height);
  position: sticky;
  top: calc(var(--h-height) + var(--map-list-header-height));
}
#map-align {
  position: absolute;
  inset: 0;
  background: #e5e3df;
  overflow: hidden;
}
#career-map {
  pointer-events: none;
  aspect-ratio: 868/713;
  width: 869px;
  max-width: 100%;
  position: relative;
}
#map {
  position: absolute;
  inset: 0 0 -1.5rem 0;
}

#list-overflow {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px rgba(188, 181, 170, 0.5) solid;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#list-overflow::-webkit-scrollbar-track {background: var(--clr-white);}
#list-overflow::-webkit-scrollbar-thumb {background: var(--clr-grey-4);}


.bottom-sheet {
  height: 100%;
  z-index: 2;
}
.bottom-sheet .top {
  display: none;
}
#sheet-attach-to-bottom {
  display: none;
  padding: 0.5em 1em;
}
@media screen and (min-width: 1200px) {
  .bottom-sheet {
    transform: none !important;
  }
  #list-view {
    transition: .4s opacity .4s, width .4s;
  }
  #map-list.active #list-view {
    opacity: 0;
    width: 0% !important;
    transition: 0s opacity 0s, width .4s;
  }

  #map-view {
    z-index: 10;
  }
  #map-list-header::before {
    content: "";
    position: absolute;
    z-index: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    aspect-ratio: 1;
    background: #fff;
  }
  #map-list-header::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: -150%;
    right: 0;
    width: 24%;
    aspect-ratio: 1;
    opacity: 0.64;
    background: #319A97;
    -webkit-filter: blur(300px);
    filter: blur(300px);
  }
  #map-list-header .container {
    z-index: 10;
    position: relative;
  }
}
@media screen and (max-width: 767px) {
  #sheet-attach-to-bottom {
    position: fixed;
    right: 85px;
    bottom: 4.5rem;
    z-index: 80;
  }
}
@media screen and (min-width: 768px ) and (max-width: 1199px){
  #sheet-attach-to-bottom {
    position: fixed;
    z-index: 80;
    right: 85px;
    bottom: 21px;
  }
}
@media screen and (max-width: 1199px) {
  .no-scroll {
    position: fixed;
    inset: 0;
  }
  #map-list-view {
    order: 1;
    flex-direction: column;
    margin: 0;
  }
  #map-list-fixed-header {
    height: auto;
    position: relative;
    top: auto;
  }
  #map-view {
    --map-base-height: 80vh;
    --map-base-height: 80svh;
    --map-height: min(calc(var(--map-base-height) - var(--h-height)), 100vw);
    order: 0;
    flex-grow: 0;
  }
  #map-align {
    position: fixed;
    top: var(--h-height);
    left: 0;
    right: 0;
    bottom: auto;
    --map-base-height: 100vh;
    --map-base-height: 100svh;
    --map-height: calc(var(--map-base-height) - var(--h-height));
    height: var(--map-height);
  }
  #list-view {
    width: 100%;
    height: auto;
    order: 1;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
  }
  #list-overflow {
    height: auto;
    border: none;
    min-height: 100%;
  }
  .bottom-sheet.not-selectable {
    user-select: none;
    transition: none;
  }
  .bottom-background {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #fff;
    height: 0;
  }
  .bottom-sheet {
    position: relative;
    background: #fff;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    height: auto;
    flex-grow: 1;
    height: auto;
  }
  .bottom-sheet .top {
    position: absolute;
    left: 0;
    width: 100%;
    bottom: 100%;
    background: #fff;
    border-radius: 18px 18px 0 0;
    cursor: grab;
    padding: 0 24px 8px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .drag-handler {
    width: 32px;
    height: 4px;
    background: #eaeaea;
    border-radius: 2px;
    margin: 14px 0 8px 0;
  }
  #sheet-attach-to-bottom img {
    margin-left: 10px;
  }
  #sheet-attach-to-bottom.active {
    display: flex;
  }
  .bottom-sheet .map-list-entry {
    background: none !important;
  }
}

/* list entry */
.map-list-entry {
  border-bottom: 1px rgba(188, 181, 170, 0.5) solid;
  padding: 8px 24px;
  min-height: 92px;
  display: flex;
  align-items: center;
}
.map-list-entry.active {
  background: rgba(248, 245, 240, 1);
}
.map-list-entry .align {
  display: grid;
  grid-template-columns: 1fr 1fr min-content;
  align-items: center;
  column-gap: 16px;
  flex-grow: 1;
  position: relative;
  font-weight: 300;
}


.map-avatar {
  width: 56px;
  height: 56px;
  background-size: cover;
  border-radius: 50%;
  flex-shrink: 0;
}
.map-avatar.no-avatar {
  border: 1px #dedad5 solid;
  background-image: url(../img/images/avatar.svg);
}
.map-list-entry .map-avatar {
  margin-right: 16px;
}
.map-placeholder {
  display: grid;
  grid-template-columns: auto;
  align-items: center;
  text-align: center;
  padding: 40px;
  row-gap: 16px;
  margin: auto 0;
}
.placeholder-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto;
}

@media (min-width: 1200px) {
  .map-list-entry {
    padding-left: 8%;
  }
}

@media (min-width: 1441px) {
  .map-list-entry {
    padding-left: 10%;
  }
}

@media (hover: hover) {
  .map-list-entry:hover {
    background: var(--bg-2);
  }
}
@media screen and (max-width: 600px) {
  .map-list-entry {
    padding: 18px 0;
    margin: 0 16px;
    min-height: 0;
    align-items: flex-start;
  }
  .map-list-entry .align {
    grid-template-columns: 1fr;
  }
  .map-list-entry .title {
    padding-right: 80px;
    margin-bottom: 6px;
  }
  .map-list-entry .book-link {
    position: absolute;
    right: 0;
    top: -4px;
  }
}

/* map */
.gm-style-iw-c {
  box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.24);
  border-radius: 12px;
  max-width: 100vw !important;
}
.gm-style-iw-tc {
  display: none;
}
.marker-label {
  height: 34px;
  border-radius: 20px;
  background: url('../img/images/marker-dp.svg') 4px 4px no-repeat #fff;
  width: 92px;
  box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.24);
  padding-left: 36px;
  padding-right: 8px;
  position: relative;
  font-weight: 700;
  display: flex;
  align-items: center;
  font-size: 14px;
  line-height: 24px;
}
.marker-label.hover {
  background-color: var(--clr-secondary);
  color: #fff;
}
.marker-label.active {
  background-color: var(--clr-black);
  color: #fff;
}
.gm-ui-hover-effect {
  top: 0 !important;
  right: 0 !important;
}
.custom-control {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 16px;
  background: #fff;
  border-radius: 2px;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px -1px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
button.custom-control {
  cursor: pointer;
}
.custom-control.active svg {
  transform: rotate(-180deg);
}
.infowindow {
  width: min(calc(100vw - 48px), 348px);
  font-family: var(--ff-1);
  font-weight: 400;
  font-size: var(--h-6);
  line-height: 1.59;
  color: var(--clr-black);
}
.infowindow .map-avatar {
  margin-right: 16px;
}
.infowindow-header {
  margin-block: 1rem;
  margin-right: 2rem;
}
.infowindow-header b {
  font-weight: 600;
  font-size: 18px;
}
.infowindow-header p {
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4em;
}

.infowindow-overflow {
  border-top: 1px rgba(188, 181, 170, 0.5) solid;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: min(350px, calc(var(--map-height) - 340px));
}

.infowindow-job {
  padding: 16px 16px 16px 0;
  border-bottom: 1px rgba(188, 181, 170, 0.5) solid;
}

.gm-style-iw-chr {
  position: absolute;
  top: 0;
  right: 0;
}

.gm-style .gm-style-iw-c {
  padding: 1.5rem;
}


.infowindow.d-flex {
  padding-top: 1rem;
}

.infowindow .d-flex:not(:has(p)) {
position: relative;
}

.infowindow .d-flex:not(:has(p)) .text-link {
  position: absolute;
  right: 0;
  bottom: 0;
}

@keyframes animate-map-fancy-loader-dot {
  100% {
    transform: scale(0);
  }
  80% {
    transform: scale(0);
  }
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1);
  }
  30% {
    transform: scale(1);
  }
}
.map-loader {
  align-items: center;
  display: none;
}
.active > .map-loader {
  display: flex;
}
.active > .map-loader ~ * {
  display: none;
}
#loading-control:not(.active) {
  display: none;
}
.map-loader:before,
.map-loader:after {
  content: '\00a0 ';
  width: 0;
}
.map-loader span {
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0, 0, 1, 1);
  animation-iteration-count: infinite;
  animation-duration: 0.8s;
  animation-name: animate-map-fancy-loader-dot;
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background: var(--clr-black);
  margin: 0 6px;
}
.map-loader span:nth-child(1) {
  animation-delay: -0.3s;
}
.map-loader span:nth-child(2) {
  animation-delay: -0.15s;
}
@media screen and (max-width: 1199px) {
  .custom-control {
    display: none;
  }
}
.section {
  background-color: #fff;
}

/* structure override */
#map-list-header {
  background: #fff;
  position: relative;
  padding-bottom: 5px;
}
#map-list-header .breadcrumbs {
  margin: 0;
}
#map-list-footer {
  background: #fff;
  position: relative;
  padding-top: 45px;
  text-align: center;
}
@media screen and (max-width: 1199px) {
  #map-list-header {
    padding-top: 45px;
  }
  #map-list-header .title b{
    display: inline-block;
  }
  #map-list-header .breadcrumbs {
    display: none;
  }
  #map-list-footer {
    text-align: left;
    padding: 0;
}
}

#map-list > * {opacity: 1;}
