/* Boca Directory - Interactive Map */
.bmap {
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bmap--embed { margin: 0 0 28px; }

.bmap-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 14px 16px 8px;
}
.bmap-search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border-color, #e2e8f0); border-radius: var(--radius-full, 999px);
  padding: 0 14px; background: #fff; transition: var(--transition);
}
.bmap-search:focus-within { border-color: var(--primary, #d32323); box-shadow: 0 0 0 3px rgba(211,35,35,.12); }
.bmap-search input {
  flex: 1; border: 0; outline: 0; padding: 10px 0; font: inherit; font-size: .92rem; background: transparent;
}
.bmap-sub, .bmap-zip {
  border: 1px solid var(--border-color, #e2e8f0); border-radius: var(--radius-full, 999px);
  padding: 9px 14px; font: inherit; font-size: .88rem; background: #fff; color: var(--text-main);
  max-width: 260px; cursor: pointer;
}
.bmap-count { font-size: .82rem; font-weight: 700; color: var(--text-muted, #64748b); margin-left: auto; white-space: nowrap; }

.bmap-chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 12px; scrollbar-width: thin;
}
.bmap-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-color, #e2e8f0); background: #fff; color: var(--text-main);
  border-radius: var(--radius-full, 999px); padding: 6px 12px; font: inherit; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.bmap-chip em { font-style: normal; font-size: .72rem; color: var(--text-muted); background: #f1f5f9; border-radius: 99px; padding: 1px 7px; }
.bmap-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pin); }
.bmap-chip:hover { border-color: var(--pin); }
.bmap-chip.active { background: var(--pin); border-color: var(--pin); color: #fff; }
.bmap-chip.active em { background: rgba(255,255,255,.25); color: #fff; }
.bmap-chip.active .bmap-chip-dot { background: #fff; }

.bmap-body { display: flex; flex: 1; min-height: 0; border-top: 1px solid var(--border-color, #e2e8f0); }
.bmap-canvas { flex: 1; position: relative; min-height: 460px; background: #e5e7eb; z-index: 0; }
.bmap--embed .bmap-canvas { height: 460px; }
.bmap-loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-weight: 600;
}
.bmap-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: .84rem; border-top: 1px solid var(--border-color, #e2e8f0);
}
.bmap-open-full { color: var(--secondary, #0073bb); font-weight: 700; }
.bmap-open-full:hover { text-decoration: underline; }
.bmap-muted { color: var(--text-muted, #64748b); font-weight: 400; }

/* Pins */
.bmap-pin-wrap { background: none; border: 0; }
.bmap-pin {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--pin); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center; transition: transform .15s;
}
.bmap-pin span { transform: rotate(45deg); font-size: 15px; line-height: 1; }
.bmap-pin-wrap:hover .bmap-pin { transform: rotate(-45deg) scale(1.15); }
.bmap-cluster-wrap { background: none; border: 0; }
.bmap-cluster {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(30,41,59,.9); color: #fff;
  border: 3px solid rgba(255,255,255,.9); box-shadow: 0 3px 10px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem;
}

/* Popup */
.bmap-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 12px; overflow: hidden; }
.bmap-popup .leaflet-popup-content { margin: 0; width: 260px !important; font-family: var(--font-sans); }
.bmap-pop-img { height: 110px; background-size: cover; background-position: center; background-color: #e2e8f0; }
.bmap-pop-body { padding: 12px 14px 14px; }
.bmap-pop-cat {
  display: inline-block; font-size: .7rem; font-weight: 700; color: var(--pin);
  background: color-mix(in srgb, var(--pin) 10%, white); border-radius: 99px; padding: 2px 8px; margin-bottom: 6px;
}
.bmap-pop-name { font-size: 1rem; font-weight: 800; margin: 0 0 4px; color: var(--text-main); line-height: 1.25; }
.bmap-verified { color: var(--verified-green, #2e7d32); font-size: .85rem; }
.bmap-pop-rating, .bmap-pop-addr, .bmap-pop-hours { font-size: .8rem; color: var(--text-main); margin: 3px 0; }
.bmap-stars { color: var(--accent-gold, #f5a623); letter-spacing: 1px; }
.leaflet-container a.bmap-pop-btn {
  display: block; text-align: center; margin-top: 10px; background: var(--primary, #d32323); color: #fff;
  border-radius: 8px; padding: 9px 12px; font-weight: 700; font-size: .85rem; text-decoration: none;
}
.leaflet-container a.bmap-pop-btn:hover { background: var(--primary-hover, #b81f1f); }

/* Full page layout */
.bmap--full { height: calc(100vh - 150px); min-height: 560px; }
.bmap--full .bmap-canvas { min-height: 0; }
.bmap-list {
  width: 360px; flex: 0 0 360px; overflow-y: auto; border-right: 1px solid var(--border-color, #e2e8f0); background: #fff;
}
.bmap-item {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9; cursor: pointer; transition: background .15s;
}
.bmap-item:hover, .bmap-item:focus { background: #f8fafc; outline: none; }
.bmap-item-icon {
  flex: 0 0 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--pin) 14%, white); font-size: 16px;
}
.bmap-item-main { flex: 1; min-width: 0; }
.bmap-item-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmap-item-meta, .bmap-item-addr { font-size: .76rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bmap-item-link {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--primary, #d32323); font-weight: 800; border: 1px solid var(--border-color);
}
.bmap-item-link:hover { background: var(--primary, #d32323); color: #fff; }
.bmap-empty { padding: 18px; font-size: .85rem; color: var(--text-muted); text-align: center; }

.map-page-wrap { max-width: 1400px; margin: 0 auto; padding: 18px 20px 30px; }
.map-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.map-page-head h1 { font-size: 1.6rem; font-weight: 800; }
.map-page-head p { color: var(--text-muted); font-size: .92rem; }

@media (max-width: 900px) {
  .bmap--full { height: auto; }
  .bmap--full .bmap-body { flex-direction: column-reverse; }
  .bmap--full .bmap-canvas { height: 60vh; min-height: 380px; flex: none; }
  .bmap-list { width: 100%; flex: none; max-height: 420px; border-right: 0; border-top: 1px solid var(--border-color); }
}
@media (max-width: 640px) {
  .bmap--embed .bmap-canvas { height: 380px; min-height: 380px; }
  .bmap-count { margin-left: 0; }
  .bmap-sub, .bmap-zip { max-width: none; flex: 1 1 45%; }
}
