/**
 * Business Directory Cards
 * Plugin: Joerrens Places
 * Version: 2.5.0
 */

/* --- Grid --- */
.jp-bd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: stretch;
}

/* --- Card --- */
.jp-bd-card {
  background: #fff;
  border: 1px solid #e8e8ef;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.jp-bd-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
  border-color: #d0d0e0;
}

/* --- Initialen --- */
.jp-bd-initials {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.jp-bd-init-0 { background: #eff4ff; color: #2563eb; }
.jp-bd-init-1 { background: #f0fdf4; color: #16a34a; }
.jp-bd-init-2 { background: #fffbeb; color: #d97706; }
.jp-bd-init-3 { background: #f3f0ff; color: #7c3aed; }
.jp-bd-init-4 { background: #fff1f2; color: #e11d48; }
.jp-bd-init-5 { background: #f0fdfa; color: #0d9488; }

/* Vårdcentral */
.jp-bd-init-vc { background: #e0f2fe; color: #0369a1; }

/* Smålandliebe */
.jp-bd-init-sl { background: #ecfdf5; color: #047857; }

/* --- Info --- */
.jp-bd-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.jp-bd-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  margin: 0 0 2px 0;
}

/* --- Meta: Entfernung + Kategorie --- */
.jp-bd-meta {
  font-size: 12px;
  color: #8e8ea0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.jp-bd-distance {
  color: #5a5a7a;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.jp-bd-distance svg {
  width: 10px;
  height: 10px;
  fill: #2563eb;
}

.jp-bd-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #8e8ea0;
  flex-shrink: 0;
}

/* --- Adresse --- */
.jp-bd-address {
  font-size: 13px;
  color: #5a5a7a;
  margin-bottom: 10px;
  line-height: 1.4;
}

.jp-bd-city-link {
  color: #2563eb;
  text-decoration: none;
}

.jp-bd-city-link:hover {
  text-decoration: underline;
}

/* --- Subtext unter Headline --- */
.jp-bd-subtext {
  font-size: 14px;
  color: #5a5a7a;
  margin: -4px 0 16px 0;
  line-height: 1.5;
}

/* --- Kontakt-Pillen --- */
.jp-bd-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.jp-bd-contact a,
.jp-bd-contact a:link,
.jp-bd-contact a:visited,
.jp-bd-contact a:active {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #2563eb;
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 4px 10px;
  border-radius: 6px;
  background: #eff4ff;
  transition: background 0.15s ease;
}

.jp-bd-contact a:hover {
  background: #dde6ff;
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

.jp-bd-contact svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- CTA --- */
.jp-bd-cta {
  font-size: 11px;
  color: #8e8ea0;
  cursor: pointer;
  transition: color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  margin-top: auto;
}

.jp-bd-cta:hover {
  color: #2563eb;
}

.jp-bd-cta svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --- Modal --- */
.jp-bd-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.jp-bd-overlay.active {
  display: flex;
}

.jp-bd-modal {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  position: relative;
  margin: 0 auto;
  text-align: left;
}

.jp-bd-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none !important;
  border: none !important;
  font-size: 22px;
  color: #8e8ea0;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  width: auto;
  min-width: 0;
  box-shadow: none;
}

.jp-bd-modal-close:hover {
  color: #1a1a2e;
  background: none !important;
}

.jp-bd-modal h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.jp-bd-modal-subtitle {
  font-size: 13px;
  color: #5a5a7a;
  margin: 0 0 20px 0;
}

.jp-bd-modal-entry {
  background: #f6f7f9;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 20px;
}

.jp-bd-modal-entry-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.jp-bd-modal-entry-addr {
  font-size: 12px;
  color: #5a5a7a;
}

.jp-bd-modal-address {
  font-size: 13px;
  color: #5a5a7a;
  margin-bottom: 20px;
}

.jp-bd-modal label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #5a5a7a;
  margin-bottom: 4px;
}

.jp-bd-modal input[type="text"],
.jp-bd-modal input[type="url"],
.jp-bd-modal input[type="email"],
.jp-bd-modal input[type="tel"] {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #e8e8ef;
  border-radius: 8px;
  margin-bottom: 14px;
  font-family: inherit;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.jp-bd-modal input:focus {
  outline: none;
  border-color: #2563eb;
}

.jp-bd-modal-submit {
  display: block;
  width: 100%;
  padding: 10px;
  background: #2563eb !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease;
  box-shadow: none;
  min-width: 0;
  line-height: 1.5;
}

.jp-bd-modal-submit:hover {
  background: #1d4ed8 !important;
}

.jp-bd-modal-submit:disabled {
  background: #8e8ea0 !important;
  cursor: not-allowed;
}

.jp-bd-modal-msg {
  text-align: center;
  font-size: 13px;
  margin-top: 12px;
}

.jp-bd-modal-msg.success { color: #16a34a; }
.jp-bd-modal-msg.error { color: #e11d48; }

/* Honeypot */
.jp-bd-hp { position: absolute; left: -9999px; }

/* --- Responsive --- */
@media (max-width: 700px) {
  .jp-bd-grid {
	grid-template-columns: 1fr;
  }
}