/* docs/features/game-engine/campaign/ — stage-relative sizing only (--gs-u-w / --gs-u-h). */

.campaign-map {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  /* Landmarks Teleport to #game-shell-art-frame under the stage; this shell must
   * not steal hits. Topbar / error controls re-enable via their own rules. */
  pointer-events: none;
}

.campaign-map__topbar {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  display: block;
  width: fit-content;
  padding: 0;
  pointer-events: none;
}

.campaign-map__topbar > * {
  pointer-events: auto;
}

.onscreen-location,
.campaign-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  text-decoration: none;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.onscreen-location:hover,
.campaign-hotspot:hover {
  z-index: 3;
}

.campaign-hotspot--city {
  gap: calc(var(--gs-u-h) * 0.46);
  min-width: calc(var(--gs-u-w) * 9.6);
  color: #d7f2ff;
}

.campaign-hotspot--city .onscreen-location__label {
  border-color: rgba(147, 214, 255, 0.55);
  color: #d7f2ff;
}

.campaign-hotspot--city:hover .onscreen-location__label {
  box-shadow: 0 0 calc(var(--gs-u-h) * 1.2) rgba(122, 202, 252, 0.35);
}

.onscreen-location--poi,
.campaign-hotspot--zone {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--gs-u-h) * 0.46);
  min-width: calc(var(--gs-u-w) * 9.6);
  color: #f7ebd6;
}

.onscreen-location__icon-frame,
.campaign-hotspot__icon-frame {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  --campaign-poi-icon-frame-size: calc(var(--gs-u-h) * 7.5);
  width: var(--campaign-poi-icon-frame-size);
  height: var(--campaign-poi-icon-frame-size);
}

.onscreen-location__icon-frame::before,
.campaign-hotspot__icon-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: var(--gs-stroke) solid rgba(255, 235, 198, 0.9);
  background: radial-gradient(circle at 35% 30%, rgba(255, 246, 218, 0.24), rgba(25, 14, 8, 0.7) 70%);
  box-shadow:
    0 0 0 var(--gs-stroke) rgba(8, 6, 3, 0.86),
    0 calc(var(--gs-u-h) * 1) calc(var(--gs-u-h) * 1.8) rgba(0, 0, 0, 0.82),
    0 0 calc(var(--gs-u-h) * 2) rgba(0, 0, 0, 0.72),
    0 0 calc(var(--gs-u-h) * 1.2) rgba(255, 196, 112, 0.28);
  z-index: -1;
  pointer-events: none;
}

.onscreen-location__icon,
.campaign-hotspot__icon {
  --campaign-poi-icon-size: calc(var(--gs-u-h) * 6);
  width: var(--campaign-poi-icon-size);
  height: var(--campaign-poi-icon-size);
  object-fit: contain;
  filter:
    drop-shadow(0 0 var(--gs-hairline) rgba(8, 5, 2, 0.95))
    drop-shadow(0 0 var(--gs-stroke) rgba(8, 5, 2, 0.9))
    drop-shadow(0 calc(var(--gs-u-h) * 0.6) calc(var(--gs-u-h) * 1.2) rgba(0, 0, 0, 0.88))
    drop-shadow(0 0 calc(var(--gs-u-h) * 1.4) rgba(0, 0, 0, 0.8))
    drop-shadow(0 0 calc(var(--gs-u-h) * 1) rgba(255, 198, 116, 0.28));
  transition:
    transform 0.14s ease,
    filter 0.16s ease;
}

.onscreen-location__label,
.campaign-hotspot__label {
  display: inline-block;
  padding:
    calc(var(--gs-u-h) * 0.24)
    calc(var(--gs-u-w) * 0.78)
    calc(var(--gs-u-h) * 0.27);
  border-radius: 999px;
  background: rgba(18, 12, 8, 0.66);
  border: var(--gs-hairline) solid rgba(245, 214, 164, 0.4);
  color: #f8ead0;
  font-size: var(--gs-text-2xs);
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.15;
  text-shadow: 0 var(--gs-hairline) var(--gs-hairline) rgba(0, 0, 0, 0.7);
  white-space: nowrap;
}

