html,
body {
  margin: 0px;
  padding: 0px;
  height: 100%;
  border: none;
  font-family: sans-serif;
}
view {
  padding: 0;
}
.external {
  height: 20px;
  width: auto;
}
.utility-nav {
  display: flex;
  flex-direction: row;
  /* position: absolute; */
  /* top: 10px; */
  /* right: 20px; */
  /* width: 70%; */
  /* background: #aa9da3; */
  align-items: center;
  position: sticky;
  bottom: 0px;
  padding: 1.5rem 0 0 0;

  /* font-size: 14px; */
}
.info-icon {
  display: flex;
  height: auto;
  width: 100%;
  /* width: 75%; */
  justify-content: center;
  border: none;
  /* background: white; */
  cursor: pointer;
  transition: color 0.2s;
}

.info-icon a {
  /* background: rgba(255, 255, 255, 0.8); */
  color: #616161;
  letter-spacing: 1.2px;
  font-size: 0.8rem;
  font-weight: 200;
  text-align: center;
  justify-content: center;
  /* margin-left: 0; */
  min-width: fit-content;
  /* line-height: 1rem; */
  text-decoration: none;
}
.background {
  height: 75px;
  width: auto;
}
.wrapper {
  width: 100vw;
  height: 100vh;
  display: flex;
}

#mapContainer {
  width: 50%;
  height: 100vh;
}
.headerGroup {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1.5rem 0;
}
.headerLogo {
  height: 40px;
}
.title {
  font-weight: bold;
  font-size: 1.5rem;
  /* margin-bottom: 1rem; */
  color: #0089a4;
  padding-left: 0.5rem;
}
.sidebar {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1em 2.5em 0 2.5em;
  border-radius: 10px;
  min-height: 0;
  box-sizing: border-box;
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}
.footer-content {
  display: flex;
  flex: 0;
}
.accordion-item {
  text-align: center;
  width: 100%;
  padding-bottom: 1.1rem;
}
.accordion-item-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1em;
  min-height: 3.5rem;
  cursor: pointer;
}
.stationWrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.accordion-item-header.active .stationWrapper {
  flex-direction: column;
  align-items: stretch;
}

.stationImageThumbnail {
  width: 100px;
  height: auto;
  margin: 0;
}
.item-title {
  color: #616161;
  font-size: 1.1rem;
  line-height: 2.5rem;
  font-weight: 700;
  text-align: left;
  margin-left: 0;
  font-style: italic;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 2px;
}

.fieldNotes-text {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.1rem;
  letter-spacing: 0.5px;
}
.accordion-item-title {
  /* color: #777777; */
  color: #616161;
  font-size: 1.1rem;
  font-weight: 400;
  text-align: left;
  margin-left: 0;
  min-width: fit-content;
}

.accordion-item-body {
  max-height: 0;
  overflow-y: hidden;
  transition: max-height 0.4s ease;
  width: 100%;
}
.accordion-item-header.active .accordion-item-title {
  color: #0089a4;
  /* font-weight: bold; */
  /* margin-bottom: 0.5rem; spacing before image */
}
.accordion-item-header.active .stationImageThumbnail {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 0.25rem;
}

.accordion-button.active {
  grid-template-rows: 1fr;
}
.stationImageContainer {
  position: relative;
  width: 100%;
}

/* Info button overlay */
.info-button {
  position: absolute;
  top: 8px;
  left: 8px;
  background: white;
  color: #777777;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 16px;
  font-style: italic;
  /* line-height: 28px; */
  /* text-align: center; */
  /* align-items: center; */
  /* padding: 10px 10px; */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);

  transition: background 0.2s ease;
}

.info-button:hover {
  background: #0089a4;
  color: white;
}
.info-button {
  display: none;
}
/* When header is active → show */
.accordion-item-header.active .info-button {
  display: block;
}
/* Attribution box */
.image-attribution {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  font-size: 0.85rem;
  padding: 0.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.image-attribution.hidden {
  display: none;
}

.accordion-item-body-content {
  box-sizing: border-box;
  /* width: 95%; */
  /* padding-top: 1rem; */
  /* margin-top: 1rem; */
  margin-left: 1rem;
  padding: 0 1rem;
  margin-right: 0.5rem;
  color: #777777;
  border-left: 0.5px solid #777777;
  /* background-color: #f2f2f2; */
  /* border-radius: 10px; */
  text-align: left;
  font-size: 0.9rem;
  font-weight: 400;
  /* height: auto; */
  /* overflow: hidden; */
}
.icon {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  margin-right: 1rem;
  border: 2px solid;
  width: 34px;
  height: 34px;
  color: #777777;
  transition: color 0.25s;
  position: relative;
  border-radius: 100%;
}
.icon::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  background-color: #777777;
  border-radius: 20px;
  /* pointer-events: all; */
  transition: all 0.3s ease-in-out;
}
.icon::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 14px;
  background-color: #777777;
  border-radius: 20px;
  transition: all 0.3s ease-in-out;
}

.accordion-item-header.active > .icon::before {
  transform: rotate(180deg);
}
.accordion-item-header.active > .icon::after {
  transform: rotate(90deg);
}
hr {
  width: 90%;
  height: 0.5px;
  background-color: #777777;
}

.stationSection {
  margin: 5px 0px;
  line-height: 1rem;
}

.section-title {
  color: #777777;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0 0 0 0.5rem;
  margin-block-start: 0.5em;
  margin-block-end: 0.5em;
}

