/* ── DCD Location Finder ── */

#dcd-wrapper {
  display: flex;
  width: 100%;
  min-height: 50vh;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  box-sizing: border-box;
}

/* Override WordPress block theme p margin */
#dcd-wrapper p {
  margin-top: 0;
  margin-bottom: 0;
}

/* ── Sidebar ── */

#dcd-sidebar {
  width: 380px;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-right: 1px solid #e0e0e0;
}

#dcd-search {
  padding: 14px 16px;
  border-bottom: 1px solid #e0e0e0;
  background: #fff;
}

.dcd-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #111;
}

.dcd-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.dcd-field--zip {
  flex: 1;
}

.dcd-field--radius {
  width: 110px;
  flex-shrink: 0;
}

.dcd-row .dcd-field {
  margin-bottom: 0;
}

.dcd-field {
  margin-bottom: 10px;
}

.dcd-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #666;
  margin-bottom: 3px;
}

#dcd-zip,
#dcd-radius {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #1a1a1a;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

#dcd-zip:focus,
#dcd-radius:focus {
  outline: none;
  border-color: #333;
}

/* Checkboxes */

.dcd-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.dcd-checkbox {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  color: #333;
}

.dcd-checkbox input[type="checkbox"] {
  accent-color: #111;
  width: 15px;
  height: 15px;
  margin: 0;
}

/* Search button */

#dcd-search-btn {
  width: 100%;
  padding: 9px 0;
  margin-top: 2px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

#dcd-search-btn:hover {
  background: #333;
}

#dcd-search-btn:disabled {
  background: #888;
  cursor: not-allowed;
}

/* ── Results ── */

#dcd-results {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.dcd-results-count {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  padding: 8px 14px 2px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Cards */

.dcd-card {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #ebebeb;
  cursor: pointer;
  transition: background 0.12s;
}

.dcd-card:hover {
  background: #fafafa;
}

.dcd-card--active {
  background: #f0f0f0;
}

.dcd-card--active:hover {
  background: #e8e8e8;
}

.dcd-card-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
}

.dcd-card-body {
  min-width: 0;
}

.dcd-card-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 1px;
  line-height: 1.3;
}

.dcd-card-chain {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #555;
  background: #eee;
  padding: 1px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
}

.dcd-card-address {
  font-size: 13px;
  color: #444;
  margin: 1px 0;
  line-height: 1.3;
}

.dcd-card-phone a,
.dcd-card-email a {
  color: #111;
  text-decoration: none;
  font-size: 13px;
}

.dcd-card-phone a:hover,
.dcd-card-email a:hover {
  text-decoration: underline;
}

.dcd-card-dist {
  font-size: 11px;
  color: #999;
  margin: 2px 0 0;
}

/* ── Map ── */

#dcd-map {
  flex: 1;
  min-height: 100%;
}

/* ── InfoWindow ── */

.dcd-info {
  /* font-family: inherit; */
  font-size: 13px;
  line-height: 1.5;
  max-width: 260px;
}

.dcd-info h4 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  margin: 0 0 4px;
  font-size: 14px;
}

.dcd-info p {
  margin: 4px 0;
}

.dcd-info a {
  color: #1a73e8;
  text-decoration: none;
}

.dcd-info a:hover {
  text-decoration: underline;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  #dcd-wrapper {
    flex-direction: column;
    height: auto;
  }

  #dcd-sidebar {
    width: 100%;
    min-width: 0;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }

  #dcd-map {
    min-height: 400px;
  }

  #dcd-results {
    max-height: 300px;
  }
}
