/* Museo del Vino de Almonte · marcadores del mapa (web y panel) */
.tm-icon { background: none; border: 0; }
.tm-pin { display: block; filter: drop-shadow(0 4px 6px rgba(30, 20, 5, .4)); }
.tm-svg { width: 100%; height: 100%; overflow: visible; }
.tm-logo { position: relative; width: 54px; height: 54px; border-radius: 50%; background: #6E1E30; border: 3px solid #D7B57E; display: grid; place-items: center; overflow: visible; }
.tm-logo img { height: 34px; width: auto; display: block; margin-top: 1px; }
.tm-logo::after { content: ""; position: absolute; left: 50%; bottom: -12px; margin-left: -8px; border: 8px solid transparent; border-top: 10px solid #D7B57E; border-bottom: 0; }
.tm-dot { position: relative; width: 26px; height: 26px; }
.tm-dot i { position: absolute; inset: 5px; border-radius: 50%; background: #5B1A2A; border: 3px solid #fff; z-index: 1; }
/* Contenedor que ocupa todo el icono: se escala con el zoom desde el punto de anclaje */
.tm-in { position: relative; width: 100%; height: 100%; transform: scale(var(--tm-s, 1)); transition: transform .25s ease; }
.tm-in > .tm-pin { position: relative; z-index: 1; }
/* Halo que late detrás del marcador, para que resalte */
.tm-pulse { position: absolute; z-index: 0; border-radius: 50%; background: rgba(122, 34, 54, .38); box-shadow: 0 0 0 2px rgba(184, 149, 90, .4); pointer-events: none; animation: tm-pulse 2.2s ease-out infinite; }
.tm-k-punto .tm-pulse { background: rgba(128, 97, 54, .38); }
.tm-k-copa .tm-pulse { background: rgba(216, 191, 138, .45); }
@keyframes tm-pulse { 0% { transform: scale(.7); opacity: .95; } 70% { opacity: .25; } 100% { transform: scale(2.3); opacity: 0; } }
/* Halo desactivado en Panel → Mapa */
.tm-nohalo .tm-pulse { display: none; }
@media (prefers-reduced-motion: reduce) { .tm-pulse { animation: none; opacity: .35; transform: scale(1.3); } .tm-in { transition: none; } }
.leaflet-marker-draggable { cursor: grab; }
.leaflet-dragging .leaflet-marker-draggable { cursor: grabbing; }
.tm-popup { display: flex; flex-direction: column; gap: 3px; font: 400 .95rem/1.35 "Jost", system-ui, sans-serif; }
.tm-popup strong { font-weight: 600; }
.tm-popup a { margin-top: 4px; font-weight: 600; }

/* Crédito de OpenStreetMap (obligatorio por su licencia): mínimo y discreto */
.leaflet-container .leaflet-control-attribution { background: rgba(255, 255, 255, .7) !important; color: #4a453d; box-shadow: none; padding: 0 6px 2px; font-size: 10px; line-height: 1.4; opacity: .5; transition: opacity .2s; text-shadow: 0 0 3px rgba(255, 255, 255, .9); }
.leaflet-container .leaflet-control-attribution:hover { opacity: 1; }
.leaflet-container .leaflet-control-attribution a { color: inherit !important; text-decoration: none; }
/* Aviso para ampliar con la rueda */
.tm-hint { position: absolute; z-index: 1000; left: 50%; top: 14px; transform: translateX(-50%); padding: 10px 16px; border-radius: 8px; background: rgba(30, 26, 20, .82); color: #fff; font: 600 .92rem/1.3 "Jost", system-ui, sans-serif; text-align: center; pointer-events: none; max-width: 80%; }
.tm-hint[hidden] { display: none; }

/* Estilo del mapa (Panel → Mapa): un «velo» sobre los mosaicos; los marcadores no cambian.
   En la web, con el modo nocturno, el mismo estilo en oscuro. */
.map-st-suave .leaflet-tile-pane, .map-st-suave iframe { filter: grayscale(.6) sepia(.2) contrast(.92) brightness(1.03); }
.map-st-vino .leaflet-tile-pane, .map-st-vino iframe { filter: grayscale(1) sepia(.45) hue-rotate(-28deg) saturate(1.5) contrast(.9) brightness(1.02); }
.map-st-claro .leaflet-tile-pane, .map-st-claro iframe { filter: grayscale(.92) contrast(.9) brightness(1.08); }
:root[data-theme="dark"] body:not(.panel) .map-st-suave .leaflet-tile-pane, :root[data-theme="dark"] body:not(.panel) .map-st-suave iframe { filter: invert(1) hue-rotate(180deg) grayscale(.55) sepia(.18) brightness(1.15) contrast(.8); }
:root[data-theme="dark"] body:not(.panel) .map-st-vino .leaflet-tile-pane, :root[data-theme="dark"] body:not(.panel) .map-st-vino iframe { filter: invert(1) grayscale(1) sepia(.55) hue-rotate(-30deg) saturate(1.6) brightness(1.1) contrast(.8); }
:root[data-theme="dark"] body:not(.panel) .map-st-claro .leaflet-tile-pane, :root[data-theme="dark"] body:not(.panel) .map-st-claro iframe { filter: invert(1) hue-rotate(180deg) grayscale(.9) brightness(1.15) contrast(.8); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body:not(.panel) .map-st-suave .leaflet-tile-pane, :root:not([data-theme="light"]) body:not(.panel) .map-st-suave iframe { filter: invert(1) hue-rotate(180deg) grayscale(.55) sepia(.18) brightness(1.15) contrast(.8); }
  :root:not([data-theme="light"]) body:not(.panel) .map-st-vino .leaflet-tile-pane, :root:not([data-theme="light"]) body:not(.panel) .map-st-vino iframe { filter: invert(1) grayscale(1) sepia(.55) hue-rotate(-30deg) saturate(1.6) brightness(1.1) contrast(.8); }
  :root:not([data-theme="light"]) body:not(.panel) .map-st-claro .leaflet-tile-pane, :root:not([data-theme="light"]) body:not(.panel) .map-st-claro iframe { filter: invert(1) hue-rotate(180deg) grayscale(.9) brightness(1.15) contrast(.8); }
}
.map-styles { display: grid; gap: 4px; margin-bottom: 8px; }
