/* Common map layout styles */
.map-layout {
  position: fixed;
  left: 60px;
  top: 10vh;
  bottom: 10vh;
  right: 0;
  width: calc(100% - 60px);
  height: 80vh;
  display: grid;
  gap: 10px;
  padding: 3px 20px;
  z-index: 1;
}

.map-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
}

/* Yellow frame for the active map */
.map-wrapper.active-map {
  border-color: #FFD700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
  z-index: 10;
}

.map-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Layout 1: Single map - hide slots 2,3,4 */
.layout-1 {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

/*.layout-1 .map-slot-2,
.layout-1 .map-slot-3,
.layout-1 .map-slot-4 {
  display: none !important;
}*/

.layout-1 .map-slot-1 {
  display: block;
  grid-column: 1;
  grid-row: 1;
}

/* Layout 2: Two maps side by side - hide slots 3,4 */
.layout-2 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

/*.layout-2 .map-slot-3,
.layout-2 .map-slot-4 {
  display: none !important;
}*/

.layout-2 .map-slot-1,
.layout-2 .map-slot-2 {
  display: block;
}

/* Layout 4: Four maps in a grid - show all */
.layout-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.layout-4 .map-slot-1,
.layout-4 .map-slot-2,
.layout-4 .map-slot-3,
.layout-4 .map-slot-4 {
  display: block;
}


.layout-1 .map-slot-2,
.layout-1 .map-slot-3,
.layout-1 .map-slot-4,
.layout-2 .map-slot-3,
.layout-2 .map-slot-4 {
  visibility: hidden;
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

/* Ensure visible slots are interactive */
.layout-1 .map-slot-1,
.layout-2 .map-slot-1,
.layout-2 .map-slot-2,
.layout-4 [class*="map-slot-"] {
  visibility: visible;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}



/* Responsive design */
@media (max-width: 768px) {
  .map-layout {
    left: 0;
    width: 100%;
    top: 5vh;
    bottom: 5vh;
    height: 90vh;
  }

  .layout-2,
  .layout-4 {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
}
