/* Map pins, “you are here” dot and popups — loaded with every map (site and admin). */
.ahp { position: relative; display: block; width: 36px; height: 46px; --pin: var(--brand, #0f8a5f); }
.ahp-certified { --pin: #0d8f5b; } .ahp-halal, .ahp-brand { --pin: var(--brand, #0f8a5f); } .ahp-options { --pin: #2f6fdb; }
.ahp-questionable { --pin: #c98a1b; } .ahp-not_halal { --pin: #d1434b; } .ahp-zabiha { --pin: #0b6e47; }
/* the badge with its little pointer — drops in when the map appears */
.ahp-body {
  position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pin); color: #fff; border: 3px solid #fff;
  box-shadow: 0 6px 14px -4px rgba(10, 30, 22, .45), 0 0 0 1px rgba(10, 30, 22, .08);
  animation: ahp-drop .5s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0ms) both;
  transition: transform .2s cubic-bezier(.2, 1.4, .4, 1);
}
.ahp-body::after {
  content: ""; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; background: var(--pin);
  border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: translateX(-50%) rotate(45deg); border-radius: 0 0 3px 0; z-index: -1;
}
.ahp-body svg { position: relative; z-index: 1; }
.ahp::after { /* soft shadow on the ground */
  content: ""; position: absolute; left: 50%; bottom: -2px; width: 14px; height: 5px; margin-left: -7px; border-radius: 50%;
  background: rgba(10, 30, 22, .28); filter: blur(1.5px); animation: ahp-shadow .5s ease var(--d, 0ms) both;
}
@keyframes ahp-drop { 0% { opacity: 0; transform: translateY(-26px) scale(.6); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes ahp-shadow { from { opacity: 0; transform: scaleX(.3); } }
.ahp:hover .ahp-body, .ahp.is-active .ahp-body { transform: translateY(-4px) scale(1.12); }
.ahp.is-active .ahp-body { animation: ahp-hop .55s ease 1; }
@keyframes ahp-hop { 0%, 100% { transform: translateY(-4px) scale(1.12); } 45% { transform: translateY(-14px) scale(1.12); } }

/* redrawn pins (hover on a list card) don't drop in again */
.ahp.is-still .ahp-body, .ahp.is-still::after, .ahp.is-still .ahp-tag { animation: none; }
.ahp.is-still.is-active .ahp-body { animation: ahp-hop .55s ease 1; }

/* the nearest places: a pulse, a brighter badge and a small label */
.ahp.is-near .ahp-body { box-shadow: 0 8px 18px -4px color-mix(in oklab, var(--pin) 70%, transparent), 0 0 0 1px rgba(10, 30, 22, .08); }
.ahp-pulse {
  position: absolute; left: 50%; top: 18px; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  background: color-mix(in oklab, var(--pin) 45%, transparent); pointer-events: none; animation: ahp-pulse 2.2s ease-out infinite;
}
.ahp-pulse + .ahp-pulse { animation-delay: 1.1s; }
@keyframes ahp-pulse { 0% { transform: scale(.8); opacity: .75; } 100% { transform: scale(2.6); opacity: 0; } }
.ahp-tag {
  position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; background: #fff; color: #17231d; font: 700 11px/1.4 var(--font, system-ui), sans-serif;
  box-shadow: 0 4px 12px -2px rgba(10, 30, 22, .3); animation: ahp-tag .4s ease calc(var(--d, 0ms) + .35s) both; pointer-events: none;
}
.ahp-tag::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -4px; border: 4px solid transparent; border-top-color: #fff; }
@keyframes ahp-tag { from { opacity: 0; transform: translate(-50%, 6px); } }
[data-theme="dark"] .ahp-tag { background: #1d2622; color: #e8efe9; }
[data-theme="dark"] .ahp-tag::after { border-top-color: #1d2622; }

/* you are here */
.ahme { position: relative; display: block; width: 22px; height: 22px; }
.ahme-dot { position: absolute; inset: 3px; border-radius: 50%; background: #2f7bf6; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(20, 60, 140, .45); }
.ahme-halo { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(47, 123, 246, .35); animation: ahme 2s ease-out infinite; }
@keyframes ahme { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(3.4); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .ahp-body, .ahp::after, .ahp-tag { animation: none; }
  .ahp-pulse, .ahme-halo { animation: none; opacity: .25; transform: scale(1.6); }
  .ahp.is-active .ahp-body { animation: none; }
}

/* map credits: only the small (i) button until it is tapped */
.maplibregl-ctrl-attrib.maplibregl-compact:not([data-ah-open]) .maplibregl-ctrl-attrib-inner,
.mapboxgl-ctrl-attrib.mapboxgl-compact:not([data-ah-open]) .mapboxgl-ctrl-attrib-inner { display: none !important; }
.maplibregl-ctrl-attrib.maplibregl-compact:not([data-ah-open]),
.mapboxgl-ctrl-attrib.mapboxgl-compact:not([data-ah-open]) { padding: 2px 24px 2px 0 !important; }
.maplibregl-ctrl-attrib.maplibregl-compact[data-ah-open] .maplibregl-ctrl-attrib-inner,
.mapboxgl-ctrl-attrib.mapboxgl-compact[data-ah-open] .mapboxgl-ctrl-attrib-inner { display: block !important; }
.maplibregl-ctrl-attrib.maplibregl-compact[data-ah-open],
.mapboxgl-ctrl-attrib.mapboxgl-compact[data-ah-open] { padding: 2px 28px 2px 8px !important; }
