/* Полноэкранный layout (main.tpl: .world-map-main) */
.world-map-main {
  padding: 0;
  margin: 0;
  max-width: none;
  width: 100%;
  height: calc(100vh - 56px);
  min-height: 360px;
}

.world-map-page {
  height: 100%;
  margin: 0;
  border: none;
  background: transparent;
}

#world-map-root {
  height: 100%;
}

.world-map-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: #1a1208;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.55);
}

.world-map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.world-map-canvas.grabbing {
  cursor: grabbing;
}

.world-map-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.world-map-toolbar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  pointer-events: auto;
}

.world-map-btn {
  border: 1px solid #c9a227;
  background: linear-gradient(to bottom, rgba(45, 32, 12, 0.92), rgba(26, 18, 8, 0.95));
  color: #f5e6c8;
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  line-height: 1.2;
}

.world-map-btn:hover,
.world-map-btn:focus {
  background: linear-gradient(to bottom, #5c4518, #3d2d10);
  color: #fff8e7;
  outline: none;
}

.world-map-status {
  border: 1px solid rgba(201, 162, 39, 0.55);
  background: rgba(10, 8, 5, 0.82);
  color: #e8d5a8;
  font-size: 0.8rem;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  pointer-events: auto;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.world-map-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.4rem 0.85rem;
  color: #e8dcc8;
  font-size: 0.82rem;
  opacity: 0.92;
  background: rgba(10, 8, 5, 0.72);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
  max-width: calc(100% - 24px);
  text-align: center;
}

.world-map-point-popup {
  position: absolute;
  z-index: 5;
  width: min(320px, calc(100% - 24px));
  max-height: min(300px, calc(100% - 24px));
  overflow: auto;
  padding: 0.75rem 2rem 0.85rem 1rem;
  background: linear-gradient(160deg, #2a1f0e 0%, #1a1208 100%);
  border: 2px solid #c9a227;
  border-radius: 6px;
  color: #f5e6c8;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: auto;
}

.world-map-point-popup[hidden] {
  display: none !important;
}

.world-map-point-popup__close {
  position: absolute;
  top: 4px;
  right: 6px;
  border: none;
  background: transparent;
  color: #f5e6c8;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.15rem 0.35rem;
  cursor: pointer;
  opacity: 0.85;
}

.world-map-point-popup__close:hover,
.world-map-point-popup__close:focus {
  color: #fff8e7;
  opacity: 1;
  outline: none;
}

.world-map-point-popup__title {
  margin: 0 0 0.5rem;
  color: #ffd966;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  padding-right: 0.5rem;
}

.world-map-point-popup__body {
  margin: 0;
  line-height: 1.55;
  font-size: 0.92rem;
}

.world-map-point-popup__coords {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: #c9b88a;
}

.world-map-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 8, 5, 0.75);
  color: #ffd966;
  font-size: 1rem;
  z-index: 3;
  pointer-events: none;
}

.world-map-loading.is-hidden {
  display: none;
}

@media (max-width: 767px) {
  .world-map-main {
    height: calc(100vh - 52px);
    min-height: 300px;
  }

  .world-map-toolbar {
    top: 8px;
    left: 8px;
    right: 8px;
  }

  .world-map-status {
    font-size: 0.72rem;
  }

  .world-map-hint {
    font-size: 0.75rem;
    bottom: 8px;
  }

  .world-map-point-popup {
    width: min(280px, calc(100% - 16px));
    max-height: min(240px, calc(100% - 16px));
  }
}
