/* ===============================
   GLOBAL LAYOUT
================================= */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: sans-serif;
}

#map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* ===============================
   SIDEBAR
================================= */
#sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 330px;
  bottom: 0;
  background: #ffffff;
  z-index: 3;
  padding: 10px;
  box-shadow: 1px 0 5px rgba(0,0,0,0.2);
  overflow-y: auto;
}

#sidebar h1 {
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 20px 0 15px 0;
  color: #477fbe;
  border-bottom: 2px solid #d4d4d4;
  padding-bottom: 8px;
}

#sidebar h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 18px 0 10px 0;
}

#sidebar h3 {
  font-size: 16px;
  margin: 12px 0 8px 0;
}

#sidebar p {
  font-size: 14px;
  margin: 8px 0;
}

/* ===============================
   LEGEND
================================= */
.map-legend {
  position: absolute;
  top: 30px;
  left: 360px;
  z-index: 10;
  background: rgba(255,255,255,0.9);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.legend-item {
  display: flex;
  align-items: center;
  margin: 3px 0;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 6px;
  border: 1px solid #999;
}


/* ===============================
   MAP BUTTONS
================================= */
#map-buttons {
  position: absolute;
  top: 20px;
  right: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#map-buttons button {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#map-buttons button:hover {
  background: #eee;
}

#map-buttons img {
  width: 20px;
  height: 20px;
}

/* ===============================
   POPUP
================================= */
.ol-popup {
  position: absolute;
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #444;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  width: 400px;
  font-size: 14px;
  z-index: 10000;
}

.popup-title {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
}

.popup-table {
  width: 100%;
  border-collapse: collapse;
}

.popup-table-key {
  width: 40%;
  font-weight: 600;
  padding: 6px;
}

.popup-table-val {
  width: 60%;
  padding: 6px;
}

.popup-table tr:nth-child(even) {
  background: #cfe0f3;
}

.popup-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

/* ===============================
   TOOLTIP
================================= */
.ol-tooltip {
  position: relative;
  background: rgba(0,0,0,0.5);
  border-radius: 4px;
  color: white;
  padding: 4px 8px;
  font-size: 12px;
}

.ol-tooltip-static {
  background-color: #ffcc33 !important;
  color: black !important;
  border-radius: 4px;
  padding: 4px 8px;
}

/* ===============================
   MISC
================================= */
.no-select {
  user-select: none;
}


/* ===============================
   DATA TABLE PANEL
================================= */
#data-table-panel {
  position: absolute;
  left: 350px;
  right: 0;
  bottom: 0;
  height: 480px;
  background: #fff;
  z-index: 5;
  border-top: 2px solid #ccc;
  border-left: 2px solid #ccc;
  display: none;

  overflow-y: auto;
  overflow-x: hidden;
  
  
  padding-top: 15px;
  padding-right: 15px;
  padding-left: 15px;
  padding-bottom: 15px;
}

#data-table-panel.visible {
  display: block;
}
