:root {
  --x-offset: 20px;
  --primary-color: #99c555;
  --scard-border: 1px solid #e0e5a4;
  --offWhite: #f3f7e7;
}

.with-gap {
  gap: 20px;
}

@media screen and (min-width: 640px) {
  :root {
    /* Change base variable used for element variable */
    --x-offset: 50px;
  }

  .with-gap {
    gap: 35px;
  }
}

@media screen and (min-width: 768px) {
  :root {
    /* Change base variable used for element variable */
    --x-offset: 60px;
  }
}

@media screen and (min-width: 1024px) {
  :root {
    /* Change base variable used for element variable */
    --x-offset: 70px;
  }

  .with-gap {
    gap: 50px;
  }
}

/* common css*/

.content-container {
  margin-left: var(--x-offset);
  margin-right: var(--x-offset);
  max-width: calc(100vw - (2 * var(--x-offset)));
}

.output-container {
  margin-top: var(--x-offset);
}

.bottom-element {
  margin-bottom: var(--x-offset);
}

.top-element {
  margin-top: var(--x-offset);
}

#home-level_All:hover,
#home-level_Beef:hover,
#home-level_Dairy :hover {
  text-decoration: underline !important;
}

/*header */
.header-container {
  margin-top: 30px;
  margin-bottom: 30px;
}

.space {
  margin: 30px 0px;
}

.floatText {
  background-color: var(--offWhite);
  text-align: justify;
  margin: auto;
  min-height: 80px;
  width: 300px;
}

.bbline {
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 5px;
}

.tbline {
  border-top: 1px solid var(--primary-color);
  border-bottom: 1px solid var(--primary-color);
}

/* about model */
.shiny-input-container:not(.shiny-input-container-inline) {
  margin: 0px;
}

#about {
  padding: 0px;
}

.modal-content {
  max-width: 95vw;
}

.modal-header {
  padding: 0px !important;
  border-bottom: none !important;
}

.close {
  opacity: 1 !important;
}

.close:hover {
  cursor: pointer;
}

#diseases-specieInput-label,
#diseases-regionInput-label,
#disease-specieInput-label,
#disease-diseaseInput-label,
#disease-regionInput-label {
  margin-top: 10px;
  font-weight: bold;
  font-size: 17px;
}

.multiselect-inner-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.multiselect-input,
.multiselect-add-input {
  margin: 20px 30px 20px 0;
  display: flex;
  align-items: center;
}

.multiselect-add-input i {
  padding-right: 5px;
  color: var(--primary-color);
}

/* map box */
.islandBoxT {
  width: 150px;
  height: 3px;
  position: absolute;
  top: 555px;
  left: 590px;
  background-color: #909090;
}

.islandBoxL {
  width: 3px;
  height: 150px;
  position: absolute;
  top: 555px;
  left: 590px;
  background-color: #909090;
}

.islandBoxB {
  width: 153px;
  height: 3px;
  position: absolute;
  top: 705px;
  left: 590px;
  background-color: #909090;
}

.islandBoxR {
  width: 3px;
  height: 150px;
  position: absolute;
  top: 555px;
  left: 740px;
  background-color: #909090;
}

/*navigation */
.nav-tabs .nav-link,
.nav-tabs > li > a,
.nav-tabs .nav-pills > li > a,
.nav-tabs ul.nav.navbar-nav > li > a {
  border-bottom: none !important;
  border: none !important;
}

