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

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

#topbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: #002231;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  box-sizing: border-box;
  overflow: hidden;
}


#topbar-right {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-left: auto;
}

#topbar img {
  height: 65px;
  width: auto;
  display: block;
}

#topbar-logo-seapop {
  height: 65px;
  width: auto;
}

#topbar-logo-npolar {
  height: 65px;
  width: auto;
}

#topbar-logo-nina {
  height: 65px;
  width: auto;
}

#sidebar {
  position: absolute;
  top: 100px;       /* below topbar */
  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: 22px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 12px 0 8px 0;
  color: #555;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.sidebar-header h1 {
  margin: 0;
}

#infoBtn {
  width: 48px;
  height: 48px;
  border: none;
  /* border-radius: 6px; */
  background: #ffffff;
  /* box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#infoBtn img {
  width: 100%;
  height: 100%;
}

#infoBtn:hover {
  background: #f0f0f0;
}

/* Info panel navigation */
.map-info-panel {
  position: absolute;
  top: 120px;
  left: 360px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 280px;
  max-width: 360px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  font-size: 13px;
}

.map-info-panel.hidden {
  display: none;
}

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

.info-nav button {
  background: #eee;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
}

.info-nav button:hover {
  background: #ddd;
}

#infoContent {
  line-height: 1.4;
}

/* Slot tabs */
.slot-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 12px solid var(--active-slot-color, #eee);
  justify-content: center;
}

.slot-tab {
  width: 35px;         
  height: 35px;
  border: none;
  margin: 0 4px;
  background-color: transparent;   
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  cursor: pointer;
}

.slot-tab[data-slot="0"] {
  background-image: url("../images/slot_1.png");
}
.slot-tab[data-slot="1"] {
  background-image: url("../images/slot_2.png");
}
.slot-tab[data-slot="2"] {
  background-image: url("../images/slot_3.png");
}
.slot-tab[data-slot="3"] {
  background-image: url("../images/slot_4.png");
}
.slot-tab[data-slot="4"] {
  background-image: url("../images/slot_5.png");
}

.slot-tab.active {
  outline: 2px solid var(--active-slot-color, #ff8800);
  border-radius: 4px;
}
.map-layer-control {
  position: absolute;
  top: 120px;
  left: 360px;
  z-index: 900;
  background: rgba(255,255,255,0.95);
  padding: 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-size: 13px;
}
.map-layer-control h4 {
  margin: 0 0 6px 0;
  font-size: 13px;
}
.map-layer-control label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.layer-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: inline-block;
}

/* Map buttons (top-right) */
#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;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

#map-buttons button:active {
  background: #ddd;
}

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

/* Extra layer control panel */
.map-extra-layer-control {
  position: absolute;
  top: 0;
  right: 48px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  font-size: 13px;
}

.map-extra-layer-control.hidden {
  display: none;
}

.map-extra-layer-control h4 {
  margin: 0 0 8px 0;
}




/* Species filters section */
#filters {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
  color: #333;
}

.filter-group select {
  padding: 5px 8px;
  font-size: 14px;
}

#infoBox {
  margin-top: 20px;
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

#infoBox h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: bold;
}

.infobox {
  display: none;
}

.infobox.active {
  display: block;
}

.info-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  padding: 6px 4px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.03);
}

.info-row span:first-child {
  flex: 0 0 150px;
  font-weight: 600;
}

.info-row span:last-child {
  flex: 1;
  text-align: left;
  white-space: normal;
}

.maplibregl-popup-content {
  background: #f2f2f2;
  color: #222;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.maplibregl-popup-tip {
  border-top-color: #f2f2f2 !important;
  border-bottom-color: #f2f2f2 !important;
}

.maplibregl-popup-content strong {
  display: inline-block;
  min-width: 70px;
  color: #444;
}

.maplibregl-popup-content h3 {
  margin: 0 0 6px 0;
  font-size: 14px;
}

.maplibregl-popup-content a {
  color: #005a8c;
  text-decoration: underline;
}

.maplibregl-popup-content img {
  border-radius: 4px;
}

:root {
  /* Default layer colors */
  --colonies-color: #6b6b6b;
  --colonies-radius: 20;

  --colonies-pin-glow: 10;
  --colonies-pin-offset: 5;
  --colonies-pin-linewidth: 10;

  /* --kde-fill: #4400ff; */
  --kde-fill: #ffa600;
  --kde-opacity: 0.3;

  /* Optional future filter sets */
  --set1-colonies-color: #6b6b6b;
  --set1-kde-fill: #ffa600;

  --set2-colonies-color: #6b6b6b;
  --set2-kde-fill: #2196f3;

  --set3-colonies-color: #6b6b6b;
  --set3-kde-fill: #33a02c;

  --set4-colonies-color: #6b6b6b;
  --set4-kde-fill: #9b4d96;

  --set5-colonies-color: #6b6b6b;
  --set5-kde-fill: #f2d024;
}