.onscreen-location__subtext {
  display: block;
  margin-top: calc(var(--gs-u-h) * 0.13);
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #d6b37e;
  opacity: 0.94;
}

.onscreen-location--poi:hover .onscreen-location__icon,
.campaign-hotspot--city:hover .onscreen-location__icon,
.campaign-hotspot--zone:hover .campaign-hotspot__icon {
  transform: translateY(calc(var(--gs-u-h) * -0.11)) scale(1.04);
  filter:
    drop-shadow(0 0 var(--gs-hairline) rgba(8, 5, 2, 0.98))
    drop-shadow(0 0 calc(var(--gs-u-h) * 0.3) rgba(8, 5, 2, 0.94))
    drop-shadow(0 calc(var(--gs-u-h) * 1) calc(var(--gs-u-h) * 1.6) rgba(0, 0, 0, 0.92))
    drop-shadow(0 0 calc(var(--gs-u-h) * 2) rgba(0, 0, 0, 0.84))
    drop-shadow(0 0 calc(var(--gs-u-h) * 1.6) rgba(255, 190, 102, 0.38));
}

.onscreen-location--poi:hover .onscreen-location__icon-frame::before,
.campaign-hotspot--city:hover .onscreen-location__icon-frame::before,
.campaign-hotspot--zone:hover .campaign-hotspot__icon-frame::before {
  border-color: rgba(255, 241, 212, 0.98);
  box-shadow:
    0 0 0 var(--gs-stroke) rgba(8, 6, 3, 0.9),
    0 calc(var(--gs-u-h) * 1.2) calc(var(--gs-u-h) * 2) rgba(0, 0, 0, 0.88),
    0 0 calc(var(--gs-u-h) * 2.4) rgba(0, 0, 0, 0.8),
    0 0 calc(var(--gs-u-h) * 1.8) rgba(255, 205, 126, 0.34);
}

.campaign-stage-form {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  margin: 0;
}

.campaign-stage-btn {
  --campaign-stage-btn-size: calc(var(--gs-u-h) * 9);
  width: var(--campaign-stage-btn-size);
  height: var(--campaign-stage-btn-size);
  border-radius: 999px;
  border: calc(var(--gs-stroke) * 1.25) solid rgba(255, 215, 150, 0.8);
  border-color: rgba(133, 218, 158, 0.9);
  box-shadow: var(--gs-stroke) var(--gs-stroke) var(--gs-stroke) black;
  background: rgba(18, 11, 31, 0.88);
  color: #d2ffe0;
  font-weight: 800;
  font-size: calc(var(--gs-u-h) * 6);
  cursor: pointer;
  transition: all 0.2s ease;
}

.campaign-stage-btn--newest {
  box-shadow: 0 0 calc(var(--gs-u-h) * 1.6) rgba(255, 210, 120, 0.95);
  color: #ffe3bc;
  border-color: rgba(255, 232, 170, 0.98);
}

.campaign-stage-btn:hover {
  transform: scale(1.04);
}

.campaign-progress-toast {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translate(-50%, calc(var(--gs-u-h) * -1.2));
  opacity: 0;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease;
  z-index: 10050;
  padding: calc(var(--gs-u-h) * 0.55) calc(var(--gs-u-w) * 1.1);
  border-radius: 999px;
  border: var(--gs-hairline) solid rgba(255, 214, 165, 0.55);
  background: rgba(14, 10, 22, 0.92);
  color: #ffe9c9;
  font-weight: 700;
  font-size: var(--gs-text-xs);
  pointer-events: none;
  box-shadow: 0 calc(var(--gs-u-h) * 0.4) calc(var(--gs-u-h) * 2.4) rgba(0, 0, 0, 0.45);
}

.campaign-progress-toast--visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .campaign-progress-toast {
    transition: none;
    opacity: 1;
    transform: translate(-50%, 0);
  }
}