.nav-tabs .nav-link.active,
.nav-tabs > li > a.active,
.nav-tabs .nav-pills > li > a.active,
.nav-tabs ul.nav.navbar-nav > li > a.active,
.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-item.in .nav-link,
.nav-tabs .nav-item.show .nav-tabs > li > a,
.nav-tabs .nav-item.in .nav-tabs > li > a,
.nav-tabs .nav-item.show .nav-pills > li > a,
.nav-tabs .nav-item.in .nav-pills > li > a,
.nav-tabs > li.show .nav-link,
.nav-tabs > li.in .nav-link,
.nav-tabs > li.show .nav-tabs > li > a,
.nav-tabs > li.in .nav-tabs > li > a,
.nav-tabs > li.show .nav-pills > li > a,
.nav-tabs > li.in .nav-pills > li > a,
.nav-tabs .nav-pills > li.show .nav-link,
.nav-tabs .nav-pills > li.in .nav-link,
.nav-tabs .nav-pills > li.show .nav-tabs > li > a,
.nav-tabs .nav-pills > li.in .nav-tabs > li > a,
.nav-tabs .nav-pills > li.show .nav-pills > li > a,
.nav-tabs .nav-pills > li.in .nav-pills > li > a,
.nav-tabs .nav-item.show ul.nav.navbar-nav > li > a,
.nav-tabs .nav-item.in ul.nav.navbar-nav > li > a,
.nav-tabs > li.show ul.nav.navbar-nav > li > a,
.nav-tabs > li.in ul.nav.navbar-nav > li > a,
.nav-tabs .nav-pills > li.show ul.nav.navbar-nav > li > a,
.nav-tabs .nav-pills > li.in ul.nav.navbar-nav > li > a,
.nav-tabs ul.nav.navbar-nav > li.show:not(.dropdown) .nav-link,
.nav-tabs ul.nav.navbar-nav > li.in:not(.dropdown) .nav-link,
.nav-tabs ul.nav.navbar-nav > li.show:not(.dropdown) .nav-tabs > li > a,
.nav-tabs ul.nav.navbar-nav > li.in:not(.dropdown) .nav-tabs > li > a,
.nav-tabs ul.nav.navbar-nav > li.show:not(.dropdown) .nav-pills > li > a,
.nav-tabs ul.nav.navbar-nav > li.in:not(.dropdown) .nav-pills > li > a,
.nav-tabs ul.nav.navbar-nav > li.show:not(.dropdown) ul.nav.navbar-nav > li > a,
.nav-tabs ul.nav.navbar-nav > li.in:not(.dropdown) ul.nav.navbar-nav > li > a {
  border-bottom: 5px solid var(--primary-color) !important;
  padding-bottom: 3px !important;
}

.nav-tabs .nav-link.active,
.nav-tabs > li > a.active,
.nav-tabs .nav-pills > li > a.active,
.nav-tabs ul.nav.navbar-nav > li > a.active,
.nav-tabs .nav-item.show .nav-link,
.nav-tabs .nav-item.in .nav-link,
.nav-tabs .nav-item.show .nav-tabs > li > a,
.nav-tabs .nav-item.in .nav-tabs > li > a,
.nav-tabs .nav-item.show .nav-pills > li > a,
.nav-tabs .nav-item.in .nav-pills > li > a,
.nav-tabs > li.show .nav-link,
.nav-tabs > li.in .nav-link,
.nav-tabs > li.show .nav-tabs > li > a,
.nav-tabs > li.in .nav-tabs > li > a,
.nav-tabs > li.show .nav-pills > li > a,
.nav-tabs > li.in .nav-pills > li > a,
.nav-tabs .nav-pills > li.show .nav-link,
.nav-tabs .nav-pills > li.in .nav-link,
.nav-tabs .nav-pills > li.show .nav-tabs > li > a,
.nav-tabs .nav-pills > li.in .nav-tabs > li > a,
.nav-tabs .nav-pills > li.show .nav-pills > li > a,
.nav-tabs .nav-pills > li.in .nav-pills > li > a,
.nav-tabs .nav-item.show ul.nav.navbar-nav > li > a,
.nav-tabs .nav-item.in ul.nav.navbar-nav > li > a,
.nav-tabs > li.show ul.nav.navbar-nav > li > a,
.nav-tabs > li.in ul.nav.navbar-nav > li > a,
.nav-tabs .nav-pills > li.show ul.nav.navbar-nav > li > a,
.nav-tabs .nav-pills > li.in ul.nav.navbar-nav > li > a,
.nav-tabs ul.nav.navbar-nav > li.show:not(.dropdown) .nav-link,
.nav-tabs ul.nav.navbar-nav > li.in:not(.dropdown) .nav-link,
.nav-tabs ul.nav.navbar-nav > li.show:not(.dropdown) .nav-tabs > li > a,
.nav-tabs ul.nav.navbar-nav > li.in:not(.dropdown) .nav-tabs > li > a,
.nav-tabs ul.nav.navbar-nav > li.show:not(.dropdown) .nav-pills > li > a,
.nav-tabs ul.nav.navbar-nav > li.in:not(.dropdown) .nav-pills > li > a,
.nav-tabs ul.nav.navbar-nav > li.show:not(.dropdown) ul.nav.navbar-nav > li > a,
.nav-tabs ul.nav.navbar-nav > li.in:not(.dropdown) ul.nav.navbar-nav > li > a {
  border-color: none !important;
}

