/* BALKANOPOLY — who owns what on the atlas (js/map-marks.js, v9.8): owner rings on the cities, one square flag per
   complete country, and the names / airports moved to free spots so nothing overlaps. */

/* an owned city: a ring in the owner's colour (dashed and faded while mortgaged) */
.pin .ring {
  position: absolute;
  left: -0.85cqw;
  top: -0.85cqw;
  width: 1.7cqw;
  height: 1.7cqw;
  box-sizing: border-box;
  border-radius: 50%;
  background: #fbf4e2;
  border: 0.48cqw solid var(--oc);
  box-shadow: 0 0 0 0.16cqw #3b2d1d;
  display: block;
  animation: ringin 0.45s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.pin .ring.m {
  border-style: dashed;
  opacity: 0.55;
}
@keyframes ringin {
  from {
    transform: scale(0.2);
    opacity: 0;
  }
}

/* names: map-marks.js sets their spot; this is only where they sit before it runs */
.plab {
  left: 1.2cqw;
  top: -0.7cqw;
}
/* no free spot anywhere: the name waits until you point at its city */
.plab.hid {
  opacity: 0;
  pointer-events: none;
}
.pin:hover .plab.hid {
  opacity: 1;
}

/* an airport moved off its usual spot: a thin line back to where it really is */
.pin .pmark {
  transition: transform 0.25s;
}
.pin .lead {
  position: absolute;
  left: 0;
  top: -0.08cqw;
  height: 0.16cqw;
  background: #3b2d1d;
  transform-origin: 0 50%;
  opacity: 0.8;
}
.pin .lead::before {
  content: '';
  position: absolute;
  left: -0.3cqw;
  top: -0.22cqw;
  width: 0.6cqw;
  height: 0.6cqw;
  border-radius: 50%;
  background: #3b2d1d;
}

/* a complete country: its real flag as a small square badge, framed in the owner's colour, on the country's land */
#cflags {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.cflag {
  position: absolute;
  width: 0;
  height: 0;
  transition: opacity 0.2s;
}
.cflag.dim {
  opacity: 0.28;
}
.cflag .fl {
  position: absolute;
  left: -2.1cqw;
  top: -1.4cqw;
  width: 4.2cqw;
  height: 2.8cqw;
  box-sizing: border-box;
  border: 0.42cqw solid var(--oc);
  outline: 0.15cqw solid #3b2d1d;
  box-shadow: 0.25cqw 0.25cqw 0 0.15cqw rgba(59, 45, 29, 0.3);
  background: #fbf4e2;
  animation: plant 0.5s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.cflag .fl .flag {
  display: block;
  width: 100%;
  height: 100%;
}
@keyframes plant {
  from {
    transform: scale(0.2);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pin .ring,
  .cflag .fl {
    animation: none;
  }
  .pin .pmark {
    transition: none;
  }
}
