/* FFN Eiswagen-Karte – Widget-Styles. Prefix .ffnk- gegen Kollisionen (WordPress). */

.ffnk-root {
  --ffnk-accent: #e2001a; /* FFN-Rot */
  --ffnk-accent-dark: #a60014;
  position: relative;
  display: inline-block;
  max-width: 100%;
  width: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.3;
  color: #1a1a1a;
}

.ffnk-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
}

.ffnk-map {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* Overlay-Ebene deckt exakt das Bild ab; Kinder werden in % positioniert. */
.ffnk-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* --- Marker (innerhalb der Karte) --- */
.ffnk-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 3;
}
.ffnk-marker__dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ffnk-accent);
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}
.ffnk-marker__dot img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
/* Puls-Ring nur im Live-Zustand */
.ffnk-marker__pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--ffnk-accent);
  opacity: 0;
}
.ffnk-root[data-state="live"] .ffnk-marker__pulse {
  animation: ffnk-pulse 1.8s ease-out infinite;
}
@keyframes ffnk-pulse {
  0% { transform: scale(0.6); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* --- Richtungsindikator (im Puffer außerhalb der Karte) --- */
.ffnk-arrow {
  position: absolute;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 3;
  align-items: center;
  flex-direction: column;
}
/* Schmal & lang -> eindeutige Spitze (gleichschenklig, nicht gleichseitig). */
.ffnk-arrow__chevron {
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 30px solid var(--ffnk-accent);
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.ffnk-arrow__label {
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.9);
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* --- Service-Overlay (außerhalb des Puffers) --- */
.ffnk-service {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 30, 0.55);
  z-index: 4;
}
.ffnk-service__box {
  background: #fff;
  padding: 16px 22px;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  max-width: 80%;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

/* --- Status-Badge --- */
.ffnk-status {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.ffnk-status__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aa0a6;
  flex: 0 0 auto;
}
.ffnk-root[data-state="live"] .ffnk-status__dot { background: #1aa64b; }
.ffnk-root[data-state="stale"] .ffnk-status__dot { background: #f5a623; }

/* --- Stale: alles ausgegraut --- */
.ffnk-root[data-state="stale"] .ffnk-marker,
.ffnk-root[data-state="stale"] .ffnk-arrow {
  filter: grayscale(1) opacity(0.65);
}
