body, html {
    margin: 0; padding: 0; height: 100%;
    font-family: Arial, sans-serif;
    display: flex; flex-direction: column;
}
#header {
  background: linear-gradient(90deg, #d6afaf, #cae4c0);
  color: white;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12rem 0 1rem; /* top right bottom left */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
#title {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
#vmlogo {
    height: 60px;
    width: 180px;
    margin-right: 1rem;
    background-image: url("vmlogo_.png");
    background-size: contain;   /* make the whole logo fit inside */
    background-repeat: no-repeat;
    background-position: center;
}
#wbilogo {
    height: 40px;
    width: 70px;
    margin-right: 1rem;
    background-image: url("wbi.png");
    background-size: contain;   /* make the whole logo fit inside */
    background-repeat: no-repeat;
    background-position: center;
}
#date_switcher {
    margin-right: 1rem;
}

#content {
    flex: 1; display: flex; height: calc(100% - 60px);
}
#sidebar {
  width: clamp(130px, 18%, 200px);
  background: linear-gradient(180deg, #d6afaf, #cae4c0);
  padding: 1rem;
  box-sizing: border-box;
  display: flex; flex-direction: column; gap: 0.75rem;
  border-right: 1px solid #ddd;
  box-shadow: inset -1px 0 3px rgba(0,0,0,0.05);
}
#sidebar button {
  padding: 0.6rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  background: #f8e6e6;
  color: #000000;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
#sidebar button:hover {
  background: #d88e8e;
  transform: translateY(-1px);
}
#legend {
    position: absolute;
    bottom: 2%;
    right: 2%;
    background: rgba(255,255,255,0.9);
    padding: 4px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    font-size: 10px;
    z-index: 1000;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: auto;
    max-height: 150vh;
    width: max-content;      /* fit content width */
    min-width: 50px;
    max-width: 400px;        /* cap width */
    color: black;
}
#legend .color {
    flex: 1 1 auto;           /* allow flexible height per step */
    text-align: right;
    padding-right: 2px;
}
#map {
    flex: 1;
    height: 100%;
}

.dropdown {
    position: relative;
    display: inline-block;
    margin-right: 1rem;
}
.dropbtn {
  background: none;
  border: 1px solid #ccc;
  color: #f2f2f2;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 14px;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.dropbtn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropbtn {
  background: #d7f1e1;
  color: #333;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.dropbtn:hover {
  background: #cbe5ba;
  box-shadow: 0 0 3px #6666;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #f7f7f7;
  border: 1px solid #ccc;
  border-radius: 3px;
  min-width: 160px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 10;
}

.dropdown-content button {
  background: transparent;
  color: #333;
  border: none;
  padding: 8px 12px;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background 0.15s;
}

.dropdown-content button:hover {
  background: #e1e8c4;
}

.dropdown:hover .dropdown-content {
  display: block;
}
.dropdown:hover .dropbtn {
    background: #cbe5ba;
}

/* Highlighting styles */
.dropbtn.active, .dropdown:hover .dropbtn.active {
    background-color: rgb(141, 184, 113);
    color: white;
}

.dropdown:hover .dropdown-content button.selected {
    background-color: rgb(141, 184, 113);
    font-weight: bold;
}
#date-selector {
    display: flex;
    align-items: center;
    
    gap: 0.5rem;
    cursor: pointer;
}
#date-input {
    padding: 0.2rem;
    cursor: pointer;
    font: bold;
}
/* Calendar width */
.flatpickr-calendar {
    width: auto
}
.map-toggle.ol-control {
  position: absolute;
  top: 0.5rem;
  left: 2.5rem;
  z-index: 2000;
  pointer-events: auto;
}
.map-toggle-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  cursor: pointer;
  padding: 0;
  transition: transform .12s ease, background .12s ease;
  color: #222; 
}
