body {
  padding: 0px;
  margin: 0px;
  font-family: "Helvetica", sans-serif;
  overflow: hidden;
}

#map {
  height: 200px;
  width: 100dvw;
  position: absolute;
  border-bottom: 3px solid orange;
  top: 0;
  left: 0;
}

#narration {
  position: absolute;
  top: 203px;
  bottom: 0;
  width: 100dvw;
  z-index: 80;

  color: black;
  background-color: #FDFBF7; /* Background Color */
}

#contents {
  padding: 0;
  width: 100%;
  margin-top: 0; /*Adjust if Title header needs more space */
  height: 100%; /* Adjust to fit max Description length, one setting for all; alternative is 100% */
  overflow-y: scroll;
  overflow-x: hidden;
  outline: none;
}

#space-at-the-bottom {
  height: 200px;
  margin: 0;
  text-align: center;
  padding-top: 150px;
  height: 150px;
  padding-top: 150px;
}

#title {
  left: 0;
  width: 100%;
  z-index: 100;
  margin: 0;
  padding: 25px 0;
  font-weight: bold;
  text-align: center;
  
  color: #333;
  background-color: #BAD7F2; /* Title Color */
}

.chapter-container {
  margin: 0;
  padding: 20px 0 0 0;
  text-align: center;
}

.chapter-container.in-focus {
  background-color: rgba(0, 0, 0, 0.06);
}

.lightbox-display-wrapper {
  position: relative;        /* .float-btn location based on this wrapper */
  display: inline-flex; 
  justify-content: center;
  align-items: center;
  max-height: 100%;
  max-width: 90%;
}

.chapter-container img {
  height: auto;
  width: auto;
  max-height: 300px;         /* Fit into wrapper */
  max-width: 100%;           /* Fit into wrapper */
  display: block;
  object-fit: contain;       /* Keep aspect ratio */
}

.img-container iframe {
  width: 100%;
  height: 300px;
  max-height: 300px;
  border: none;
  object-fit: cover; 
}

.img-container .float-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  pointer-events: none;
  opacity: 0.8;

  /* overwrite color */
  background: rgba(0, 0, 0, 0.5);
  color: white;
}

.audio-container {
  margin: 0;
  margin-bottom: 5px;
  height: 60px;
  max-height: 60px;
  width: 100%;
}

.chapter-header {
  display: block;
  text-align: center;
  font-size: 1.2em;
  padding: 20px 5px;
  margin: 0;
}

.source {
  font-size: 9pt;
  font-style: italic;
  color: gray;
}

.description {
  text-align: left;
  font-size: 11pt;
  padding: 40px;
  white-space: pre-wrap;
}

a.source:visited {
  color: grey;
}

.leaflet-control-attribution {
  visibility: hidden;
}

.leaflet-marker-icon {
  opacity: 0.75;
}

.marker-active {
  background-position: -72px 0 !important;
}

/* Storymap title & subtitle */
h1 {
  margin: 0;
  font-size: 1.5em;
}

h2 {
  margin: 0;
  font-size: 1.1em;
  font-weight: normal;
}

#title-select {
  font-size: x-large;
  font-weight: inherit;
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 20px;

  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24px' viewBox='0 0 24 24' width='24px' fill='black'%3E%3Cpath d='M0 0h24v24H0V0z' fill='none'/%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

/* Map link button */
.map-link {
  align-items: center;
  vertical-align: middle;
  text-decoration: none;
  margin-right: 4px;
  transition: transform 0.2s, color 0.2s;
}

.map-link .material-icons {
  font-size: 20px;
  color: #ea4335;
}

.map-link:hover .material-icons {
  transform: scale(1.15);
}

/* Utility button */
.floating-controls {
  position: absolute;
  bottom: 25px;
  right: 15px;
  z-index: 9999;
  
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.float-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background-color: #ffffff;
  color: #333333;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

  display: flex;
  justify-content: center;
  align-items: center;

  cursor: pointer;
  outline: none;
  transition: all 0.25s ease;
}

.float-btn .material-icons {
  font-size: 22px;
}

.float-btn:hover {
  background-color: #333333;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
