.popup-wrapper .second-half {
  display: flex;
  flex-direction: column;
}

.popup-wrapper .second-half .location-summary {
  flex: 1 1 auto;
  margin-top: 10px;
  text-align: justify;
  overflow-y: hidden;
  line-height: 15px;
  min-height: 0; 
}

#leaders-map-page #menu .btn-text-p {
  font-size: 18px;
  font-weight: 100;
}
#leaders-map-page #menu .btn__text {
    width: 100%;
    display: flex;
    justify-content: center;
}

.popup-wrapper .second-half .third-popup-row {
  margin-top: auto;           
  flex-shrink: 0;            
  padding-top: 20px;
}

.mapboxgl-popup-content div.content {
  height: 33px;
  width: 98%;
  border-radius: 8px;
  background-color: #0d5a90;
  text-align: left;
  margin-top: 10px;
}

.popup-wrapper .summary * {
  font-weight: 100 !important;
}

.popup-wrapper .summary ul,
.popup-wrapper .summary ol {
  margin-left:40px;

}

.summary {
  height: 100%;
}

div.explore-button {
  border-color: #0d5a90;
}

.gagnant-block {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 10px;
}

.gagnant-icon {
  font-size: 20px;
  line-height: 1;
}

.gagnant-text {
  display: flex;
  flex-direction: column;
}

.gagnant-label {
  font-size: 18px;
  font-weight: 100;
  padding-bottom: 20px;
}

.gagnant-years {
  font-size: 16px;
  color: #6b6b6b;
}

.mapboxgl-ctrl, .mapboxgl-ctrl * {
  font-family: inherit !important;
}

.third-popup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.third-popup-row a.link-button {
  display: inline-block;
  margin-top: 0;
  padding: 6px 12px;
  white-space: nowrap;
}

.mapboxgl-popup-content a {
    width: 100px;
    display: block;
    padding-top: 11px;
    padding-bottom: 8px;
    border-radius: 6px;
    height: 16px;
    text-align: center;
    text-decoration: none;
    font-size: small;
    font-weight: normal;
    margin-bottom: 4px;
    margin-top: 23px;
    margin-left: -2px;
    background-color: #edeaea;
    color: #000000;
    border: 1px solid #d8eaf6;
    outline: none;
}

.mapboxgl-popup-content a.link-button {
  text-align: center;
}

.mapboxgl-popup-content a:hover {
  background-color: #d8eaf6;
  border-color: #d8eaf6;
  color: #0d5a90;
}

.third-popup-row {
  display: flex;
    align-items: center;
    justify-content: space-between; 
   gap: 10px;
     margin-top: 10px;
 }

 .third-popup-row a {
    display: inline-block;
    margin-top: 0; 
    display: flex;
    padding-left: 40px;
    padding-right: 40px;
    align-self: end;
  }  

   .third-popup-row a p{
    font-weight: 100;
   }
   
   .third-popup-row .gagnant {
    font-size: 14px;
    white-space: nowrap;
  }

i.fa {
  margin-left: 10px;
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
  border-bottom-color: #d8eaf6;
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
  border-top-color: #d8eaf6;
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
  border-right-color: #d8eaf6;
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
  border-left-color: #d8eaf6;
}

p.type {
  margin-left: 5px;
}

/* layers list */
#menu {
    display: grid;
    z-index: 2001;
    left: 10px;
    padding: 0;
    text-decoration: none;
    padding-top: 15px;
    text-transform: capitalize;
    font-size: 18px;
    text-align: left;
    top: 0;
    position: absolute;
}

.leaders-map-stack {
  position: relative
}

#menu a
 {
    box-sizing: border-box;
    height: 50px;
    width: 250px;
    justify-content: flex-start;
    border-radius: 100px;
    margin-bottom: 10px;
    color: #000000;
    padding: 7px;
    text-decoration: none;
    background-color: #ffffff;
    text-transform: capitalize;
    font-size: 16px;
    text-align: left;
    display: flex;
    flex-direction: row;
    align-items: center;
}

div.icon-border {
  border-radius: 4px;
  display: inline-block;
  border: 2px solid #ffbe0b;
  height: 24px;
  width: 24px;
}

#menu a#all span{
  margin-top: 5px;
}

#menu a.active {
  background-color: #d2ffff;
  color: #0d5a90;
}


