:root {
  color-scheme: light;
  --demo-ink: #13211d;
  --demo-muted: #62716b;
  --demo-line: rgba(21, 45, 36, 0.14);
  --demo-panel: rgba(250, 252, 249, 0.97);
  --demo-dark: #13251f;
  --demo-green: #2e7d32;
  --demo-yellow: #f9a825;
  --demo-red: #c62828;
  --demo-blue: #236f8b;
}

* {
  box-sizing: border-box;
}

html,
body,
.search-demo-shell,
#building-search-map {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--demo-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

.search-demo-shell {
  position: relative;
  background: #dce8e1;
}

#building-search-map {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.search-demo-panel {
  position: absolute;
  z-index: 600;
  top: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  width: min(390px, calc(100vw - 36px));
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  background: var(--demo-panel);
  box-shadow: 0 22px 70px rgba(17, 38, 30, 0.22);
  backdrop-filter: blur(18px);
}

.search-demo-header {
  flex-shrink: 0;
  padding: 18px 18px 16px;
  background: var(--demo-dark);
  color: #fff;
}

.search-demo-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.search-demo-brand__mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 12px;
  background: #d5e780;
  color: var(--demo-dark);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: -0.03em;
}

.search-demo-brand small,
.search-demo-brand strong {
  display: block;
}

.search-demo-brand small {
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.search-demo-brand strong {
  font-size: 1.18rem;
  letter-spacing: -0.025em;
}

.search-demo-header p {
  margin: 12px 0 0 54px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.5;
}

.search-demo-region strong {
  display: block;
  margin-bottom: 3px;
  color: #d5e780;
}

.search-demo-notice {
  margin: 0 0 16px;
  color: #3f514a;
  font-size: 0.875rem;
  line-height: 1.5;
}

.search-demo-summary {
  flex-shrink: 0;
  display: flex;
  min-height: 70px;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--demo-line);
  background: #f0f5f1;
}

.search-demo-summary__dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #d18c23;
  box-shadow: 0 0 0 5px rgba(209, 140, 35, 0.13);
}

.search-demo-summary__dot.is-ready {
  background: #2e7d32;
  box-shadow: 0 0 0 5px rgba(46, 125, 50, 0.13);
}

.search-demo-summary__dot.is-error {
  background: #b32d2d;
  box-shadow: 0 0 0 5px rgba(179, 45, 45, 0.13);
}

.search-demo-summary strong,
.search-demo-summary span {
  display: block;
}

.search-demo-summary strong {
  font-size: 0.95rem;
}

