body {
  margin: 0;
  padding: 0;
  font-family: "PT Sans", sans-serif;
  font-size: 14px;
  color: #333;
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

p {
  margin: 8px;
}

.mapboxgl-popup-content p {
  margin: 5px;
}

h2 {
  margin-top: 3px;
}

.mapboxgl-popup-content {
  max-width: 500px;
  min-width: 300px;
  /*Attempted fix for popups going out of bounds*/
  border: solid 2px #333333;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 400 !important;
  line-height: 14px;
  position: relative;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  padding: 5px 5px 5px 5px;
}

.mapboxgl-popup-content img {
  width: 100%;
}

#dropdown-filter {
  z-index: 2;
  cursor: pointer;
  background-color: #333333;
  border: none;
  color: #fff;
  text-transform: uppercase;
  width: 100%;
  height: 1.8rem;
}

#img-button-filter {
  display: none;
  top: 16px;
}

#img-button-filter {
  display: flex;
  flex-direction: row;
  float: left;
  top: 16px;
  right: 3.5rem;
  z-index: 2;
  align-self: flex-end;
}

#img-button-filter > img {
  cursor: pointer;
  margin-right: 0px;
}

#img-button-filter > img:last-of-type {
  margin-right: 0;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: none;
}

.input-container {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 3.5rem;
  align-items: center;
}

.input-container > .row {
  display: flex;
  flex-direction: row;
  width: 100%;
  margin-bottom: 0.3rem;
}

.input-container > .row:nth-child(2) {
  display: flex;
}

@media (min-width: 1000px) {
  .input-container > .row:nth-child(2) {
    display: none;
  }
}

#search-filter {
  background-color: #fff;
  border: solid 2px #a91f23;
  color: #000;
  font-weight: bold;
  line-height: 1.5rem;
  flex: 1 1 0px;
}

#search-filter::placeholder {
  color: #afafaf;
}

/*DROP DOWN*/

.dropdown {
  position: relative;
  display: inline-block;
  cursor: pointer;
  background-color: #a91f23;
  padding: 7px 5px 5px 5px;
  color: #fff;
  font-size: 17px;
  height: 21px;
  white-space: nowrap;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 32px;
  left: 5px;
  background-color: #5d0003;
  color: #fff;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  padding: 12px;
  font-size: 15px;
  line-height: 26px;
  z-index: 999;
}

.dropdown:hover .dropdown-content {
  display: block;
}

a {
  color: #fff;
  text-decoration: none;
}

.marker-popup {
  display: none;
}

@media (min-width: 641px) {
  .marker-popup {
    display: block;
  }
}

#mobile-marker-popup {
  display: none;
  background-color: #fff;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  flex-direction: column;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
  margin: 10px;
}

@media (min-width: 641px) {
  #mobile-marker-popup {
    display: none !important;
  }
}

#mobile-marker-popup .content {
  flex-grow: 1;
  overflow-y: auto;
  margin-top: 50px;
}

#mobile-marker-popup .controls {
  display: flex;
  flex-direction: row;
  flex-shrink: 1;
  align-items: center;
}

#mobile-marker-popup .controls button {
  margin: 1rem;
  width: 5rem;
  height: 2rem;
  cursor: pointer;
}

#subscription-popup {
  display: none;
  background-color: #fff;
  position: absolute;
  top: 0;
  right: 0;
  /* bottom: 0; */
  left: 0px;
  z-index: 900;
  flex-direction: column;
  padding: 1rem;
  width: 80%;
  /* min-width: 200px; */
  max-width: 500px;
}

#subscription-popup .controls {
  display: flex;
  width: 100%;
  flex-direction: row;
  flex-shrink: 1;
  align-items: center;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
}

#subscription-popup .controls button {
  width: 5rem;
  height: 2rem;
  cursor: pointer;
  margin-right: 1rem;
}

.subscribe-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 0.5rem;
}

.subscribe-container input {
  flex-grow: 1;
}

.subscribe-container input:valid {
  border-color: #0f0;
}

.subscribe-container input:invalid {
  border-color: #f00;
}

.popup-subscribe-button {
  width: 100%;
}

.get-involved {
  margin-right: auto;
}

#subscription-popup {
  box-shadow: 0px 0px 46px 6px;
  margin: 30px !important;
}

.subscribe-container input:invalid {
  height: 1.2rem;
}

#subscription-popup .controls button {
  width: 100%;
  cursor: pointer;
  margin-right: 0;
  background-color: #a91f23;
  border: 1px solid #fff;
  color: #fff;
  text-transform: uppercase;
  font-weight: bold;
}

.popupbutton {
  position: relative;
  display: inline-block;
  cursor: pointer;
  background-color: #a91f23;
  padding: 12px 12px 12px 12px;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  border: none;
  width: 100%;
  margin: 0px;
}

.mapbuttons button {
  position: relative;
  display: inline-block;
  cursor: pointer;
  background-color: #a91f23;
  padding: 8px 11px 6px 6px;
  color: #fff;
  font-size: 16px;
  text-transform: uppercase;
  border: none;
  width: 290px;
}

#mobile-marker-popup {
  display: none;
  background-color: #fff;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 900;
  flex-direction: column;
  font-size: 14px;
}

