/* ==========================================================================
   FRTZ - Masterplan Interactive CSS
   ========================================================================== */

.masterplan-section {
  position: relative;
  background: var(--navy-bg);
}

.masterplan-wrapper {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .masterplan-wrapper {
    grid-template-columns: 1fr;
  }
}

.masterplan-map-container {
  background: rgba(4, 12, 26, 0.9);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 50px rgba(0,0,0,0.8);
}

.masterplan-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--navy-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.zone-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.color-solar { background: #3DBB55; box-shadow: 0 0 8px rgba(61, 187, 85, 0.6); }
.color-semicon { background: #009CFF; box-shadow: 0 0 8px rgba(0, 156, 255, 0.6); }
.color-datacenter { background: #9333EA; box-shadow: 0 0 8px rgba(147, 51, 234, 0.6); }
.color-ev { background: #F59E0B; box-shadow: 0 0 8px rgba(245, 158, 11, 0.6); }
.color-executive { background: #EC4899; box-shadow: 0 0 8px rgba(236, 72, 153, 0.6); }
.color-logistics { background: #14B8A6; box-shadow: 0 0 8px rgba(20, 184, 166, 0.6); }

/* SVG Map Interactive Shapes */
.masterplan-svg {
  width: 100%;
  height: auto;
  min-height: 520px;
  display: block;
}

.plot-shape {
  cursor: pointer;
  transition: all 0.3s ease;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.5;
}

.plot-shape:hover {
  stroke: #FFFFFF;
  stroke-width: 3;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
}

.plot-shape.active {
  stroke: #FFFFFF;
  stroke-width: 3.5;
  filter: drop-shadow(0 0 16px var(--emerald-primary));
}

.plot-available { fill: rgba(61, 187, 85, 0.25); }
.plot-available:hover { fill: rgba(61, 187, 85, 0.55); }

.plot-reserved { fill: rgba(245, 158, 11, 0.25); }
.plot-reserved:hover { fill: rgba(245, 158, 11, 0.55); }

.plot-construction { fill: rgba(0, 156, 255, 0.25); }
.plot-construction:hover { fill: rgba(0, 156, 255, 0.55); }

.plot-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  fill: #FFFFFF;
  pointer-events: none;
  text-anchor: middle;
  dominant-baseline: middle;
}

/* Plot Details Sidebar Drawer */
.plot-details-panel {
  background: var(--navy-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  position: sticky;
  top: 100px;
}

.plot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--navy-border);
}

.plot-id-title {
  font-size: 1.6rem;
  color: #FFF;
}

.status-badge {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.status-available { background: rgba(61, 187, 85, 0.15); color: var(--emerald-primary); border: 1px solid rgba(61, 187, 85, 0.4); }
.status-reserved { background: rgba(245, 158, 11, 0.15); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.4); }
.status-construction { background: rgba(0, 156, 255, 0.15); color: var(--electric-blue); border: 1px solid rgba(0, 156, 255, 0.4); }

.plot-spec-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.plot-spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  padding-bottom: 0.6rem;
}

/* Masterplan Tooltip */
.map-tooltip {
  position: absolute;
  background: rgba(5, 14, 30, 0.95);
  border: 1px solid var(--emerald-primary);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.map-tooltip.active {
  opacity: 1;
}

.tooltip-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  color: #FFF;
}

.tooltip-sub {
  font-size: 0.78rem;
  color: var(--emerald-primary);
}
