
.point .map-special {
  display: none;
  flex-direction: column;
  flex: 1;
  border-radius: 4px;
}

.point .small-map-special {
  display: none;
  flex-direction: column;
  flex: 1;
}

.point.highlight .map-special {
  display: flex;
  background-color: #FFFFFF
}

.point.smallhighlight .icon {
  display: none;
}

.point.smallhighlight .small-map-special {
  display: flex;
  background-color: #FFFFFF
}

/* --- Path endpoint / hover markers ------------------------------------- */

.path-start-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #fff;
  border: 3px solid #748194;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transform: translate(0, 50%);
}

.path-hover-marker {
  transform: translate(0, 50%);
  position: relative;
}

.path-hover-marker .path-hover-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: #fff;
  border: 4px solid var(--path-color, #2c7be5);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.path-hover-marker.show-info .path-hover-info {
  display: block;
}

/* --- Point tooltip (shared bubble for dot hover, pinned points, path clicks) */

.point .point-tooltip,
.gateway-point .point-tooltip,
.path-hover-marker .path-hover-info {
  display: none;
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  background-color: var(--falcon-card-bg, #fff);
  color: var(--falcon-body-color, #344050);
  border: 1px solid var(--falcon-border-color, #d8e2ef);
  border-radius: 6px;
  padding: 5px 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.point .point-tooltip::after,
.gateway-point .point-tooltip::after,
.path-hover-marker .path-hover-info::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--falcon-card-bg, #fff);
}

.point.smallhighlight .point-tooltip,
.point.highlight .point-tooltip,
.gateway-point:hover .point-tooltip {
  display: block;
}

/* the redesigned tooltip keeps the dot visible on hover
   (overrides the legacy .point.smallhighlight .icon rule above,
   which the compare page still relies on) */
.point.point-rich.smallhighlight .icon {
  display: inline-block;
}

.point-tooltip-title {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
}

.point-tooltip-time {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
}

.point-tooltip-meta {
  font-size: 0.7rem;
  opacity: 0.75;
  line-height: 1.35;
}

/* --- Gateway markers ----------------------------------------------------- */

.gateway-point {
  position: relative;
  transform: translate(0, 50%);
}

.gateway-marker {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: #fff;
  border: 1px solid #d8e2ef;
  color: #748194;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

/* historic gateway positions: smaller, faded, muted so they clearly read as
   past deployments next to a current gateway. Only the circle is faded; the
   tooltip stays fully opaque/readable on hover. */
.gateway-point.gateway-past .gateway-marker {
  width: 20px;
  height: 20px;
  font-size: 9px;
  opacity: 0.55;
  filter: grayscale(1);
  border-style: dashed;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* --- POI markers ----------------------------------------------------------- */

.poi-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.poi-marker .poi-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background-color: var(--poi-color, #d8453c);
  border: 2px solid #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.poi-marker .poi-pin > span,
.poi-marker .poi-pin > svg {
  transform: rotate(45deg);
  color: #fff;
  font-size: 13px;
}

.poi-marker .poi-label {
  position: absolute;
  top: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background-color: rgba(255, 255, 255, 0.85);
  color: #344050;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

/* --- POI panel -------------------------------------------------------------- */

.poi-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 248px;
  background-color: var(--falcon-card-bg, #fff);
  border: 1px solid var(--falcon-border-color, #d8e2ef);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  padding: 12px;
}

.poi-icon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.poi-icon-grid .poi-icon-option {
  border: 1px solid var(--falcon-border-color, #d8e2ef);
  border-radius: 4px;
  background: transparent;
  color: var(--poi-color, #748194);
  padding: 6px 0;
  font-size: 14px;
  cursor: pointer;
}

.poi-icon-grid .poi-icon-option:hover {
  background-color: rgba(116, 129, 148, 0.12);
}

.poi-icon-grid .poi-icon-option.selected {
  background-color: var(--poi-color, #2c7be5);
  border-color: var(--poi-color, #2c7be5);
  color: #fff;
}

.map-placement-mode {
  cursor: crosshair !important;
}

/* --- Comment markers (speech bubble, distinct from POIs/fixes) ------------- */
/* Copied verbatim from the inline <style> in sensor_details.html so the live
   view (sensor_live.html), which has no inline copy, can render comment markers.
   The details page keeps its own identical inline rules; these do not diverge. */
.comment-marker {
  position: relative;
  transform: translate(0, 50%);
  cursor: pointer;
}
.comment-marker .comment-pin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background-color: #f5803e;
  border: 2px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}
.comment-marker:hover .point-tooltip {
  display: block;
}
.comment-marker .point-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 130px;
  max-width: 240px;
  white-space: normal;
  text-align: center;
  background-color: var(--falcon-card-bg, #fff);
  color: var(--falcon-body-color, #344050);
  border: 1px solid var(--falcon-border-color, #d8e2ef);
  border-radius: 6px;
  padding: 5px 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.comment-marker .point-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--falcon-card-bg, #fff);
}
/* keep the timestamp / fix meta on one line; only the free-text comment wraps */
.comment-marker .point-tooltip-time,
.comment-marker .point-tooltip-meta {
  white-space: nowrap;
}
.comment-marker .comment-tooltip-text {
  font-style: italic;
  white-space: pre-line;
}
.comment-marker .point-tooltip-meta + .comment-tooltip-text,
.comment-marker .point-tooltip-time + .comment-tooltip-text {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--falcon-border-color, #d8e2ef);
}

/* --- Live-view arrival ripple + trail fade (sensor_live.html only) -------- */

.live-ripple {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.live-ripple .live-ripple-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2px solid var(--live-ripple-color, #2c7be5);
  opacity: 0.8;
  transform: scale(0.3);
  animation: live-ripple-expand 1.6s ease-out forwards;
}

.live-ripple .live-ripple-ring-delayed {
  animation-delay: 0.3s;
}

@keyframes live-ripple-expand {
  0%   { transform: scale(0.3); opacity: 0.8; }
  100% { transform: scale(3);   opacity: 0; }
}

.live-fade-out {
  animation: live-fade-out 1.5s ease-out forwards;
}

@keyframes live-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