#mobile-marker-popup .controls button {
  margin: 0;
  height: 3rem;
  cursor: pointer;
  background-color: #212121;
  border: none;
  color: #ffffff;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 14px;
  position: absolute;
  top: 0px;
  width: 100%;
}

@media (max-width: 1000px) {
  .dropdown {
    font-size: 0.7rem;
    height: 1rem;
  }

  .dropdown-content {
    font-size: 0.7rem;
  }

  .dropdown-content {
    top: 28px;
    left: 0px;
    padding: 0px;
    font-size: 0.7rem;
    line-height: 0.9rem;
    z-index: 999;
  }

  .mapbuttons button {
    font-size: 0.7rem;
    width: 130px;
  }
}

h1 {
  font-size: 1.4em;
}

em {
  font-style: normal;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Layout */
.s-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.s-layout__content {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

/* Sidebar */
.ui-sidebar-trigger {
  display: block;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 100;
  background: rgba(229, 229, 229, 0.95);
  border: 3px solid #5d0003;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.ui-sidebar-trigger > img {
  display: block;
  width: 48px;
  height: auto;
}

.ui-sidebar-nav {
  position: fixed;
  top: 0;
  left: -20rem;
  overflow-y: auto;
  transition: all 0.3s ease-in-out;
  width: 18rem;
  height: 100vh;
  background: #e5e5e5;
  color: #333;
  border-right: 3px solid #5d0003;
  display: flex;
  flex-direction: column;
  padding: 10px;
  z-index: 1004;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
}

.ui-sidebar-nav.open {
  left: 0;
}

.ui-sidebar-nav > .nav-item {
  display: flex;
  flex-direction: column;
}

.ui-sidebar-nav > .form-checkbox {
  flex-direction: row;
}

.ui-sidebar-nav > .nav-actions > .nav-action-btn {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
}

.ui-sidebar-nav > .nav-actions > .nav-action-btn:hover {
  background: #555;
}

.ui-sidebar-nav > .nav-actions > .nav-action-btn:last-child {
  margin-bottom: 0;
}

.ui-sidebar-nav > .nav-links > .nav-link-item {
  display: flex;
  margin-bottom: 0.5rem;
}

.ui-sidebar-nav > .nav-links > .nav-link-item:last-child {
  margin-bottom: 0;
}

.ui-sidebar-nav > .nav-links > .nav-link-label {
  font-weight: bold;
}

.ui-sidebar-nav > .nav-links > .nav-link {
  color: #5d0003;
}

@media (min-width: 641px) and (orientation: landscape) {
  .ui-sidebar-trigger {
    display: none;
  }

  .ui-sidebar-nav {
    position: relative;
    left: 0;
    width: 20rem;
    height: 100vh;
    transition: none;
    box-shadow: none;
    border-right: 3px solid #5d0003;
  }

  .ui-sidebar-nav.open {
    left: 0;
  }
}

.ui-sidebar-nav > .nav-item {
  margin-bottom: 1rem;
}

.ui-sidebar-nav > .nav-item input[type="checkbox"] {
  margin-right: 0.5rem;
}

.ui-sidebar-nav > .nav-item label {
  font-size: 0.9rem;
  color: #333;
}

.side-logo-hide {
  display: none;
}

@media (min-width: 641px) {
  .side-logo-hide {
    display: block;
  }
}

.faded {
  opacity: 0.5;
}

/* UI Overlay - Full page overlay system */
.ui-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
  display: flex;
  flex-direction: row;
}

.ui-overlay > * {
  pointer-events: auto;
}

/* Sidebar styles for desktop and mobile */
.ui-sidebar {
  position: relative;
  z-index: 1001;
}

.ui-map-legend {
  font-size: 0.6rem;
  position: absolute;
  top: auto;
  right: auto;
  bottom: 39px;
  left: 10px;
  z-index: 100;
  display: grid;
  grid-template-columns: 10em 10em;
  grid-template-rows: auto;
  gap: 0.25em;
  background: #e5e5e5;
  padding: 0.5em;
  border: 1px solid #5d0003;
  border-radius: 0.5em;
}

.ui-map-legend > .map-legend-item {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.ui-map-legend > .map-legend-item > img {
  width: 1.5em;
  height: 1.5em;
}

.ui-map-legend > .map-legend-item > span {
  padding-left: 0.25em;
}

@media (min-width: 641px) {
  .ui-map-legend {
    max-width: auto;
    top: 10px;
    right: 49px;
    bottom: auto;
    left: auto;
    font-size: 1rem;
  }
}

#ui-usaid-strap {
  position: absolute;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  right: 0;
  bottom: 44px;
  background-color: #ffffff;
  z-index: 100;
  max-width: 8rem;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

#ui-usaid-strap > .usaid-link {
  display: flex;
  flex: 1 1 0px;
  margin: 0.5rem;
}

#ui-usaid-strap > .usaid-link > .usaid-logo {
  flex: 1;
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
}

#ui-usaid-strap > .usaid-disclaimer {
  font-size: 0.7rem;
  display: none;
  flex: 1 1 0px;
  margin: 0.5rem;
  margin-left: 0;
}

@media (min-width: 641px) {
  #ui-usaid-strap {
    bottom: 30px;
    max-width: 27rem;
  }

  #ui-usaid-strap > .usaid-disclaimer {
    display: inline;
  }
}

.resized {
  width: 135px;
  height: auto;
}
