/* ===== Visor de mapa interactivo - Alkon Online ===== */

.mapa-body {
  overflow: hidden;
}

.mapa-main {
  position: fixed;
  inset: 0;
  top: 0;
}

.mapa-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0a0d12;
}

/* El fondo del propio Leaflet */
.mapa-canvas.leaflet-container {
  background: #0a0d12;
  font-family: inherit;
}

/* ===== Panel de controles ===== */
.mapa-controls {
  position: absolute;
  top: 90px;
  left: 16px;
  z-index: 1000;
  width: 240px;
  padding: 18px 18px 14px;
  border-radius: 12px;
  background: rgba(18, 22, 30, 0.86);
  border: 1px solid rgba(212, 175, 110, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  color: #ece3d0;
}

.mapa-title {
  margin: 0 0 14px;
  font-size: 1.6rem;
  line-height: 1.1;
  color: #e7c987;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.mapa-control-group {
  margin-bottom: 14px;
}

.mapa-control-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b8a87f;
}

.mapa-controls .btn-group {
  width: 100%;
}

.mapa-controls .btn-group .btn {
  flex: 1;
}

.mapa-controls .btn-outline-light.active {
  background: #e7c987;
  border-color: #e7c987;
  color: #1a1410;
  font-weight: 700;
}

.mapa-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}

.mapa-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #e7c987;
  cursor: pointer;
}

.mapa-hint {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(212, 175, 110, 0.2);
  font-size: 0.74rem;
  line-height: 1.5;
  color: #9c9079;
}

.mapa-hint i {
  color: #c9b483;
}

/* ===== Info de celda ===== */
.mapa-cellinfo {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(18, 22, 30, 0.9);
  border: 1px solid rgba(212, 175, 110, 0.35);
  color: #ece3d0;
  font-size: 0.85rem;
  white-space: nowrap;
  pointer-events: none;
}

.mapa-cellinfo strong {
  color: #e7c987;
}

/* ===== Numeración sobre las celdas ===== */
.mapa-number {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 4px #000, 0 0 8px #000, 0 1px 2px #000;
  pointer-events: none;
}

/* ===== Pantalla de carga ===== */
.mapa-loading {
  position: absolute;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0d12;
  transition: opacity 0.4s ease;
}

.mapa-loading.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.mapa-loading-inner {
  text-align: center;
  color: #c9b483;
}

.mapa-loading-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  animation: mapaPulse 1.4s ease-in-out infinite;
}

@keyframes mapaPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* ===== Responsive ===== */
@media (max-width: 575px) {
  .mapa-controls {
    top: auto;
    bottom: 12px;
    left: 12px;
    right: 12px;
    width: auto;
  }
  .mapa-cellinfo {
    bottom: auto;
    top: 84px;
  }
}
