
/* leaflet tweaks */

.leaflet-container a.leaflet-popup-close-button {
  top: -0.80rem !important;
  left: -0.80rem !important;
  width: 2rem !important;
  height: 2rem !important;
  font: reset !important;
  background: #FFF !important;
  border-radius: 50% !important;
  font-size: 2rem !important;
  line-height: 1 !important;
  font-weight: bold !important;
  color: var(--color) !important;
}

.leaflet-popup-content {
  margin: 0.50rem !important;
}

/* main map */

#mapx-map-wrapper{
  position: relative;
  background-color: #E9E9E9;
  border: 1px solid #B9B9B9;
  color: #000 !important;
  --shadows: 0 3px 14px rgba(0,0,0,0.4);
  --color: #006079;
}

#mapx-ctrl-search-bar {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  right: 0.25rem;
  font-size: 1rem;
  margin: 0;
  padding: .50rem;
  background-color: #FFF;
  border: 1px solid #B9B9B9;
  z-index: 1;
  border-radius: 0;
  box-shadow: var(--shadows);
  min-height: 2.20rem;
}

.mapx-ctrl-zoom {
  position: absolute;
  top: 7rem;
  right: 0.25rem;
  margin: 0 !important;
  box-shadow: 0 3px 14px rgba(0,0,0,0.4) !important;
}

#mapx-the-map {
  position: relative;
  height: 800px;
  background-color: #8CD3F1;
  z-index: 0;
}

@media only screen and (max-width: 600px) {

}

#mapx-load-text {
  position: relative;
  background-color: #ADD8E6;
  color: #000000;
  font-size: 1.3rem;
  padding: .5rem;
  border-radius: .5rem;
  float: left;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#mapx-ctrl-search-bar-toggle-bar {
  display: none;

}

#mapx-ctrl-search-bar-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
/*
  display: none;
*/
  padding: 1px 4px;
  border: 1px solid #097100;
  border-radius: 3px;
  color: #097100;
  background-color: #E6FFEB;
}

#mapx-ctrl-search-bar-toggle:hover {
  color: #00350A;
  background-color: #C1FFCD;
  border: 1px solid #00350A;
}

/*
#mapx-search-controls-wrap {
  display: block;
}
*/

#mapx-search-controls {
  display: flex;
/*
  grid-template-rows: auto;
  grid-template-columns: 8rem 14rem 18rem 8rem 11rem auto 5rem 3rem;
*/
  gap: 0.25rem;
}

#mapx-welcome-message {
  font-size: 1.20rem;
  color: var(--color);
}

.mapx-welcome-popup .leaflet-popup-tip-container {
  display: none !important;
}

#mapx-search-controls > div {
/*
  border: 1px solid red;
*/
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3em;
}

#mapx-search-controls select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Some browsers will not display the caret when using calc, so we put the fallback first */
  background: url('../img/down-arrow.webp') #F3F3F3 no-repeat 98.5% !important; /* !important used for overriding all other customisations */
  background: url('../img/down-arrow.webp') #F3F3F3 no-repeat calc(100% - 10px) !important; /* Better placement regardless of input width */
}

/*For IE*/
#mapx-search-controls select::-ms-expand { display: none; }

#mapx-search-controls input {
  background-color: #F3F3F3;
}

.mapx-ctrl-text-x {
  color: #000;
  font-size: 1.40rem;
  line-height: 1;
}

.mapx-ctrl-text {
  display: block;
  color: var(--color);
  font-size: 1.60rem;
  line-height: 1;
  text-align: center;
  font-weight: bold;
}

.mapx-ctrl-right {
  margin-left: auto;
}

#mapx-filters-button,
#mapx-search-reset,
#mapx-search-button,
/*
#mapx-the-address,
*/
#mapx-the-statprov,
#mapx-the-country,
#mapx-the-mileage,
#mapx-the-products,
#mapx-search-controls > .mapx-ctrl-prods > select[name="products"],
#mapx-search-controls > .mapx-ctrl-certs > select[name="certifications"],
#mapx-search-controls > .mapx-ctrl-pracs > select[name="practices"] {
  width: 100%;
  font-size: 1.20rem;
  line-height: 1;
  height: 3.00rem;
  padding: 0 0.50rem;
}

/* farm count box  */

/*
#mapx-ctrl-count-box {
  padding: 0.20rem 0.40rem;
  background-color: #FFF;
  border: 1px solid #000;
  border-radius: 0.25rem;
  z-index: 1;
  max-width: 16rem;
}
*/

