.leaflet-popup .BAZ_cadre_fiche,
.BAZ_cadre_map {
  font-size: 12px;
  max-height: 320px;
  overflow: auto;
  width: 320px;
  margin: 0;
  padding-right: 10px;
  display: block;
  text-align: left;
}

.leaflet-popup .BAZ_fiche_info {
  font-size: 12px;
}

.leaflet-container a.btn:not(.btn-popup-map) {
  font-size: 12px;
}

.leaflet-container a.btn:not(.btn-default) {
  color: var(--neutral-light-color, #0078a8);
}

.leaflet-container a.btn.btn-default {
  color: var(--neutral-color, #0078a8);
}

.leaflet-popup .BAZ_titre,
.BAZ_cadre_map .BAZ_titre {
  font-size: 10px;
  line-height: 10px;
  margin: 0 0 10px;
}

.leaflet-popup .BAZ_fiche_titre,
.BAZ_cadre_map .BAZ_fiche_titre {
  font-size: 16px;
  line-height: 20px;
  margin: 0 0 16px;
}

.leaflet-popup ul.css-tabs,
.BAZ_cadre_map ul.css-tabs {
  margin: 0;
}

.leaflet-popup ul.css-tabs a,
.BAZ_cadre_map ul.css-tabs a {
  font-size: 0.8em;
  height: auto;
  margin: 0 1px 0 0;
  padding: 3px;
}

.bazar-marker .bazar-entry {
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-style: normal;
  font-variant: normal;
  text-rendering: auto;
  line-height: 1;
  font-size: 20px;
  color: var(--primary-color);
  display: block;
  text-align: center;
  position: relative;
  z-index: 2;
  width: 15px;
  height: 20px;
}

.bazar-marker .bazar-entry::before {
  content: '\f041';
}

.bazar-marker.xl .bazar-entry {
  width: 35px;
  height: 46px;
  font-size: 40px;
}

.bazar-marker.xl:hover {
  z-index: 1000 !important;
}

.bazar-marker.xl:hover .bazar-entry,
.bazar-marker.xl.selected .bazar-entry {
  transform: scale(1.3) translateY(-5px);
}

.bazar-marker .bazar-entry i {
  position: absolute;
  top: 3.5px;
  left: 2.5px;
  font-size: 8px;
  color: #fff;
}

.bazar-marker.xl .bazar-entry i {
  top: 8px;
  left: 7.5px;
  font-size: 16px;
}

/* ----------------- */

/* Dynamic Bazar Map */

/* ----------------- */
.bazar-map-container {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}

.facette-container.dynamic[data-filter-align='right'] .bazar-map-container {
  flex-direction: row-reverse;
}

/* MARKER */
.bazar-map-container .bazar-marker.xl .bazar-entry i {
  left: 9.5px;
}

.bazar-map-container .bazar-marker .bazar-entry i {
  left: 3.5px;
}

.bazar-map-container .bazar-marker .entry-name {
  position: absolute;
  top: -46px;
  left: -5px;
  width: 1000px;
  display: none;
}

.bazar-map-container .bazar-marker .entry-name span {
  background-color: var(--primary-color);
  color: var(--neutral-light-color);
  padding: 0.3rem 0.8rem;
  border-radius: 5px;
  font-size: 0.95em;
}

.bazar-map-container .bazar-marker.xl.selected .entry-name,
.bazar-map-container .bazar-marker.xl:hover .entry-name {
  display: block;
}

.bazar-map-container .bazar-marker a.bazar-entry {
  text-decoration: none;
}

/* CLUSTERS */
:root {
  --cluster-size: 32px;
}

.marker-cluster div {
  margin-left: 5px;
  margin-top: 5px;
  text-align: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: white;

  /* box-shadow: 4px -2px 5px 0px rgba(167, 167, 167, 0.56); */
  width: var(--cluster-size);
  height: var(--cluster-size);
  background-color: #f8ab00;
}

.marker-cluster div span {
  line-height: var(--cluster-size);
}

.marker-cluster.medium div {
  --cluster-size: 38px;

  font-size: 15px;
  background-color: #f78b16;
}

.marker-cluster.large div {
  --cluster-size: 44px;

  font-size: 15px;
  background-color: #f5701e;
}

/* ENTRY PANEL */
.bazar-map-container .entry-container {
  position: relative;
  transition: all 0.3s;
  min-height: 50%;
  min-width: 400px;
  background-color: var(--neutral-light-color);
  padding: 0 0 1rem 1rem;
  overflow: auto;
}

.bazar-map-container .entry-container .btn-close i {
  padding-right: 1rem;
}

.facette-container.dynamic[data-filter-align='right']
  .bazar-map-container
  .entry-container {
  padding-left: 0;
  padding-right: 1rem;
}

.facette-container.dynamic:not([data-filter-align='right'])
  .bazar-map-container
  .entry-container
  .btn-close
  i {
  padding-right: 0;
}

.bazar-map-container .entry-container .btn-close {
  height: 5.4rem;
}

.bazar-map-container.small-width .entry-container {
  position: absolute;
  inset: 0;
  z-index: 1000;
}

.leaflet-container {
  font: inherit !important;
}

.leaflet-control-container .leaflet-bar.leaflet-control {
  border: none;
  margin-top: 10px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 30%);
}

.leaflet-control-container .leaflet-bar.leaflet-control a {
  font-size: 18px !important;
  font-weight: normal;
  text-indent: 0;
}

.leaflet-control-container .leaflet-control-zoom-fullscreen.fullscreen-icon {
  background-image: none;
}

.leaflet-control-container
  .leaflet-control-zoom-fullscreen.fullscreen-icon::before {
  content: '⇱';
  font-weight: 600;
}

/* ------------- */

/* POPUP TEMPLATE */

/* ------------- */
.popupentry-container {
  display: none;
}

.leaflet-popup-content .btn-popup-map {
  margin-top: 5px;
  font-size: calc(0.9 * var(--main-text-fontsize));
}

.leaflet-popup .popup-entry-content {
  font-size: 12px;
  max-height: 320px;
  overflow: auto;
  width: 320px;
  margin: 0;
  display: block;
  text-align: left;
  padding-right: 20px;
}

img.popup-visual {
  float: right;
  width: 200px;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  object-position: 50% 50%;
  margin-bottom: 5px;
  margin-left: 5px;
  max-width: 50%;
}

@media (width <= 380px) {
  .leaflet-popup-content,
  .leaflet-popup-content-wrapper,
  .leaflet-popup .BAZ_cadre_fiche,
  .BAZ_cadre_map {
    max-width: 95%;
  }

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

  .leaflet-container a.leaflet-popup-close-button {
    right: 5%;
  }
}

@media (width <= 310px) {
  .leaflet-popup-content {
    width: 200px !important;
  }
}
