.chf *, .chf *::before, .chf *::after {
  box-sizing: border-box;
}

.chf {
  --teal: #053d4d;
  --teal-dark: #032c38;
  --teal-soft: #e6f0f2;
  --bg: #ececec;
  --panel: #f7f7f7;
  --white: #ffffff;
  --text: #1d2b30;
  --muted: #66727a;
  --line: #d6dcde;
  --icon: #8a4b2e;
  --focus: #f0a500;
  --error: #b3261e;
}

.chf, .chf {
  margin: 0;
  height: 100%;
}

.chf {
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  background: var(--bg);
}

.chf h1, .chf h2 {
  font-family: "Montserrat", system-ui, sans-serif;
}

.chf .description {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #333;
  margin: 0 0 12px;
}

.chf [hidden] {
  display: none !important;
}

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

.chf :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.chf .ico {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chf .btn-primary, .chf .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 4px;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.chf .btn-primary {
  background: var(--teal);
  color: #fff;
  border: 1px solid var(--teal);
}

.chf .btn-primary:hover {
  background: var(--teal-dark);
}

.chf .btn-outline {
  background: #fff;
  color: var(--teal);
  border: 1px solid var(--teal);
}

.chf .btn-outline:hover {
  background: var(--teal-soft);
}

.chf .btn-block {
  width: 100%;
}

.chf .btn-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: none;
  border: 0;
  color: var(--teal);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.chf .btn-square {
  width: 46px;
  height: 44px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: #fff;
  border: 1px solid var(--teal);
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.chf .btn-square:hover {
  background: var(--teal-dark);
}

.chf .btn-square-outline {
  border-radius: 4px;
  background: #fff;
  color: var(--teal);
  border: 1px solid var(--teal);
  margin-left: 8px;
  width: 44px;
  flex-basis: 44px;
}

.chf .btn-square-outline:hover {
  background: var(--teal-soft);
}

.chf .form-error {
  color: var(--error);
  margin: 12px 0 0;
  font-size: 0.9rem;
}

.chf.chf-home {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.chf .home-card {
  width: 100%;
  max-width: 560px;
  background: var(--white);
  padding: 32px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.chf .home-card h1 {
  font-weight: 500;
  font-size: 1.75rem;
  margin: 0 0 20px;
}

.chf .home-form {
  display: flex;
  flex-direction: column;
}

.chf .input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.chf .input-wrap input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: #f1f1f1;
  padding: 0 52px 0 14px;
  font: inherit;
  color: var(--text);
  border-radius: 4px 4px 0 0;
}

.chf .input-wrap input:focus {
  background: #fff;
}

.chf .icon-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 4px;
  color: var(--teal);
  cursor: pointer;
  line-height: 0;
}

.chf .icon-btn .ico {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.chf .home-form .btn-primary {
  border-radius: 0 0 4px 4px;
}

.chf.chf-map {
  margin: 0;
}

.chf .app {
  display: flex;
  height: 100vh;
  width: 100%;
}

.chf .sidebar {
  width: 380px;
  flex: 0 0 380px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.chf .search-bar {
  padding: 16px;
  background: var(--panel);
}

.chf .field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.chf .search-form {
  margin: 0;
}

.chf .input-group {
  display: flex;
  align-items: stretch;
}

.chf .input-group input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: #fff;
  padding: 0 12px;
  font: inherit;
  color: var(--text);
}

.chf .search-bar {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
}

.chf .search-form {
  flex: 1;
  min-width: 0;
  display: block;
}

.chf .results-header {
  background: var(--teal);
  color: #fff;
  padding: 14px 16px;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 600;
}

.chf .status {
  margin: 8px 16px 0;
  min-height: 1.2em;
  font-size: 0.85rem;
  color: var(--muted);
}

.chf .status.error {
  color: var(--error);
}

.chf .results-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.chf .card {
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.chf .card:hover {
  background: #fafcfc;
}

.chf .card.is-active {
  background: var(--teal-soft);
  box-shadow: inset 4px 0 0 var(--teal);
}

.chf .card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--text);
}

.chf .distance {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--muted);
  margin: -4px 0 8px;
}

.chf .meta {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 6px 0;
  font-size: 0.9rem;
  color: #333;
}

.chf .meta .ico {
  color: var(--icon);
  margin-top: 2px;
}

.chf .meta a {
  color: inherit;
  word-break: break-word;
}

.chf .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}

.chf .tag {
  font-size: 0.85rem;
}

.chf .actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.chf .actions > * {
  flex: 1;
  height: 40px;
  font-size: 0.9rem;
}

.chf .empty {
  padding: 24px 16px;
  color: var(--muted);
}

.chf .map-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
}

.chf .map {
  position: absolute;
  inset: 0;
}

.chf .pin {
  width: 34px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  transition: transform 0.15s ease;
}

.chf .pin svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--teal);
}

.chf .pin .pin-dot {
  fill: #fff;
}

.chf .pin.hover, .chf .pin.active {
  transform: scale(1.15);
}

.chf .pin.hover svg, .chf .pin.active svg {
  fill: #f0a500;
}

.chf .you-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2f80ed;
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(47, 128, 237, 0.25);
}

.chf .mapboxgl-popup-content {
  font-family: "Montserrat", system-ui, sans-serif;
  padding: 12px 14px;
  border-radius: 4px;
}

.chf .popup strong {
  color: var(--teal);
}

.chf .popup-title {
  display: block;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.chf .popup-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #333;
  margin: 0 0 8px;
}

.chf .popup-address {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.chf .popup-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.82rem;
  margin: 4px 0;
}

.chf .popup-row .ico {
  color: var(--icon);
  margin-top: 2px;
}

.chf .popup-row a {
  color: inherit;
}

.chf .popup-btn {
  height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.chf .modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.chf .modal-dialog {
  background: #fff;
  width: 100%;
  max-width: 420px;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.chf .modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.chf .modal-head h2 {
  font-size: 1rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chf .close-btn {
  background: none;
  border: 0;
  padding: 4px;
  cursor: pointer;
  color: var(--text);
  line-height: 0;
}

.chf .close-btn .ico {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}

.chf #locate-form input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 12px;
  font: inherit;
  color: var(--text);
  margin-bottom: 12px;
}

.chf #locate-form .btn-primary {
  text-transform: uppercase;
}

@media (max-width: 760px) {
.chf .app {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

.chf .sidebar {
    width: 100%;
    flex: none;
    border-right: 0;
  }

.chf .results-list {
    overflow: visible;
  }

.chf .map-wrap {
    flex: none;
    height: 60vh;
  }
}

/* WordPress layout overrides */
.chf.chf-home { min-height: auto; padding: 40px 16px; background: transparent; }
.chf.chf-map { height: 80vh; min-height: 560px; }
.chf.chf-map .app { height: 100%; }
@media (max-width: 760px) {
  .chf.chf-map { height: auto; min-height: 0; }
  .chf.chf-map .app { height: auto; min-height: 0; }
  .chf.chf-map .map-wrap { height: 60vh; }
}

/* Autocomplete suggestions */
.chf .chf-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  max-height: 280px;
  overflow-y: auto;
  text-align: left;
}

.chf .chf-suggest-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

.chf .chf-suggest-item:last-child {
  border-bottom: 0;
}

.chf .chf-suggest-item:hover,
.chf .chf-suggest-item.is-active {
  background: var(--teal-soft);
}

.chf .chf-suggest-name {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.chf .chf-suggest-place {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}