.material-icons{
  color: #3c3a3a;
}


.map-overlay {
  position: absolute;
  bottom: 0;
  right: -9px;
  background: rgba(255, 255, 255);
  margin-right: 20px;
  font-family: "Roboto", sans-serif;
  overflow: auto;
  border-radius: 3px;
}

div#layers-custom-control
 {
    display: none;
}

.third-popup-row--link-only {
  justify-content: flex-end;
}

@media screen and (max-width: 1039px) and (min-width: 814px) {
  #menu {
    overflow-y: auto;
  }

  #menu a {
    font-size: 14px;
  }

  #menu img {
    width: 22px;
  }

}

@media screen and (max-width: 813px) and (min-width: 666px) {
  #menu a {
    font-size: 1.7vw;
    padding-top: 7px;
  }

  #menu img {
    position: relative;
    width: 17px;
    height: 21px;
    margin-left: 10px;
  }
}
@media screen and (max-width: 665px) and (min-width: 456px) {
  #menu {
    max-width: 30%;
    height: 300px;
    overflow-y: auto;
  }

  #menu a {
    font-size: 2vw;
  }

  #menu img {
    width: 30px;
    margin-top: 5px;
  }


}

@media screen and (max-width: 455px) and (min-width: 400px) {

  .mapboxgl-ctrl-geocoder mapboxgl-ctrl {
    width: 30%;
  }

  .mapboxgl-ctrl-geocoder {
    width: 25%;
    min-width: 175px;
  }

  #legend {
    margin-bottom: 110px;
  }
}

@media screen and (max-width: 399px) {
  #menu {
    /* display: flex; */
    position: absolute;
    width: 102%;
    height: 178px;
    top: 52%;
    left: -2px;
    overflow-y: scroll;
  }
  .mapboxgl-ctrl-geocoder mapboxgl-ctrl {
    width: 30%;
  }

  .mapboxgl-ctrl-geocoder {
    width: 25%;
    min-width: 175px;
  }
}

#leaders-info-accordion {
    border-bottom:2px solid black;
}

#leaders-info-accordion .header_content h2 {
  font-size:44px;
  padding-top:60px;
  padding-bottom:60px;
}

#leaders-info-accordion .accordion-section {
  max-width: 1200px;
  padding-bottom:0;
}

#leaders-info-accordion .accordion-section ul span {
  font-weight: 100!important;
}

#leaders-info-accordion .accordion-css__item-h3 {
  font-size:38px;
}

#leaders-map-page .sec_restez_connect {
  margin-top:30px;
}

#fixed-popup {
  position: fixed;
  inset: 0;               
  display: none;
  z-index: 2002;  
}

#fixed-popup.is-open { display: block; }

.fixed-popup__panel {
  position: absolute;
  top: calc(50% + 40px); 
  right: 40px;             
  transform: translateY(-50%);
  width: 700px;            /* match your .mapboxgl-popup-content width */
  max-width: min(96vw, 700px);
  height: 681px;           /* match your popup height */
  max-height: 80vh;
  overflow: hidden;
  border-radius: 25px;
  background: #fff;
}

/* inner content uses your existing popup styles */
.fixed-popup__content {
  height: 100%;
  padding: 30px;
  max-height: -moz-available;          
  max-height: -webkit-fill-available; 
  max-height: fill-available;
}

/* close button */
.fixed-popup__close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 34px;
  line-height: 1;
  border: 0;
  background: transparent;
  cursor: pointer;
}

/* Reuse your existing popup content rules, but target the fixed panel: */
.fixed-popup__content .popup-wrapper { 
  height: 100%; 
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.fixed-popup__content .location-image { height: 100%; }
.fixed-popup__content .first-half, 
.fixed-popup__content .second-half { 
  height: 50%; 
}

.fixed-popup__content .second-half .title > span {
    display: flex;
    align-items: center;
    font-weight: 100;
}

#map {
  height: 100%;
  width: 100%;
}

#menu > a > img{
  width: 30px;
  height: auto;
  margin-left:5px;
}

#menu > a > span {
    margin-left:10px;
}

.marker-icon,
.marker-text {
  vertical-align: middle;
  display: inline-block;
  margin-left: 2px;
}

