/* Doctor map styles (pins, clusters, hover card, controls). Loaded only on
   map pages via mapHeadAssets(); kept out of head.php so other pages don't pay for it. */
.leaflet-container { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: #eef0f6; }
.dx-pin-wrap { background: none; border: 0; }
.dx-pin-wrap:focus { outline: none; }

/* Hospital pin: white pill above the point with a small tail */
.dx-pin {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, calc(-100% - 10px));
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  padding: 7px 12px 7px 10px; border-radius: 999px;
  background: #fff; color: #1e1b4b; font-weight: 700; font-size: 12.5px; line-height: 1;
  box-shadow: 0 6px 18px -6px rgba(30, 27, 75, .35), 0 0 0 1px rgba(99, 102, 241, .18);
  transition: transform .18s ease, background-color .18s, color .18s, box-shadow .18s;
  cursor: pointer;
}
.dx-pin::after {
  content: ''; position: absolute; left: 50%; bottom: -4px; width: 10px; height: 10px;
  background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 0 0 3px 0;
  box-shadow: 1px 1px 0 0 rgba(99, 102, 241, .18);
}
.dx-pin-compact { min-width: 30px; height: 30px; padding: 0 9px; }
.dx-pin-dot { width: 8px; height: 8px; border-radius: 50%; background: #a5b4fc; flex-shrink: 0; }
.dx-pin-dot-today { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .2); }
.dx-pin-solid,
.dx-active .dx-pin,
.dx-pin-wrap:hover .dx-pin,
.dx-pin-wrap:focus-visible .dx-pin {
  background: #4f46e5; color: #fff;
  box-shadow: 0 10px 24px -8px rgba(79, 70, 229, .6);
}
.dx-active .dx-pin, .dx-pin-wrap:hover .dx-pin { transform: translate(-50%, calc(-100% - 10px)) scale(1.08); }
.dx-active .dx-pin-dot, .dx-pin-wrap:hover .dx-pin-dot { background: #fff; }
.dx-pin-wrap:focus-visible .dx-pin { outline: 3px solid #c7d2fe; outline-offset: 2px; }

/* Cluster bubble, centred on the point */
.dx-cluster {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #6366f1, #7c3aed); color: #fff; font-weight: 800; font-size: 13px;
  box-shadow: 0 0 0 6px rgba(99, 102, 241, .18), 0 8px 20px -6px rgba(79, 70, 229, .6);
  cursor: pointer; transition: transform .18s ease;
}
.dx-pin-wrap:hover .dx-cluster { transform: translate(-50%, -50%) scale(1.08); }

/* Pulse when the matching result card is hovered */
.dx-pulse .dx-pin { background: #4f46e5; color: #fff; animation: dx-hop .9s ease-in-out infinite; }
.dx-pulse .dx-pin-dot { background: #fff; }
.dx-pulse .dx-cluster { animation: dx-ring 1s ease-out infinite; }
@keyframes dx-hop { 0%, 100% { transform: translate(-50%, calc(-100% - 10px)); } 50% { transform: translate(-50%, calc(-100% - 17px)); } }
@keyframes dx-ring { from { box-shadow: 0 0 0 0 rgba(99, 102, 241, .55), 0 8px 20px -6px rgba(79, 70, 229, .6); } to { box-shadow: 0 0 0 16px rgba(99, 102, 241, 0), 0 8px 20px -6px rgba(79, 70, 229, .6); } }

/* "You are here" */
.dx-you {
  position: absolute; left: 0; top: 0; width: 18px; height: 18px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #2563eb; border: 3px solid #fff;
  box-shadow: 0 0 0 0 rgba(37, 99, 235, .5); animation: dx-you 1.8s ease-out infinite;
}
@keyframes dx-you { to { box-shadow: 0 0 0 20px rgba(37, 99, 235, 0); } }

/* Hover card (Leaflet popup) */
.dx-popup .leaflet-popup-content-wrapper {
  padding: 0; border-radius: 18px; overflow: hidden;
  box-shadow: 0 24px 48px -16px rgba(30, 27, 75, .35), 0 0 0 1px rgba(15, 23, 42, .06);
}
.dx-popup .leaflet-popup-content { margin: 0; width: 320px !important; font-size: 13px; line-height: 1.35; }
.dx-popup .leaflet-popup-tip { box-shadow: none; }
.dx-card-head { padding: 14px 16px 10px; background: linear-gradient(180deg, #f5f6ff, #fff); }
.dx-card-title { font-weight: 800; color: #0f172a; font-size: 14px; }
.dx-card-sub { color: #64748b; font-size: 12px; margin-top: 2px; }
.dx-card-meta { display: inline-block; margin-top: 8px; font-size: 11.5px; font-weight: 700; color: #4338ca; background: #eef0ff; border-radius: 999px; padding: 3px 9px; }
.dx-card-list { max-height: 232px; overflow-y: auto; padding: 4px 8px; }
.leaflet-container a.dx-doc { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; color: inherit; text-decoration: none; }
.leaflet-container a.dx-doc:hover { background: #f8fafc; }
.dx-doc-img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: #f1f5f9; flex-shrink: 0; }
.dx-doc-body { flex: 1; min-width: 0; }
.dx-doc-name, .dx-doc-spec { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dx-doc-name { font-weight: 700; color: #0f172a; }
.dx-doc-spec { font-size: 11.5px; color: #64748b; }
.dx-doc-line { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 11.5px; }
.dx-doc-star { color: #b45309; font-weight: 700; }
.dx-doc-muted { color: #94a3b8; }
.dx-doc-today { color: #047857; background: #ecfdf5; font-weight: 700; padding: 1px 6px; border-radius: 999px; font-size: 10.5px; }
.dx-doc-fee { font-weight: 800; color: #0f172a; }
.dx-card-foot { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid #f1f5f9; }
.leaflet-container .dx-btn {
  flex: 1; text-align: center; font: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 10px;
  border-radius: 10px; border: 1px solid #e2e8f0; color: #334155; background: #fff; cursor: pointer; text-decoration: none;
}
.leaflet-container .dx-btn:hover { background: #f8fafc; }
.leaflet-container .dx-btn-primary { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.leaflet-container .dx-btn-primary:hover { background: #4338ca; }

/* Controls */
.leaflet-touch .leaflet-bar, .leaflet-bar { border: 0; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 18px -8px rgba(15, 23, 42, .35); }
.leaflet-touch .leaflet-bar a, .leaflet-bar a { width: 36px; height: 36px; line-height: 36px; color: #334155; }
.leaflet-control-attribution { font-size: 10px; }

/* Search page states */
.dx-loading .leaflet-marker-pane { opacity: .45; transition: opacity .2s; }
.dx-card-hl { box-shadow: 0 0 0 2px #a5b4fc, 0 10px 30px -12px rgba(79, 70, 229, .45) !important; }

@media (prefers-reduced-motion: reduce) {
  .dx-pulse .dx-pin, .dx-pulse .dx-cluster, .dx-you { animation: none; }
}
