/**
 * Theme Name: SoCal Haunt List
 * Template:  directory-starter
 */

.haunt-search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: flex-end;
}

.haunt-search-filters > * {
  flex: 1 1 auto;
}

.haunt-search-filters label {
  display: block;
  font-size: .825rem;
  line-height: 1rem;
  color: #333;
}

.haunt-search-filters button {
  white-space: nowrap;
  appearance: none;
  color: #fff;
  background: #a2c448;
  font: inherit;
  padding: .25rem 1rem;
  height: 2rem;
  line-height: 1rem;
  font-weight: bold;
  border: 0.125rem solid transparent;
  border-radius: .2rem;
  cursor: pointer;
  width: 100%;
}

.haunt-search-filters button[data-current-location] {
  color: #a2c448;
  border-color: currentColor;
  background: #fff;
}

.haunt-search-filters select,
.haunt-search-filters input,
.haunt-search-filters dropdown-filter > button,
.haunt-search-filters location-filter > button {
  font: inherit;
  height: 2rem;
  line-height: 2rem;
  appearance: none;
  border: 1px solid #ccc;
  border-radius: .25rem;
  padding: 0 .5rem;
  background: #fff;
  color: #333;
  width: 100%;
  text-align: left;
}

.haunt-search-filters select {
  padding-right: 2rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M12.707 14.707a1 1 0 0 1-1.414 0l-5-5a1 1 0 0 1 1.414-1.414L12 12.586l4.293-4.293a1 1 0 1 1 1.414 1.414l-5 5Z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center right;
  background-size: contain;
}

