/* Shared Unify01 fixes and extension primitives. Site themes load after this. */

.autocomplete button#loc {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: 44px;
  height: 44px;
  padding: 6px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transform: translateY(-50%);
}

.autocomplete button#loc:hover,
.autocomplete button#loc:focus-visible {
  background: rgba(0, 0, 0, 0.06);
}

.autocomplete button#loc:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.autocomplete button#loc img {
  display: block;
  width: 32px;
  height: 32px;
}

/* Reusable directory components. Site themes may change colour, typography,
   and decoration, but the behavior and layout remain available to every
   customised site without copying these rules. */
.directory-hero-search {
  max-width: 980px;
}

.directory-hero-search .form-group {
  margin-bottom: 0 !important;
}

.directory-results-toggle,
.directory-list-toggle {
  display: none;
}

.directory-result-content {
  flex: 1 1 auto;
  min-width: 0;
}

.directory-result-marker {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
}

.directory-result-marker > strong {
  min-width: 38px;
  text-align: center;
}

.directory-results article header h4 {
  padding-left: 0;
  margin-left: 0;
}

.directory-results article header h4 > i.icon-hotel-restaurant-235 {
  display: none;
}

.directory-map-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--directory-marker-background, #72c02c);
  border: 2px solid #fff;
  border-radius: 8px 8px 8px 2px;
  box-shadow: 0 2px 8px rgba(27, 46, 62, 0.28);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.directory-map-marker > span {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

/* Country and region overview maps identify places directly. The zero-sized
   Leaflet anchor keeps each variable-width label centred on its coordinates. */
.directory-city-map-marker {
  width: 0 !important;
  height: 0 !important;
  background: transparent;
  border: 0;
}

.directory-city-map-marker > span {
  position: absolute;
  bottom: 0;
  left: 0;
  display: block;
  width: max-content;
  max-width: 160px;
  overflow: hidden;
  padding: 0.38rem 0.58rem;
  color: #fff;
  background: var(--directory-marker-background, #72c02c);
  border: 2px solid #fff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(27, 46, 62, 0.3);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
}

.directory-city-map-marker:hover,
.directory-city-map-marker:focus {
  z-index: 1000 !important;
}

.directory-city-map-marker:hover > span,
.directory-city-map-marker:focus > span {
  filter: brightness(0.9);
}

@media (max-width: 767.98px) {
  .directory-city-map-marker > span {
    max-width: 110px;
    padding: 0.3rem 0.45rem;
    font-size: 0.6875rem;
  }

  .directory-results.is-collapsible:not(.is-expanded) > div:nth-child(n + 13) {
    display: none !important;
  }

  .directory-secondary-list.is-collapsible:not(.is-expanded) > li:nth-child(n + 9) {
    display: none !important;
  }

  .directory-results-toggle.is-enhanced,
  .directory-list-toggle.is-enhanced {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.1rem;
    color: var(--directory-action-color, currentColor);
    background: #fff;
    border: 1px solid currentColor;
    border-radius: 6px;
    font-weight: 700;
  }
}
