/* Green Peak: animirana mapa područja rada (dodatak preko React mape) */
.map { position: relative; overflow: hidden; }
/* SVG crta i preko svog okvira, pa radar, krugovi i sjaj idu do ivica kutije */
.map.mfx-armed .map__svg { overflow: visible; }
.map.mfx-armed .map__links { opacity: 0 !important; }
.map.mfx-armed .map__svg > g[fill="none"] circle { transform-box: view-box; transform-origin: var(--mfx-o); transform: scale(.2); opacity: 0 !important; transition: transform 1.4s cubic-bezier(.2,.8,.2,1), opacity 1.2s ease; }
.map.mfx-on .map__svg > g[fill="none"] circle { transform: none; opacity: var(--mfx-ro, .14) !important; }
.map.mfx-on .map__svg > g[fill="none"] circle:nth-child(2) { transition-delay: .12s; }
.map.mfx-on .map__svg > g[fill="none"] circle:nth-child(3) { transition-delay: .24s; }
.map.mfx-on .map__svg > g[fill="none"] circle:nth-child(4) { transition-delay: .36s; }

.map.mfx-armed .map__pt:not(.is-core) { opacity: 0; transition: opacity .5s ease; }
.map.mfx-armed .map__pt:not(.is-core) .map__dot { transform-box: fill-box; transform-origin: center; }
.map.mfx-armed .map__pt.mfx-hit { opacity: 1; }
.map.mfx-armed .map__pt.mfx-hit .map__dot { animation: mfx-pop .6s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes mfx-pop { 0% { transform: scale(0); } 60% { transform: scale(1.9); } 100% { transform: scale(1); } }
.map.mfx-armed .map__pt.is-core { opacity: 0; transition: opacity .6s ease; }
.map.mfx-on .map__pt.is-core { opacity: 1; }
.map__pt { cursor: default; }

/* linije koje se pune */
.mfx-line { fill: none; stroke: #7DBA4A; stroke-width: 1.2; stroke-linecap: round; opacity: .38; stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.map.mfx-on .mfx-line { animation: mfx-draw var(--d) cubic-bezier(.45,0,.2,1) var(--s) forwards; }
@keyframes mfx-draw { to { stroke-dashoffset: 0; } }
/* svetli vrh linije dok se crta */
.mfx-head { fill: none; stroke: #e6ffc9; stroke-width: 3; stroke-linecap: round; stroke-dasharray: .035 1; stroke-dashoffset: .035; opacity: 0; filter: drop-shadow(0 0 4px #b6f07a); }
.map.mfx-on .mfx-head { animation: mfx-head var(--d) cubic-bezier(.45,0,.2,1) var(--s) forwards; }
@keyframes mfx-head { 0% { stroke-dashoffset: .035; opacity: 1; } 94% { opacity: 1; } 100% { stroke-dashoffset: -.965; opacity: 0; } }

/* energija koja stalno teče od centra ka opštinama */
.mfx-flow { fill: none; stroke: #c8f59a; stroke-width: 2; stroke-linecap: round; stroke-dasharray: .07 .93; stroke-dashoffset: .07; opacity: 0; filter: drop-shadow(0 0 3px rgba(182,240,122,.9)); }
.map.mfx-live .mfx-flow { opacity: .9; animation: mfx-flow var(--f) linear var(--fd) infinite; }
@keyframes mfx-flow { from { stroke-dashoffset: .07; } to { stroke-dashoffset: -.93; } }
.mfx-ping { fill: none; stroke: #b6f07a; stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.map.mfx-live .mfx-ping { animation: mfx-ping var(--f) ease-out var(--fd) infinite; }
@keyframes mfx-ping { 0%, 86% { opacity: 0; transform: scale(.4); } 90% { opacity: .9; } 100% { opacity: 0; transform: scale(2.6); } }

/* radar */
.mfx-sweep { transform-box: view-box; transform-origin: var(--mfx-o); opacity: 0; transition: opacity 1.2s ease .6s; }
.map.mfx-on .mfx-sweep { opacity: 1; animation: mfx-spin 7s linear infinite; }
@keyframes mfx-spin { to { transform: rotate(360deg); } }
.mfx-core-ring { fill: none; stroke: #fff; stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.map.mfx-on .mfx-core-ring { animation: mfx-core 3s ease-out infinite; }
.map.mfx-on .mfx-core-ring.r2 { animation-delay: 1.5s; }
@keyframes mfx-core { 0% { opacity: .55; transform: scale(.5); } 100% { opacity: 0; transform: scale(4.5); } }

/* fokus na jednu opštinu */
.mfx-line.is-hot { stroke: #d8ffb0; opacity: 1; stroke-width: 2; transition: opacity .2s, stroke-width .2s; }
.map.mfx-armed .map__pt.is-hot .map__dot { fill: #fff; }
.map.mfx-armed .map__pt.is-hot .map__label { fill: #fff; }
.mfx-spark { fill: #b6f07a; opacity: 0; }
.map.mfx-live .mfx-spark { animation: mfx-spark var(--t) ease-in-out var(--sd) infinite; }
@keyframes mfx-spark { 0%, 100% { opacity: 0; transform: translateY(0); } 50% { opacity: .55; transform: translateY(-14px); } }

@media (prefers-reduced-motion: reduce) {
  .map.mfx-armed .map__pt:not(.is-core), .map.mfx-armed .map__pt.is-core { opacity: 1; }
  .mfx-line { stroke-dashoffset: 0; }
  .mfx-flow, .mfx-ping, .mfx-head, .mfx-sweep, .mfx-core-ring, .mfx-spark { display: none; }
  .map.mfx-armed .map__svg > g[fill="none"] circle { transform: none; opacity: var(--mfx-ro, .14) !important; }
}