.marker-text {
  font-size: 20px;
  font-weight: bold;
  margin-right: 8px;
}
.marker {
  height: 20px;
  border-radius: 4px;
  width: 20px;
  opacity: 1;
  cursor: pointer;
  background-repeat: round;
  border: none !important;
}

.marker-inner {
  background-size: cover;
  border-radius: 4px;
  cursor: pointer;
  transition:
    transform 0.18s ease-out,
    box-shadow 0.18s ease-out,
    background-color 0.18s ease-out;
  transform-origin: center center;
}

.marker:hover .marker-inner {
  transform: scale(1.5); 
}

.selectedMarker {
  background-size: cover;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  opacity: 0.8;
  cursor: pointer;
}

.mapboxgl-popup {
    max-width: none!important;
    width: fit-content!important;
}

.mapboxgl-popup-tip {
    display: none!important;
}

.mapboxgl-popup-close-button {
  float: right!important;
  right: 30px!important;
  font-size: 50px!important;
  cursor: pointer!important;
  margin-top: 15px!important;
  padding: 0!important;
  font-family: math;
}

.mapboxgl-popup-close-button:focus-visible {
    outline:0!important;
}


div.first-first-row > div{
    color: #000;
    font-size: 18px;
    font-style: normal;
    font-weight: 100;
    line-height: normal;
    margin-bottom:30px;
}

.mapboxgl-popup-tip {
  margin-left: 1%;
}

.popup-wrapper {
    height:100%;
}

.first-popup-row {
    height: calc(100% - 60px);
}

.location-image {
    height:100%;
}

.location-image img {
    border-radius: 25px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.first-half,.second-half {
    height:50%;
}

.popup-wrapper .title {
    font-size: 32px;
    line-height: 34px; /* 106.25% */
    display: flex;
}

.mapboxgl-popup-content
 {
    width: 796px;
    height: 681px;
    font: 16px / 14px "Roboto", sans-serif;
    border: none;
    border-radius: 25px!important;
    background-color: #ffffff;
    color: #000000;
    text-align: left;
    padding: 30px !important;
}

.mapboxgl-popup-content img {
  width: 100%;
  height:100%;
  padding: 0;
  margin-top: 0;
  border-radius: 25px;
  object-fit: cover;
}

.mapboxgl-popup-content div.type {
  margin-top: 3px;
}

div.title{
  font-weight: bold;
}

div.title > span > img{
    margin-left: 2px;
    width: 30px;
    margin-right: 10px;
}

p.summary{
  color: #000000;
  font-size: 16px;
}

#leaders-info-accordion ul{
  list-style-type: disc;
}

#leaders-info-accordion .accordion-section {
  margin-bottom: 30px;
}

@media (max-width: 900px) {
  .fixed-popup__panel { right: 2vw; width: 92vw; }
}

@media (max-width: 640px) {
  #leaders-info-accordion .accordion-css__item-top {
    height: auto;                 /* kill the fixed 30px */
    min-height: 60px;             /* optional, just to keep a nice pill */
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    align-items: center;          /* keep the + icon vertically centered */
  }

  #leaders-info-accordion .accordion-css__item-h3 {
    flex: 1;                      /* take full row width */
    white-space: normal;          /* allow wrapping */
    line-height: 1.25;
    font-size:20px;
  }

  #leaders-info-accordion .header_content {
    display: none;
  }
}

/* container under the map (mobile only) */
#leaders-map-detail {
  display: none;
}

@media (max-width: 767px) {
  #leaders-map-detail {
    display: block;
    padding: 24px 16px 40px;
  }

  .leaders-detail-card {
    position: relative;
    background: #ffffff;
    border-radius: 25px;
    max-width: 640px;
    margin: 0 auto;
    padding: 24px;
  }

  .leaders-detail-card__close {
    position: absolute;
    right: 20px;
    top: 16px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
  }

  .leaders-detail-card .popup-wrapper {
    height: auto;
  }

  .popup-wrapper .second-half {
    margin-top: 30px;
  }

  .gagnant-years {
    flex-wrap: nowrap;
    flex-direction: column;
    gap: 4px;          /* vertical gap between rows */
  }

  .gagnant-year {
    display: inline-flex;
    align-items: center;
    width: 100%;       /* optional, makes each row full width */
  }

  #leaders-map-page #menu .btn-text-p {
    font-size: 14px;
  }
}