.aiwest-directory-map-wrap {
  box-sizing: border-box;
  margin: 32px 0;
  padding: 24px;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}
.aiwest-directory-width-content {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
.aiwest-directory-map-wrap.aiwest-directory-width-wide {
  width: min(1280px, calc(100vw - 40px));
  max-width: none !important;
  margin-left: 50% !important;
  margin-right: 0 !important;
  transform: translateX(-50%);
}
.aiwest-directory-map-wrap.aiwest-directory-width-full {
  width: 100vw;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  transform: none;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}
.aiwest-directory-demo-notice {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid #fbbf24;
  border-radius: 14px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}
.aiwest-directory-demo-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}
.aiwest-directory-hero {
  margin-bottom: 18px;
}
.aiwest-directory-hero h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 38px);
}
.aiwest-directory-hero p {
  margin: 0;
  color: #475569;
}
.aiwest-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2563eb;
  font-weight: 700;
  margin: 0 0 8px !important;
}
.aiwest-directory-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  margin: 0 0 16px;
}
.aiwest-directory-controls input {
  min-height: 44px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
}
.aiwest-directory-match-btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.aiwest-directory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.aiwest-directory-side-panel {
  min-width: 0;
}
.aiwest-directory-layout-split.aiwest-directory-ratio-70-30 {
  grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
}
.aiwest-directory-layout-split.aiwest-directory-ratio-60-40 {
  grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr);
}
.aiwest-directory-layout-split.aiwest-directory-ratio-50-50 {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
}
.aiwest-directory-layout-map-only .aiwest-directory-side-panel {
  display: none;
}
.aiwest-directory-layout-results-only .aiwest-directory-map {
  display: none !important;
}
.aiwest-directory-layout-results-only .aiwest-directory-side-panel {
  grid-column: 1 / -1;
}
.aiwest-directory-map {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #eff6ff;
  overflow: hidden;
  min-height: 360px;
}
.aiwest-directory-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  max-height: none;
}
.aiwest-directory-layout-split .aiwest-directory-results {
  display: flex;
  flex-direction: column;
  max-height: 650px;
  overflow: auto;
}
.aiwest-directory-layout-split .aiwest-directory-controls {
  grid-template-columns: minmax(0, 1fr);
}
.aiwest-directory-card {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
}
.aiwest-directory-card h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.aiwest-directory-card p {
  margin: 4px 0;
  color: #475569;
}
.aiwest-directory-card .aiwest-score {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}
.aiwest-directory-card a {
  font-weight: 700;
}
.aiwest-directory-directions {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #0f172a;
  color: #fff !important;
  text-decoration: none;
}
.aiwest-directory-ai-result {
  white-space: pre-line;
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
}
.aiwest-leaflet-missing {
  padding: 28px;
  color: #334155;
}
.aiwest-directory-map-loading {
  height: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #334155;
  font-weight: 700;
}
.aiwest-directory-map.leaflet-container {
  width: 100%;
  height: 100%;
}
.aiwest-directory-map .leaflet-control-attribution {
  font-size: 11px;
}
.aiwest-directory-leaflet-marker {
  background: transparent;
  border: 0;
}
.aiwest-directory-marker-dot {
  display: block;
  width: 22px;
  height: 22px;
  margin: 0 auto 5px;
  border: 3px solid #fff;
  border-radius: 999px;
  background: #dc2626;
  box-shadow:
    0 0 0 5px rgba(220, 38, 38, 0.18),
    0 10px 22px rgba(15, 23, 42, 0.28);
}
.aiwest-directory-marker-label {
  display: block;
  max-width: 160px;
  padding: 4px 9px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}