.search-demo-summary span {
  margin-top: 3px;
  color: var(--demo-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.search-demo-form {
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 18px;
  scrollbar-width: thin;
}

.search-demo-form__heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.search-demo-form__heading strong,
.search-demo-form__heading span {
  display: block;
}

.search-demo-form__heading strong {
  font-size: 1rem;
}

.search-demo-form__heading span {
  margin-top: 2px;
  color: var(--demo-muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.search-demo-reset {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--demo-blue);
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.search-demo-factors {
  display: grid;
  gap: 9px;
}

.search-factor {
  overflow: hidden;
  border: 1px solid var(--demo-line);
  border-radius: 13px;
  background: #fff;
}

.search-factor__toggle {
  display: flex;
  min-height: 48px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
}

.search-factor__toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--demo-dark);
}

.search-factor__toggle span {
  display: grid;
  flex: 1;
  gap: 2px;
  font-size: 0.9rem;
  font-weight: 760;
}

.search-factor__toggle small {
  color: var(--demo-muted);
  font-size: 0.75rem;
  font-weight: 520;
}

.search-factor__control {
  display: none;
  padding: 0 12px 12px 40px;
}

.search-factor.is-enabled .search-factor__control {
  display: block;
}

.search-factor__range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.search-factor__range label,
.search-factor__boolean {
  display: grid;
  gap: 5px;
  color: var(--demo-muted);
  font-size: 0.77rem;
  font-weight: 700;
}

.search-factor input[type="number"],
.search-factor select {
  width: 100%;
  min-height: 40px;
  padding: 8px 9px;
  border: 1px solid rgba(22, 53, 42, 0.2);
  border-radius: 9px;
  background: #fbfcfb;
  color: var(--demo-ink);
  font-size: 0.88rem;
}

.search-factor__options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.search-factor__option {
  position: relative;
}

.search-factor__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.search-factor__option span {
  display: block;
  padding: 7px 9px;
  border: 1px solid rgba(22, 53, 42, 0.16);
  border-radius: 999px;
  background: #f3f6f3;
  color: #3f514a;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
}

.search-factor__option input:checked + span {
  border-color: var(--demo-dark);
  background: var(--demo-dark);
  color: #fff;
}

.search-factor__option input:focus-visible + span,
.search-factor input:focus-visible,
.search-factor select:focus-visible,
.search-demo-submit:focus-visible,
.search-demo-reset:focus-visible,
.search-demo-panel-toggle:focus-visible {
  outline: 3px solid rgba(35, 111, 139, 0.28);
  outline-offset: 2px;
}

.search-demo-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 13px;
  border: 0;
  border-radius: 12px;
  background: var(--demo-dark);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.search-demo-submit:hover {
  background: #24463a;
}

.search-demo-submit:disabled {
  cursor: wait;
  opacity: 0.62;
}

.search-demo-legend {
  flex-shrink: 0;
  padding: 14px 18px 15px;
  border-top: 1px solid var(--demo-line);
  background: #fff;
}

.search-demo-legend strong,
.search-demo-legend span {
  display: block;
}

.search-demo-legend strong {
  font-size: 0.84rem;
}

.search-demo-legend > div > span {
  margin-top: 2px;
  color: var(--demo-muted);
  font-size: 0.72rem;
}

.search-demo-legend__scale {
  height: 9px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--demo-green), var(--demo-yellow), var(--demo-red));
}

.search-demo-legend__values {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--demo-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.search-demo-legend p {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 9px 0 0;
  color: var(--demo-muted);
  font-size: 0.72rem;
}

.search-demo-legend p i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #9e9e9e;
}

.search-demo-panel-toggle {
  position: absolute;
  z-index: 610;
  top: 12px;
  left: 12px;
  display: none;
  min-height: 44px;
  padding: 0 15px;
  border: 0;
  border-radius: 11px;
  background: var(--demo-dark);
  box-shadow: 0 8px 28px rgba(17, 38, 30, 0.25);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
}

.leaflet-tooltip.search-box-label {
  padding: 3px 6px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 7px;
  background: rgba(19, 37, 31, 0.86);
  box-shadow: 0 4px 14px rgba(10, 27, 21, 0.18);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
}

.leaflet-tooltip.search-box-label::before {
  display: none;
}

.search-popup {
  min-width: 190px;
  color: var(--demo-ink);
  font-family: inherit;
}

.search-popup strong {
  display: block;
  margin-bottom: 7px;
  font-size: 0.95rem;
}

.search-popup dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5px 12px;
  margin: 0;
}

.search-popup dt {
  color: var(--demo-muted);
}

.search-popup dd {
  margin: 0;
  font-weight: 750;
}

@media (max-width: 720px) {
  .search-demo-header {
    padding-top: 56px;
  }

  .search-demo-header p {
    margin-left: 0;
  }

  .search-demo-panel {
    top: 10px;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .search-demo-shell.is-panel-hidden .search-demo-panel {
    transform: translateY(calc(-100% - 20px));
    opacity: 0;
    pointer-events: none;
  }

  .search-demo-panel-toggle {
    display: block;
  }

  .search-demo-shell:not(.is-panel-hidden) .search-demo-panel-toggle {
    left: auto;
    right: 20px;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-demo-panel {
    transition: none;
  }
}

@media (max-height: 600px) {
  .search-demo-panel {
    overflow-y: auto;
  }

  .search-demo-form {
    flex-shrink: 0;
    overflow-y: visible;
  }
}