.nav .nav-tabs li {
  border-bottom: 1px solid black !important;
}

.nav-tabs {
  border-bottom: 1px solid #707070 !important;
  width: 100%;
  flex-flow: row;
  overflow-x: scroll;
}

@media screen and (min-width: 1024px) {
  .nav-tabs {
    overflow-x: hidden;
  }
}

.nav-item {
  font-weight: bold;
  font-size: 17px;
  color: black;
  align-content: flex-end;
  text-align: center;
}

.nav-tabs .nav-link,
.nav-tabs > li > a,
.nav-tabs .nav-pills > li > a,
.nav-tabs ul.nav.navbar-nav > li > a {
  margin-bottom: 0px !important;
}

a {
  color: black !important;
}

ul .nav-item a {
  padding-left: 0px;
  padding-right: 0px;
}

/*home */

.species-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.species-grid .scard {
  border: none;
  border-top: var(--scard-border);
}

.disease-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.disease-grid .dcard {
  border: none;
  border-top: var(--scard-border);
}

/* Two-column grid layout */
@media screen and (min-width: 640px) {
  .species-grid,
  .disease-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .species-grid .scard,
  .disease-grid .dcard {
    border: none;
    border-bottom: var(--scard-border);
  }

  .species-grid .scard:nth-child(-n + 2),
  .disease-grid .dcard:nth-child(-n + 2) {
    border-top: var(--scard-border);
  }

  .species-grid .scard:nth-child(odd),
  .disease-grid .dcard:nth-child(odd) {
    border-right: var(--scard-border);
  }

  .species-grid .scard:nth-last-child(1),
  .disease-grid .dcard:nth-last-child(1) {
    border-bottom: none;
  }
}

/* Three-column species grid layout */
@media screen and (min-width: 1024px) {
  .species-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .species-grid .scard {
    border: none;
    border-right: var(--scard-border);
    border-bottom: var(--scard-border);
  }

  .species-grid .scard:nth-child(3n) {
    border-right: none;
  }

  .species-grid .scard:nth-child(-n + 3) {
    border-top: var(--scard-border);
  }

  /* This selects the last row of the grid */
  .species-grid .scard:nth-child(3n + 1):nth-last-child(-n + 3),
  .species-grid .scard:nth-child(3n + 1):nth-last-child(-n + 3) ~ .scard {
    border-bottom: none;
  }
}

/* Three-column disease grid layout */
@media screen and (min-width: 1024px) and (max-width: 1279px) {
  .disease-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .disease-grid .dcard {
    border: none;
    border-right: var(--scard-border);
    border-bottom: var(--scard-border);
  }

  .disease-grid .dcard:nth-child(3n) {
    border-right: none;
  }

  .disease-grid .dcard:nth-child(-n + 3) {
    border-top: var(--scard-border);
  }

  /* This selects the last row of the grid */
  .disease-grid .dcard:nth-child(3n + 1):nth-last-child(-n + 3),
  .disease-grid .dcard:nth-child(3n + 1):nth-last-child(-n + 3) ~ .dcard {
    border-bottom: none;
  }
}