.plankton-section,
.plastic-section,
.microbe-section {
  background-color: #e2e2e2;
  border-radius: 8px;
  padding: 3px;
}
.plankton-photos-container,
.microbes-photos-container,
.plastic-photos-container {
  display: flex;
  align-items: center;
  position: relative;
  margin: 10px 0px;
}

.plankton-photos-div,
.microbes-photos-div,
.plastic-photos-div {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  align-items: center;
  justify-content: space-evenly;
  scroll-behavior: smooth;
  gap: 10px;
  padding: 10px 0;
  flex: 1;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.plankton-photos-div::-webkit-scrollbar,
.microbes-photos-div::-webkit-scrollbar,
.plastic-photos-div::-webkit-scrollbar {
  display: none;
}

.slide-photo-item {
  flex: 0 0 auto;
  text-align: center;
  min-width: 100px;
}

.slide-image {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid #777777;
  transition: transform 0.3s ease;
}

.slide-image:hover {
  transform: scale(1.05);
}

.photo-caption {
  margin-top: 5px;
  font-size: 0.9em;
  font-weight: 500;
  color: #555;
}

.photo-nav-btn {
  background-color: #0089a4;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 18px;
  cursor: pointer;
  margin: 0 3px;
  transition: background-color 0.3s ease;
}

.photo-nav-btn:hover {
  background-color: #1a4480;
}

.photo-nav-btn:active {
  transform: scale(0.95);
}
/* if fewer than 2 plankton photos, next/prev buttons hidden */
.plankton-photos-container:has(
    .plankton-photos-div .slide-photo-item:nth-child(-n + 2):last-child
  )
  .photo-nav-btn {
  display: none;
  align-items: center;
}
/* if fewer than 2 plastics photos, next/prev buttons hidden */
.plastic-photos-container:has(
    .plastic-photos-div .slide-photo-item:nth-child(-n + 2):last-child
  )
  .photo-nav-btn {
  display: none;
  align-items: center;
}

.plankton-facts {
  width: 100%;
  padding: 0.5rem 1rem;
  box-sizing: border-box;
  /* background-color: #0089a4; */
  border-radius: 6px;
  margin-top: 0.5rem;
  display: block;
}

.microbe-summary,
.plastic-types {
  background-color: white;
  padding: 10px;
  border-radius: 6px;
  margin-top: 10px;
  font-style: italic;
  color: #666;
}
.italic {
  font-style: italic;
  font-size: small;
  font-weight: normal;
  color: #8f8f8f;
  margin-left: 10px;
}
.fact-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.fact-modal.hidden {
  display: none;
}

.fact-modal-content {
  background: #ffffff;
  border-radius: 10px;
  max-width: 800px;
  width: 90%;
  max-height: 80%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* clip overflowing content */
}

.close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
}

.modal-body {
  display: flex;
  height: 100%;
  width: 100%;
}

.fact-photo {
  width: 50%;
  height: 100%; /* full height of modal */
  object-fit: cover; /* maintain aspect ratio and cover space */
  border-right: 1px solid #ddd;
}

.fact-text {
  width: 100%;
  padding: 1rem;
  overflow-y: auto; /* scroll if text is too long */
}

.fact-species {
  font-weight: bold;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #0089a4;
}

.fact-description {
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
}
.report-title {
  font-size: 1rem;
  font-weight: 600;
  color: #777777;
  padding: 0 0;
  text-align: left;
  /* border-bottom: 1px solid #ccc; */
}
.microbe-link {
  color: #0089a4;
  text-decoration: none;
  cursor: pointer;
}

.microbe-link:hover {
  text-decoration: underline;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.custom-legend {
  padding: 8px 12px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
}

/* each layer row */
.legend-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.legend-row:last-child {
  margin-bottom: 0;
}

.legend-label {
  font-weight: 500;
}

/* line adjustments */
.legend-row[data-geometry="polyline"] img,
.legend-row[data-geometry="polyline"] svg {
  transform: scaleY(0.5);
  transform-origin: center;
  height: auto;
}

/* polygon adjustments */
.legend-row[data-geometry="polygon"] img,
.legend-row[data-geometry="polygon"] svg {
  transform: scale(0.8);
  transform-origin: center;
  height: auto;
}
.sampleIcon {
  height: 50px;
  width: auto;
  padding-left: 0.5rem;
  padding-right: 5px;
}
.oceanPlasticsSamples,
.portPlasticsSamples {
  display: flex;
}
.portPlasticsSamples {
  padding-top: 1rem;
}
.oceanPlasticsSamples div,
.portPlasticsSamples div {
  margin: 0 0.3rem 0 0.5rem;
}
.footer {
  display: flex;
  display: inline-block;
  position: sticky;
  bottom: 0px;
  height: 18px;
  /* max-height: 22px; */
  width: 100%;
  z-index: 1500;
  /* padding-bottom: 4px; */
  /* margin-top: -2px; */
  /* background: #ddd; */
  /* -webkit-box-shadow: inset 1px 1px rgba(68, 68, 68, 0.2); */
  /* -moz-box-shadow: inset 1px 1px rgba(68, 68, 68, 0.2); */
  /* box-shadow: inset 1px 1px rgba(68, 68, 68, 0.2); */
  text-align: center;
  overflow: hidden;
}
.footerText {
  margin-right: 20px;
  color: #666;
  font-size: 0.7rem;
  padding-bottom: 4px;
}
@media only screen and (max-width: 850px) {
  .icon {
    border: 2px solid;
    width: 24px;
    height: 24px;
  }
  .icon::before {
    width: 10px;
    height: 2px;
  }
  .icon::after {
    width: 2px;
    height: 10px;
  }
}