/* search */

#mapx-ctrl-filters {
  position: absolute;
  top: 7rem;
  left: 50%;
  transform: translate(-50%, 0);
  max-width: 10rem;
  padding: 0.50rem;
  margin: 0 auto;
  background-color: #FFF;
  border-radius: 0.60rem;
  z-index: 1;
  box-shadow: var(--shadows);
}

#mapx-ctrl-farms-list {
  display: none;
  position: absolute;
  top: 7rem;
  left: 1rem;
  bottom: 7rem;
  width: 15rem;
  font-size: 1rem;
  margin: 0;
  padding: 0.50rem;
  background-color: #FFF;
  border: 1px solid #B9B9B9;
  border-radius: 0.60rem;
  z-index: 1;
  box-shadow: var(--shadows);
}

#mapx-ctrl-farms-list-closer {
  position: absolute;
  text-decoration: none;
  font: 16px/24px Tahoma, Verdana, sans-serif;
  right: 0;
  top: -0.80rem;
  left: -0.80rem;
  text-align: center;
  width: 2rem;
  height: 2rem;
  background: #FFF;
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
  font-weight: bold;
  color: var(--color);
  z-index: 1;
}
/*
#mapx-search-results-box {
  display: none;
  position: relative;
  padding: 0.20rem 0.40rem;
  background-color: #FFF;
  border: 1px solid #000;
  border-radius: 0.20rem;
  overflow: hidden;
}
*/
/*

#mapx-search-results-list > h4 {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #BFBFBF;
}
*/

/* search results box list */

#mapx-search-results-list {
  position: absolute;
  top: 1rem;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
}

#mapx-search-results-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#mapx-search-results-list ul li.mapx-farm-list-item {
  padding: 0.25rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid #E3E3E3;
  border-radius: 0.25rem 0.25rem 0 0;
  color: #000;
  cursor: pointer;
}

#mapx-search-results-list ul li.mapx-farm-list-item:hover {
  color: var(--color);
  background-color: #EFEFEF;
}

/*
#mapx-search-results-list ul li.mapx-farm-list-item b {
  display: block;
}
*/

#mapx-search-results-list ul li.mapx-farm-list-item span {
  display: block;
}
#mapx-search-results-list ul li.mapx-farm-list-item span.mapx-item-wsite {
  font-size: 0.75rem;
  float: right;
  text-align: center;
}
#mapx-search-results-list ul li.mapx-farm-list-item span.mapx-item-title {
  font-size: 1.00rem;
  font-weight: bold;
}
#mapx-search-results-list ul li.mapx-farm-list-item span.mapx-item-owner {
  font-size: 0.80rem;
}
/*
#mapx-search-results-list ul li.mapx-farm-list-item span.mapx-item-email {}
*/
#mapx-search-results-list ul li.mapx-farm-list-item span.mapx-item-phone {
  font-size: 0.80rem;
}
#mapx-search-results-list ul li.mapx-farm-list-item span.mapx-item-addrs {
  font-size: 0.80rem;
}
#mapx-search-results-list ul li.mapx-farm-list-item span.mapx-item-email {
  font-size: 0.80rem;
}

@media only screen and (max-width: 1100px) {
  #mapx-ctrl-search-bar {
    top: 0.25rem;
    left: 0.25rem;
    right: 2.50rem;
    border-radius: 0;
  }

  #mapx-ctrl-farms-list {
    top: unset;
    left: 0.25rem;
    right: 0.25rem;
    bottom: 0.25rem;
    height: 11rem;
    width: auto;
    border-radius: 0;
  }

/*
  #mapx-search-controls-wrap {
    display: block;
  }
*/

  #mapx-ctrl-search-bar-toggle-bar {
    display: block;
  }

  #mapx-search-controls {
    display: block;
    max-width: 24rem;
    margin: 0 auto;
  }

  #mapx-search-controls > div {
    margin-bottom: 0.25rem;
  }

  .mapx-ctrl-zoom {
    top: 0.25rem;
  }
}

/* popup */

.leaflet-popup-content {
  width: 480px !important;
}

@media only screen and (max-width: 800px) {
  .leaflet-popup-content {
    width: 360px !important;
  }
}

@media only screen and (max-width: 700px) {
  .leaflet-popup-content {
    width: 300px !important;
  }
}

