/* CSM Shop Finder Widget */
.csm-sf-wrap { font-family: system-ui, -apple-system, sans-serif; }

/* Search bar */
.csm-sf-search-form { margin-bottom: 12px; }
.csm-sf-search-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.csm-sf-input-wrap {
  flex: 1 1 200px; min-width: 0; position: relative; display: flex; align-items: center;
}
.csm-sf-input {
  width: 100%;
  padding: 9px 34px 9px 14px; border: 1px solid #cbd5e1; border-radius: 10px;
  font-size: 14px; outline: none; background: #fff;
}
.csm-sf-input:focus { border-color: #448cfb; box-shadow: 0 0 0 3px rgba(68,140,251,.15); }
.csm-sf-clear {
  position: absolute; right: 8px;
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0;
  background: #94a3b8; border: none; border-radius: 50%; cursor: pointer;
  color: #fff; transition: background .15s;
}
.csm-sf-clear svg { width: 10px; height: 10px; }
.csm-sf-clear:hover { background: #64748b; }
.csm-sf-type-select {
  padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 10px;
  font-size: 14px; background: #fff; cursor: pointer;
}
.csm-sf-btn {
  padding: 9px 18px; background: #448cfb; color: #fff;
  border: none; border-radius: 10px; font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.csm-sf-btn:hover { background: #2d7ef5; }
.csm-sf-locate-btn {
  padding: 9px 10px; background: #f1f5f9; color: #475569;
  border: 1px solid #cbd5e1; border-radius: 10px; cursor: pointer;
  display: flex; align-items: center;
}
.csm-sf-locate-btn svg { width: 18px; height: 18px; }
.csm-sf-locate-btn:hover { background: #e2e8f0; }

/* Status */
.csm-sf-status { font-size: 13px; color: #64748b; min-height: 20px; margin-bottom: 8px; }

/* Body layout */
.csm-sf-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 12px;
  height: var(--csm-sf-height, 420px);
}
@media (max-width: 900px) {
  .csm-sf-body { grid-template-columns: 1fr; grid-template-rows: 260px 310px; height: auto; }
  .csm-sf-results { height: 310px; max-height: 310px; }
}

/* Map — isolation: isolate scopes Leaflet's internal z-indices so they don't bleed above the sticky header */
.csm-sf-map-pane { border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; isolation: isolate; }
.csm-sf-map { height: 100%; }

/* Results list */
.csm-sf-results {
  overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  height: 100%;
}
.csm-sf-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: #94a3b8; font-size: 14px; text-align: center; padding: 20px;
}
.csm-sf-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; text-decoration: none; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.csm-sf-result-item:hover {
  border-color: #448cfb; box-shadow: 0 1px 4px rgba(68,140,251,.12);
}
.csm-sf-result-icon {
  flex-shrink: 0; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: #e2e8f0; border-radius: 9px; color: #64748b;
}
.csm-sf-result-icon svg { width: 18px; height: 18px; }
.csm-sf-result-icon.csm-sf-reg { background: #448cfb; color: #fff; }
.csm-sf-result-info { flex: 1; min-width: 0; }
.csm-sf-result-info strong { display: block; font-size: 14px; font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csm-sf-result-info span { display: block; font-size: 12px; color: #64748b; }
.csm-sf-unclaimed { color: #d97706 !important; }
.csm-sf-chevron { flex-shrink: 0; width: 16px; height: 16px; color: #94a3b8; }
