/* === MAPA MĚSTA === */

.city-map-wrapper {
    position: relative;
    overflow: hidden;
}

.city-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
    flex: 0 0 auto;
    gap: 12px;
    flex-wrap: wrap;
}

.city-map-header h2 {
    font-size: 0.95rem;
    color: #58a6ff;
    margin: 0;
    white-space: nowrap;
}

.city-map-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.city-map-controls button {
    background: #21262d;
    color: #e6edf3;
    border: 1px solid #30363d;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}

.city-map-controls button:hover {
    background: #30363d;
    border-color: #58a6ff;
}

.map-legend {
    font-size: 0.72rem;
    color: #8b949e;
    margin-left: 8px;
}

.city-map {
    flex: 1;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #2a5c3d;
    min-height: 0;
    cursor: grab;
}

.city-map:active {
    cursor: grabbing;
}

.city-map svg {
    display: block;
    width: 100%;
    height: 100%;
    user-select: none;
}

.city-map-footer {
    flex: 0 0 auto;
    padding: 6px 14px;
    background: #161b22;
    border-top: 1px solid #30363d;
    font-size: 0.78rem;
    color: #8b949e;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.city-map-footer b {
    color: #e6edf3;
}

/* === Animace vzniku budov (POZOR: jen scale + opacity, žádný translate!) === */
@keyframes buildingAppear {
    0% {
        transform: scale(0.05);
        opacity: 0;
    }
    70% {
        transform: scale(1.18);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Vnitřní g s animací – pozicování (translate) je na vnějším g přes SVG atribut */
.building-anim {
    transform-origin: center center;
    transform-box: fill-box;
    animation: buildingAppear 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* === Pulzování "nové" budovy === */
@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 0px #ffcc00); }
    50%      { filter: drop-shadow(0 0 8px #ffcc00); }
}

.building-anim.new-build {
    animation: buildingAppear 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
               pulseGlow 1.2s ease-in-out 0.65s 2;
}

/* === Tečky lidí === */
.person-dot {
    transition: fill 0.3s;
}