.haunt-search-results {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.haunt-search-results > * {
  position: relative;
  flex: 0 0 100%;
  padding-bottom: 1rem;
}

@media (min-width: 576px) {
  .haunt-search-results > * {
    flex-basis: calc((100% - 1rem) / 2);
  }
}

@media (min-width: 768px) {
  .haunt-search-results > * {
    flex-basis: calc((100% - 2rem) / 3);
  }
}

.haunt {
  color: #333;
  position: relative;
  line-height: 1.6;
  font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.haunt .header {
  aspect-ratio: 3 / 2;
  position: relative;
  overflow: hidden;
  margin-bottom: .75rem;
}

.haunt button {
  position: absolute;
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  color: #fff;
  right: 1rem;
  bottom: 1rem;
  font-size: 1.5rem;
  opacity: 0.8;
}

.haunt button[data-favorited="true"] {
  opacity: 1;
}

.haunt button:hover {
  opacity: 0.5;
}

.haunt button:active {
  transform-origin: center center;
  transform: scale(0.8);
}

.haunt-badges {
  position: absolute;
  overflow: hidden;
  width: 100%;
  height: 10rem;
}

.haunt-badges div {
  background-color: #9ece4a;
  color: #ffffff;
  position: absolute;
  z-index: 1;
  top: 13px;
  left: -15px;
  margin: 0;
  transform: rotate(-45deg);
  transform-origin: bottom;
  width: 100px;
  text-align: center;
  padding: .25em .4em;
  font-size: 84%;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.haunt-search-results figure {
  margin-bottom: 1rem;
}

.haunt-search-results img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.haunt-search-results a:not([href^="http"]) {
  display: block;
  text-decoration: none;
}

.haunt-search-results a:hover {
  text-decoration: none;
}

.haunt-search-results strong {
  font-size: .75rem;
  font-weight: bold;
  min-width: 4rem;
  display: inline-block;
}

.haunt-category {
  margin: -.5rem 0 .5rem;
  font-weight: bold;
  color: #444;
}

.haunt-title {
  font-size: 1.5rem;
  line-height: 1;
  font-weight: bold;
  margin-bottom: .5rem;
}

a.haunt-address {
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: .25rem;
}

.star-rating {
  position: relative;
  width: fit-content;
  height: 2rem;
  margin-top: .5rem;
}

.star-rating__clip {
  position: absolute;
  overflow: hidden;
}

.star-rating__stars {
  display: flex;
  justify-content: flex-start;
  color: #fafafa;
}

.star-rating__stars--filled {
  color: #ff9900;
}

.star-rating i {
  width: 1rem;
  height: 1rem;
  display: block;
  color: inherit;
}

/* TODO Remove this from template */
.single-gd_event .gd_event header {
  display: none;
}

.haunt-pagination {
  margin-top: 1rem;
  border-top: 1px solid #ccc;
  padding-top: calc(1rem - 1px);
  display: flex;
  justify-content: center;
  gap: .5rem;
}

.haunt-pagination > * {
  display: block;
  width: 5rem;
  text-align: center;
  border: 1px solid currentColor;
  color: #777;
  padding: calc(.5rem - 1px);
  border-radius: .2rem;
}

.haunt-pagination > a {
  color: #000 !important;
  text-decoration: none;
}

.no-results {
  flex: 0 0 100%;
  background: #a2c44880;
  padding: 2rem 1rem;
  text-align: center;
  border-radius: .25rem;
}

[data-filter] {
  --max-height: 100vh;
  position: absolute;

  z-index: 1000;

  width: max-content;
  max-width: 50vw;
  top: 0;
  left: 0;
  background-color: #fff;
  border: 1px solid currentColor;
  border-radius: 1rem;
  box-shadow: .25rem .25rem .25rem #00000030;
  padding: calc(1rem - 1px) calc(1rem - 1px);
  overflow: auto;
  max-height: calc(var(--max-height) - 2rem);
  transform: translateY(0.5rem);
}

[data-tooltip]:not([data-tooltip*="no-icon"]):after {
  content: "?";
  font-size: .75rem;
  line-height: 1rem;
  width: 1rem;
  height: 1rem;
  box-sizing: border-box;
  border: 1px solid currentColor;
  border-radius: 50%;
  text-align: center;
  display: inline-block;
  margin-left: .5rem;
}

.haunt-tooltip {
  --max-height: 100vh;
  position: absolute;

  z-index: 1000;

  width: max-content;
  max-width: 15rem;
  top: 0;
  left: 0;
  color: #fff;
  background-color: #000000d0;
  border-radius: 1rem;
  box-shadow: .25rem .25rem .25rem #00000080;
  padding: .75rem;
  font-size: .75rem;
  line-height: 1rem;
  max-height: calc(var(--max-height) - 2rem);
  transform: translateY(-0.5rem);
}

.seen button {
  appearance: none;
  color: #fff;
  background: #a2c448;
  font: inherit;
  padding: .5rem 1rem;
  height: 2rem;
  line-height: 1rem;
  font-weight: normal;
  border: 0.125rem solid transparent;
  border-radius: .2rem;
  cursor: pointer;
  width: 100%;
}

.uwp_page .uwp-profile-content {
  width: 100%;
  margin: 0 !important;
}

li.haunt-profile-item {
  margin-bottom: 2rem;
  line-height: 1.6rem;
}

@media (min-width: 768px) {
  ul:has(li.haunt-profile-item) {
    display: grid;
    grid-template-columns: 15rem 1fr;
    grid-column-gap: 1rem;
    grid-row-gap: 2rem;
    max-width: 800px;
  }

  li.haunt-profile-item {
    margin-bottom: 0;
    display: grid;
    grid-column: 1 / span 2;
    grid-template-columns: subgrid;
  }
}

li.haunt-profile-item figure {
  margin: 0 0 1rem;
  padding: 0;
  grid-column: 1;
  width: 100%;
}

li.haunt-profile-item-content {
  grid-column: 2;
}

li.haunt-profile-item h3 {
  margin: 0 0 .5rem !important;
  padding: 0;
}

li.haunt-profile-item a:not([href*="google"]) {
  display: block;
  text-decoration: none;
}

li.haunt-profile-item figure img {
  display: block;
  margin: 0;
  padding: 0;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  width: 100%;
  height: 100%;
}

.haunt-profile-item-description {
  margin: .5rem 0;
  font-size: 1.2rem;
  line-height: 1.75rem;
  color: #444;
  font-style: italic;
  overflow: hidden;
  width: 100%;
  height: 4.5rem;
   display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  max-height: 4.5rem;
}

.haunt-profile-item-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
}

.haunt-profile-item-actions button,
seen-form button {
  white-space: nowrap;
  appearance: none;
  color: #fff;
  background: #a2c448;
  font: inherit;
  padding: .25rem 1rem;
  height: 2rem;
  line-height: 1rem;
  font-weight: bold;
  border: 0.125rem solid transparent;
  border-radius: .2rem;
  cursor: pointer;
  width: 100%;
}

seen-form button[disabled] {
  cursor: default;
  opacity: .7;
}

.gm-style-iw button span {
  background-color: #fff !important;
}

.gm-style-iw-d {
  box-sizing: border-box;
  margin: -48px -18px -4px -12px;
  padding: 12px 12px 4px;
  overflow-x: hidden;
}

.geodir-post-slider {
  background: #111;
  margin: -1rem -1rem 1rem;
  padding: 1rem;
}

.single-gd_event .content-box {
  overflow: hidden;
}

haunt-map {
  display: block;
  width: calc(100% + 32px);
  margin-block-start: -16px;
  margin-inline: -16px;
  min-height: 300px;
  height: 60vh;
  background: #000;
  margin-bottom: 20px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;

  @media (max-width: 575px) {
    width: 100vw;
    background: #000;
    margin-inline: -32px;
    margin-block-start: -48px;
    border-radius: 0;
    min-height: 100px;
    height: 40dvh;
  }

  .marker {
    position: relative;
    width: 0;
    height: 0;
    z-index: 1;
  }

  .marker.expanded {
    z-index: 2;
  }

  .marker img.icon {
    position: absolute;
    width: 50px;
    left: -25px;
    bottom: 0;
    cursor: pointer;
  }

  .marker.expanded img.icon {
    display: none;
  }

  .marker .haunt-bubble {
    display: none;
  }

  .marker.expanded .haunt-bubble {
    --color: #fff;
    display: block;
    position: absolute;
    left: -110px;
    bottom: 10px;
    background: var(--color);
    border-radius: 10px;
    padding: 10px;
    width: 220px;
  }

  .marker.expanded .haunt-bubble h4 {
    font-size: inherit;
    margin: 0;
    line-height: inherit;
  }

  .marker.expanded .haunt-bubble.loading {
    --color: #ccc;
    color: #333;
    font-style: italic;
    display: grid;
    place-items: center;
    height: calc(200px * 3/4 + 10px + 2lh);
  }

  .marker.expanded .haunt-bubble img {
    display: block;
    width: 200px;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 3px;
  }

  .marker.expanded .haunt-bubble:after {
    content: " ";
    background: var(--color);
    width: 10px;
    height: 10px;
    position: absolute;
    top: calc(100% - 5px);
    left: calc(50% - 5px);
    transform: rotate(45deg);
  }

  .marker.expanded .haunt-bubble a {
    color: inherit;
    text-decoration: none;
  }
}