/* Four-column grid layout */
@media screen and (min-width: 1280px) {
  .disease-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .disease-grid .dcard {
    border: none;
    border-right: var(--scard-border);
    border-bottom: var(--scard-border);
  }

  .disease-grid .dcard:nth-child(4n) {
    border-right: none;
  }

  .disease-grid .dcard:nth-child(-n + 4) {
    border-top: var(--scard-border);
  }

  /* This selects the last row of the grid */
  .disease-grid .dcard:nth-child(4n + 1):nth-last-child(-n + 4),
  .disease-grid .dcard:nth-child(4n + 1):nth-last-child(-n + 4) ~ .dcard {
    border-bottom: none;
  }
}

.seach {
  width: 100%;
  align-items: baseline;
  padding: 20px 20px 50px 0px;
}

.card > div > div > div:first-child p,
.card > a > h3 {
  border-bottom: 3px solid var(--primary-color);
  font-size: 20px;
  font-weight: bold;
  width: fit-content;
}

.card > div > a:hover {
  text-decoration: none !important;
}

.card,
.well {
  border-radius: 0 !important;
}

.dcard > div > a {
  border-bottom: 3px solid var(--primary-color);
  font-size: 20px;
  font-weight: bold;
  width: fit-content;
}

.deach {
  width: 300px;
  height: 100px;
  text-align: left;
  padding-left: 10px;
}

#home-level_Beef:hover,
#home-level_Dairy:hover,
#home-level_Beef:focus,
#home-level_Dairy:focus {
  text-decoration: underline !important;
}

/* disease page*/
#detail-mainPanel div div div ul {
  gap: 30px;
}

#details-map-container .leaflet.html-widget {
  height: 800px !important;
  border: 1px solid #123853;
}

@media screen and (max-width: 1023px) {
  #details-map-container .leaflet.html-widget {
    max-height: 70vh;
  }
}

/*
#detail-mapContainer {
  padding-right: 50px;
}
*/

.info {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0px !important;
  padding: 0 !important;
  font: 16px Source Sans Pro !important;
}

.legend i {
  display: inline-block;
  margin-top: 3px;
  margin-bottom: -5px;
  width: 20px !important;
  height: 20px !important;
}

/*region tab*/

.leaflet-map-pane canvas {
  background: white !important;
}

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

.leaflet-popup-tip-container {
  visibility: hidden;
}

.leaflet-popup-content-wrapper {
  padding: 0px !important;
  text-align: left !important;
  border: 1px solid #909090;
  border-radius: 10px;
  box-shadow: none !important;
}

.leaflet-popup-content {
  margin: 0px 10px !important;
  width: 200px !important;
  padding: 5px !important;
}

.leaflet-popup-content p {
  margin: 10px 0px !important;
}

.leaflet-bottom .leaflet-control {
  margin-bottom: 50px !important;
}

.leaflet-right .leaflet-control {
  margin-right: 50px !important;
}

.leaflet-control-minimap {
  border: 3px solid #909090 !important;
  box-shadow: none !important;
  border-radius: 0px !important;
}

#details-map-container .leaflet.html-widget .leaflet-zoom-animated {
  background: #f7f7f7 !important;
}

#home-nz_region_list {
  text-align: left;
  width: fit-content;
  margin: auto 0px;
  padding: 0px;
  gap: 15px;
  display: flex;
  flex-direction: column;
}

#home-small_map_view {
  position: absolute;
  left: 600px;
  bottom: 300px;
  z-index: 100;
  outline: none;
  width: 150px !important;
  height: 150px !important;
  border: 3px solid #909090;
}

a:hover {
  text-decoration: none !important;
}

a span:hover {
  text-decoration: none !important;
}

a.contact {
  text-decoration: underline !important;
}

a.contact:hover {
  text-decoration: underline !important;
}

/*footer */

/* Last updated display */
.last-updated-text {
  border-bottom: 2px solid var(--primary-color);
  width: max-content;
  padding: 20px 30px 15px 0px;
  margin-bottom: 40px;
}