.aiwest-directory-map-has-tile-error {
  background: #e0f2fe;
}
.aiwest-dir-popup strong {
  display: block;
  margin-bottom: 4px;
}
.aiwest-dir-popup span,
.aiwest-dir-popup a {
  display: block;
  margin-top: 5px;
}
.aiwest-dir-popup a {
  font-weight: 700;
}
@media (max-width: 800px) {
  .aiwest-directory-controls,
  .aiwest-directory-layout {
    grid-template-columns: 1fr;
  }
  .aiwest-directory-results {
    max-height: none;
  }
  .aiwest-directory-match-btn {
    width: 100%;
  }
  .aiwest-directory-map-wrap.aiwest-directory-width-wide {
    width: 100%;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none;
  }
  .aiwest-directory-map {
    height: 500px !important;
  }
}
@media (max-width: 520px) {
  .aiwest-directory-map-wrap {
    padding: 16px;
  }
  .aiwest-directory-map {
    height: 400px !important;
  }
}
.aiwest-directory-card .aiwest-match-reason {
  font-size: 13px;
  color: #334155;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 7px 9px;
}
.aiwest-directory-match-btn[disabled] {
  opacity: 0.65;
  cursor: wait;
}
.aiwest-directory-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0 0 8px;
}
.aiwest-directory-select input {
  width: auto;
  height: auto;
}
.aiwest-directory-lead-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 0;
}
.aiwest-directory-lead-open,
.aiwest-directory-generate-message,
.aiwest-directory-submit-lead {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  background: #0f172a;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.aiwest-directory-generate-message {
  background: #2563eb;
}
.aiwest-directory-submit-lead {
  background: #15803d;
}
.aiwest-directory-lead-hint {
  font-size: 13px;
  color: #475569;
}
.aiwest-directory-lead-modal[hidden] {
  display: none;
}
.aiwest-directory-lead-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.aiwest-directory-lead-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
}
.aiwest-directory-lead-close {
  position: absolute;
  right: 14px;
  top: 12px;
  border: 0;
  background: #f1f5f9;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.aiwest-directory-lead-panel h3 {
  margin: 0 40px 8px 0;
}
.aiwest-directory-lead-panel label {
  display: block;
  margin: 12px 0;
  font-weight: 700;
  color: #1e293b;
}
.aiwest-directory-lead-panel input[type="email"],
.aiwest-directory-lead-panel textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px 12px;
  margin-top: 6px;
}
.aiwest-directory-consent {
  display: flex !important;
  gap: 10px;
  align-items: flex-start;
  font-weight: 600 !important;
}
.aiwest-directory-consent input {
  width: auto !important;
  margin-top: 4px;
}
.aiwest-directory-lead-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.aiwest-directory-lead-status {
  white-space: pre-line;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}
.aiwest-directory-lead-status.is-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.aiwest-directory-lead-selected {
  color: #475569;
  margin: 6px 0 12px;
}
@media (max-width: 800px) {
  .aiwest-directory-lead-actions,
  .aiwest-directory-lead-buttons {
    align-items: stretch;
    flex-direction: column;
  }
  .aiwest-directory-lead-open,
  .aiwest-directory-generate-message,
  .aiwest-directory-submit-lead {
    width: 100%;
  }
}
.aiwest-directory-lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}
.aiwest-directory-lead-panel input[type="text"],
.aiwest-directory-lead-panel input[type="email"],
.aiwest-directory-lead-panel textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px 12px;
  margin-top: 6px;
}
.aiwest-directory-lead-panel input[type="text"]:focus,
.aiwest-directory-lead-panel input[type="email"]:focus,
.aiwest-directory-lead-panel textarea:focus {
  outline: 2px solid #bfdbfe;
  border-color: #2563eb;
}
@media (max-width: 700px) {
  .aiwest-directory-lead-grid {
    grid-template-columns: 1fr;
  }
}

/* Repository-safe static directory map. No third-party map library is loaded for the default provider. */
.aiwest-directory-static-map {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 260px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #eef6ff 0%, #f8fafc 45%, #e8f5ef 100%);
  border: 1px solid rgba(15, 23, 42, 0.12);
}
.aiwest-directory-static-map:before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed rgba(37, 99, 235, 0.22);
  border-radius: 50%;
  transform: rotate(-12deg);
}
.aiwest-directory-static-map:after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 50%;
  height: 1px;
  background: rgba(37, 99, 235, 0.12);
  box-shadow:
    0 -80px 0 rgba(37, 99, 235, 0.08),
    0 80px 0 rgba(37, 99, 235, 0.08);
}
.aiwest-directory-static-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-decoration: none;
  color: #0f172a;
  max-width: 170px;
  text-align: center;
}
.aiwest-directory-static-marker span {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0 auto 4px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow:
    0 0 0 5px rgba(37, 99, 235, 0.16),
    0 10px 20px rgba(15, 23, 42, 0.25);
}
.aiwest-directory-static-marker strong {
  display: block;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.aiwest-directory-static-empty {
  height: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  border: 1px dashed rgba(15, 23, 42, 0.2);
  border-radius: 18px;
  background: #f8fafc;
  color: #475569;
}
