@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("figtree-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("figtree-bold.woff2") format("woff2");
}

:root {
  color-scheme: light;
  font-family: "Figtree", Arial, sans-serif;
  color: #181818;
  background: #f4efe7;
  --red: #ce0d2c;
  --cream: #fffaf1;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  min-height: 100%;
}

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
}

.toolbar {
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(250px, 420px) minmax(280px, 1fr);
  gap: 24px;
  align-items: center;
  padding: 16px clamp(18px, 4vw, 64px);
  color: white;
  background: var(--red);
  box-shadow: 0 4px 20px rgb(0 0 0 / 18%);
}

.eyebrow,
h1,
.status {
  margin: 0;
}

.brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.brand-logo {
  width: 112px;
  height: auto;
  flex: 0 0 auto;
}

.eyebrow {
  margin-bottom: 2px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1 {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1;
}

.search .mapboxgl-ctrl-geocoder {
  z-index: 3;
  width: 100%;
  max-width: none;
  border-radius: 8px;
  font-family: Figtree, Arial, sans-serif;
  font-size: 16px;
  line-height: 20px;
  color: #132a2f;
  background: #fff;
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
}

.search .mapboxgl-ctrl-geocoder--input {
  width: 100%;
  height: 44px;
  padding: 12px 44px 12px 24px;
  border: 0;
  border-radius: 8px;
  outline: 0;
  font: inherit;
  color: #000;
  background: transparent;
}

.search .mapboxgl-ctrl-geocoder:has(.suggestions:not([style*="display: none"]) li),
.search .mapboxgl-ctrl-geocoder:has(.suggestions:not([style*="display: none"]) li) .mapboxgl-ctrl-geocoder--input {
  border-radius: 8px 8px 0 0;
}

.search .mapboxgl-ctrl-geocoder .suggestions {
  position: static;
  top: auto;
  left: auto;
  z-index: auto;
  width: 100%;
  overflow: hidden;
  margin: 0;
  padding: 4px 24px 16px;
  border-radius: 0 0 8px 8px;
  font-size: 16px;
  background: #fff;
  box-shadow: none;
}

.search .suggestions-wrapper {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 1000;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
}

.search .mapboxgl-ctrl-geocoder .suggestions li {
  list-style: none;
  white-space: nowrap;
}

.search .mapboxgl-ctrl-geocoder .suggestions a {
  display: block;
  overflow: hidden;
  padding: 4px 0;
  color: #888;
  background: transparent;
  line-height: 20px;
  text-decoration: none;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color 0.4s;
}

.search .mapboxgl-ctrl-geocoder .suggestions a:hover {
  color: #000;
  background: transparent;
  text-decoration: none;
}

.search .mapboxgl-ctrl-geocoder--suggestion {
  overflow: hidden;
  text-overflow: ellipsis;
}

.search .mapboxgl-ctrl-geocoder--suggestion div {
  display: inline;
}

.search .mapboxgl-ctrl-geocoder--suggestion-title {
  font-weight: 400;
}

.search .mapboxgl-ctrl-geocoder--suggestion-address {
  margin-left: 0;
}

.search .mapboxgl-ctrl-geocoder--icon {
  display: none;
}

.search .mapboxgl-ctrl-geocoder--button {
  display: none !important;
  border: 0;
  background: transparent;
}

.search .mapboxgl-ctrl-geocoder--pin-right {
  position: absolute;
  top: 50%;
  right: 14px;
  display: flex;
  align-items: center;
  transform: translateY(-50%);
}

.search .market-search-icon {
  display: block;
  position: relative;
  top: auto;
  right: auto;
  width: 24px;
  height: 24px;
  margin-left: 6px;
  cursor: pointer;
}

.search .mapboxgl-ctrl-geocoder--pin-right > .market-search-icon {
  display: block;
  position: relative;
  top: auto;
  right: auto;
}

.search .mapboxgl-ctrl-geocoder--powered-by {
  display: none !important;
}

.status {
  justify-self: end;
  font-size: 0.85rem;
  text-align: right;
}

.map-wrap,
#map {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.error {
  position: absolute;
  z-index: 3;
  inset: 24px auto auto 50%;
  width: min(520px, calc(100% - 32px));
  padding: 16px 20px;
  border-radius: 12px;
  color: #7b1021;
  background: #fff;
  box-shadow: 0 8px 30px rgb(0 0 0 / 20%);
  transform: translateX(-50%);
}

.market-popup h2 {
  margin: 0 28px 8px 0;
  font-size: 1.15rem;
  line-height: 1.2;
}

.market-popup p {
  margin: 2px 0;
}

.market-popup a {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  font-weight: 700;
  text-decoration: none;
  background: var(--red);
}

.market-popup a:hover,
.market-popup a:focus-visible {
  background: #a40922;
}

.mapboxgl-popup-content {
  min-width: 230px;
  padding: 18px;
  border-radius: 12px;
}

.mapboxgl-ctrl-group {
  overflow: hidden;
  border-radius: 10px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 780px) {
  .toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .status {
    display: none;
  }
}