#specieInput-label,
#regionInput-label,
#diseaseInput-label {
  font-size: 17px;
  font-weight: bold;
  color: white;
}

/* Breadcrumbs */
.active-breadcrumb {
  font-weight: bold;
  border-bottom: 2px solid var(--primary-color);
}

.ilc {
  max-width: 100%;
}

@media screen and (min-width: 1024px) {
  .ilc {
    max-width: 85%;
  }
}

@media screen and (min-width: 1280px) {
  .ilc {
    max-width: 70%;
  }
}

/* Impact Level Cards */
.ilc-title-row {
  display: inline-flex;
  flex-wrap: nowrap;
  width: 100%;
  padding: 0 15px;
}

.ilc-title-row h5 {
  font-weight: 700;
  margin: 0 6px;
}

.ilc-card {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  justify-content: space-between;
  background-color: #e0e5a4;
  padding: 15px;
  min-height: 130px;
}

.ilc-card .ilc-title {
  flex: 0 0 33.33333%;
  -webkit-flex: 0 0 33.33333%;
}

@media screen and (max-width: 767px) {
  .ilc-card {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .ilc-title-row {
    display: none;
  }

  .ilc-card .ilc-title {
    text-align: center;
  }
}

.ilc-card h5 {
  font-weight: 700;
  margin: 6px;
}

.ilc-card .ilc-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media screen and (min-width: 1024px) {
  .ilc-card .ilc-gauge {
    flex-direction: row;
    align-items: center;
  }
}

.ilc-link {
  border: 1px solid #000000;
  border-radius: 20px;
  display: inline-flex;
  justify-content: space-around;
  align-items: center;
  height: 40px;
  width: 165px;
  cursor: pointer;
}

.ilc-link-text {
  font-weight: bold;
}

.ilc-link-arrow {
  padding-top: 4px;
}

.ilc-link-arrow:after {
  content: url(../img/arrow-right-black.svg);
}

.shiny-output-error-validation {
  width: 100%;
  text-align: center;
  padding: 320px 0 130px 0;
  background-color: var(--offWhite);
  color: black;
  font-weight: bold;
  font-size: 20px;
  background-image: URL('../img/warning-alt-filled.svg');
  background-repeat: no-repeat;
  background-position: center;
}
.shiny-output-error-no-data-plot {
  width: 100% !important;
  margin-top: 40px;
}
.shiny-output-error-no-data:before {
  content: '';
  font-weight: inherit;
}
.shiny-output-error-no-data {
  width: 100%;
  text-align: center;
  padding: 250px 0 130px 0;
  background-color: var(--offWhite);
  color: black;
  font-weight: bold;
  font-size: 20px;
}

.details-header {
  display: flex;
  flex-flow: column;
}

.details-header-description,
.details-header-description > p {
  max-width: 100%;
  flex: 1 0 100%;
}

@media screen and (min-width: 768px) {
  .details-header {
    flex-flow: row;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .details-header-description,
  .details-header-description > p {
    max-width: 66%;
    flex: 1 0 66%;
  }
}

.detail-html-include h2 {
  margin-top: 50px;
}

div.detail-html-include {
  margin-top: 30px;
}

@media only screen and (min-width: 992px) {
  div.detail-html-include {
    max-width: 75%;
  }
  div.detail-html-include.full-width {
    max-width: unset;
  }
}

div.detail-html-include > div:not(.flex-col) {
  display: flex;
  flex-flow: row;
  align-items: center;
}

@media screen and (max-width: 639px) {
  div.detail-html-include > div:not(.flex-col) {
    flex-flow: column-reverse;
    margin-bottom: 40px;
  }
}

.disease-summary-content {
  display: flex;
  flex-flow: row wrap;
  gap: 40px;
  justify-content: space-between;
}

.incidence-content {
  display: flex;
  flex-flow: column;
  gap: 40px;
}

@media screen and (min-width: 1024px) {
  .incidence-content {
    flex-flow: row;
    justify-content: space-between;
  }
}