@media only screen and (max-width: 600px) {
  .leaflet-popup-content {
    width: 260px !important;
  }
}

.mapx-infobox-farm-info {
  display: grid;
  gap: 0.25rem;
  grid-template-columns: auto 1fr;
  margin-bottom: 0.25rem;
}


.mapx-infobox-farm-title {
  background-color: var(--color);
  color: #D0F5FF;
  font-weight: bold;
  padding: 0.25rem 0.50rem;
  font-size: 1.25rem;
  border: 1px solid #006500;
  border-radius: 0.20rem;
  margin-bottom: 0.25rem;
}

.mapx-infobox-farm-block {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.mapx-infobox-farm-owner {}
.mapx-infobox-farm-extra {}
.mapx-infobox-farm-address {}
.mapx-infobox-farm-site {}
.mapx-infobox-farm-descr {
  max-height: 4.50rem;
  overflow: auto;
}

.mapx-infobox-farm-certs {}
.mapx-infobox-farm-prods {}
.mapx-infobox-farm-pracs {}

/* button */

.mapx-button {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color);
  color: #FFF;
  border: 1px solid var(--color);
  border-radius: 0.25rem;
}

.mapx-button:hover {
  background-color: #FFF;
  color: var(--color);
}

.mapx-button > span {
  display: inline-block;
  line-height: 1;
  padding: 1.00rem 0.50rem;
  font-weight: bold;
  text-align: center;
  color: #FFF;
}
.mapx-button > span:hover {
  color: var(--color);
}

/* cluster markers */

.leaflet-control-layers-toggle {
  background-image: url('../img/layers.png');
}

.mapx-marker-cluster-small {
  background-color: rgba(181, 226, 140, 0.6);
}
.mapx-marker-cluster-small div {
  background-color: rgba(110, 204, 57, 0.6);
  width: 16px;
  height: 16px;
}

.mapx-marker-cluster-medium {
  background-color: rgba(241, 211, 87, 0.6);
}
.mapx-marker-cluster-medium div {
  background-color: rgba(240, 194, 12, 0.6);
  width: 20px;
  height: 20px;
}

.mapx-marker-cluster-large {
  background-color: rgba(253, 156, 115, 0.6);
}
.mapx-marker-cluster-large div {
  background-color: rgba(241, 128, 23, 0.6);

  width: 24px;
  height: 24px;
}

.mapx-marker-cluster-huge {
  background-color: rgba(177, 64, 0, 0.6);
}
.mapx-marker-cluster-huge div {
  background-color: rgba(255, 149, 89, 0.6);
  color: #FFF;
}

.mapx-marker-cluster {
  margin: auto;
  background-clip: padding-box;
  border-radius: 20px;
}
.mapx-marker-cluster div {
  margin: 4px;
  width: 32px;
  height: 32px;

  text-align: center;
  border-radius: 15px;
  font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
}
.mapx-marker-cluster span {
  line-height: 32px;
}

/* modal */

.mapx-modal {
    display:    none;
    position:   fixed;
    z-index:    1000;
    top:        0;
    left:       0;
    height:     100%;
    width:      100%;
    background: rgba( 255, 255, 255, .8 )
                url('../img/waiting.gif')
                50% 50%
                no-repeat;
}

/* When the body has the loading class, we turn
   the scrollbar off with overflow:hidden */
body.mapx-loading {
  overflow: hidden;
}

/* Anytime the body has the loading class, our
   modal element will be visible */
body.mapx-loading .mapx-modal {
  display: block;
}

/* highlight */

.mapx-highlight {}

@-webkit-keyframes hilite-fade { 0%, 100% { background-color: inherit; color: inherit; } 50% { background-color: var(--color); color: #FFF; } }
@-moz-keyframes hilite-fade { 0%, 100% { background-color: inherit; color: inherit; } 50 { background-color: var(--color); color: #FFF; } }
@keyframes hilite-fade { 0%, 100% { background-color: inherit; color: inherit; } 50% { background-color: var(--color); color: #FFF; } }
.mapx-highlight {
  -webkit-animation: hilite-fade 0.5s ease 0.5s 2 normal forwards;
  -moz-animation: hilite-fade 0.5s ease 0.5s 2 normal forwards;
  -o-animation: hilite-fade 0.5s ease 0.5s 2 normal forwards;
  animation: hilite-fade 0.5s ease 0.5s 2 normal forwards;
}

/* FIN */