* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  height: 100vh;
  font-family: sans-serif;
}

/* LEFT SIDEBAR */
#leftbar {
  width: 300px;
  background: #02274d;
  border-right: 1px solid #fff;
  flex-shrink: 0;
  padding: 20px;
  color: #aaa;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  overflow: hidden;        /* ← contain content */
}

#leftbar h2 {
  color: #FFCB05;
  font-size: 24px;
  margin-bottom: 20px;
  padding: 15px 2px 0px 2px;
}

#leftbar p {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 12px;
  color: white;
  margin-bottom: 6px;
  text-align: justify;
 
}
.text-umich-title {
  text-align: center;
  font-family: 'Atkinson Hyperlegible', sans-serif;
}

/* Search */
#resource-search {
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 12px;
  color: #3e4255;
  background: #fff;
  border: none;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  outline: none;
  box-sizing: border-box;
}

#resource-search::placeholder { color: #aaa; }
#resource-search:focus { box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); }

/* Filter */
#filter-section {
  margin-top: 10px;
  margin-bottom: 16px;     /* ← add space below filter */
  overflow-y: auto;
  flex-shrink: 1;
  min-height: 0;
}

.filter-list-label {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #3e4255;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.4;
  background: #fff;
  border-radius: 5px;
  padding: 8px 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.filter-list-label:hover { color: #00274C; }

.filter-list-label .chevron {
  display: inline-block;
  font-size: 11px;
  transition: transform 0.2s ease;
}

.filter-list-label.open .chevron {
  transform: rotate(180deg);
}

.filter-list {
  display: none;
  background: #fff;
  border-radius: 5px;
  padding: 8px 10px;
  margin-top: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.filter-list.open {
  display: block;
}

.clear-filter-link {
  display: inline-block;
  margin-top: 8px;
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 12px;
  color: #FFCB05;
  text-decoration: underline;
  cursor: pointer;
}

.clear-filter-link:hover { color: #fff; }

.filter-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}

.filter-item:last-child { margin-bottom: 0; }

.filter-item input[type="checkbox"] {
  margin-top: 2px;
  accent-color: #00274C;
  flex-shrink: 0;
  cursor: pointer;
}

.filter-item label {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 12px;
  color: #3e4255;
  cursor: pointer;
  line-height: 1.4;
}

.filter-item:hover label { color: #00274C; }

/*  Extent */
#extent-buttons {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#extent-buttons button {
  width: 100%;
  background: #fff;
  color: #3e4255;
  border: 1px solid #3e4255;
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 5px;
  cursor: pointer;
  transition: all .15s;
}

#extent-buttons button:hover { background: #3e4255; color: #fff; }

#extent-buttons button.active {
  background: #00274C;
  border-color: #FFCB05;
  color: #FFCB05;
}

/* ══════════════════════════════
   MAP
══════════════════════════════ */
#map {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.leaflet-interactive:focus { outline: none; }

/* ── Tooltip ── */
.map-tooltip {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}

.map-tooltip::before { display: none; }

/* ══════════════════════════════
   RIGHT SIDEBAR
══════════════════════════════ */
#rightbar {
  position: absolute;
  top: 0;
  right: 0;
  width: 420px;
  height: 100%;
  background: white;
  border-left: 1px solid #e0e0e0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
}

#rightbar.open { transform: translateX(0); }

.rightbar-header {
  padding: 6px 8px;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.rightbar-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 24px;    /* ← +2pt */
  color: #aaa;
  line-height: 1;
  padding: 2px 4px;
}

.rightbar-close:hover { color: #333; }

.rightbar-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 8px 12px;
  font-family: 'Atkinson Hyperlegible', sans-serif;
}

#rightbar-button {
  position: absolute;
  right: 20px;
  bottom: 40px;
  background: #FFCB05;
  color: #00274C;
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 24px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  z-index: 1001;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .15s;
}

#rightbar-button:hover { background: #e6b800; }


/* hide tab when sidebar is open */
#rightbar.open ~ #rightbar-button { display: none; }

/* ── Info card (single resource) ── */
.info-card-title {
  font-weight: 700;
  font-size: 17px;
  color: #00274C;
  margin-bottom: 8px;
}

.info-row {
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.5;
}

.info-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaa;
  margin-bottom: 1px;
}

.info-row a {
  color: #00274C;
  text-decoration: none;
}

.info-row a:hover { text-decoration: underline; }

.info-desc {
  margin-top: 8px;
  font-size: 14px;
  color: #555;
  line-height: 1.6;
  padding-top: 8px;
}

.toggle-card-body .info-row:last-of-type {
  margin-bottom: 0;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.filter-tag {
  font-size: 12px;
  color: #00274C;
  border: 1px solid #00274C;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ── Toggle cards (multiple resources) ── */
.toggle-card {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  margin-bottom: 8px;
  overflow: hidden;
}

.toggle-card-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: #00274C;
  background: #f9f9f9;
}


.toggle-card-header:hover { background: #f0f0f0; }

.toggle-card-header.active {
  background: #FFCB05;
  color: #00274C;
}

.toggle-card-header.active:hover { background: #FFCB05; }

.card-type-tag {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 10px;
  color: #00274C;
  background: #fff;
  border: 1px solid #00274C;
  border-radius: 20px;
  padding: 1px 7px;
  white-space: nowrap;
  display: none;
}

.toggle-card-header.active .card-type-tag {
  display: inline-block;
}

.toggle-card-body {
  padding: 10px 12px;
  border-top: 1px solid #e0e0e0;
}

.resource-list-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 8px;
  color: #aaa;
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.resource-list-divider::before,
.resource-list-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}