.map-menu.map-side__panel {
  max-width: 25vw;
  padding: 15px;
  overflow-y: scroll;
  max-height: 100vh;
}

.hidden{
  display: none !important;
}

.overflow-none{
  overflow: hidden !important;
}

.map-componnent.map-wrapper {
  display: flex;
  flex-direction: row;
  position: relative;
  overflow:hidden;
}

.eib-section.mapComponent__component {
  padding: 5px;
}

/* Map Wrapper */
.map-wrapper {
  display: flex;
  height: 82vh;
  background-color: white;
}
.map-componnent .map-container{
  width:100%;
  height:100vh;
  position: initial !important;
  background-color: #f7f7f7;
}

/* Side Menu Styling */
.map-componnent .map-menu.map-side__panel {
  background-color: #f7f7f7;
  min-width: 25vw;
  padding: 20px;
  height: 100%;
  overflow-y: auto;
  transition: transform 0.3s ease;
  z-index: 401;
  left: 10px;
}

.map-componnent .map-menu h2 {
  color: #2f80ed;
  text-transform: uppercase;
  font-size: 1.2rem;
}

.map-componnent .filter-wrapper {
  margin-bottom: 20px;
}

.map-componnent label {
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
  display: block;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.map-componnent input[type="text"],
.map-componnent input[type="range"],
select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: white;
  font-size: 14px;
}

/* Customizing Checkboxes */

/* Custom Checkbox Wrapper */


.map-side__panel .range_container {
  position: relative;
  padding: 20px;
  width: 100%;
}

.map-side__panel .sliders_control {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.map-side__panel  input[type="range"] {
  -webkit-appearance: none;
  height: 8px;
  outline: none;
  margin: 0 10px;
  position: relative;
  z-index: 2;
  background: none;
  border: 0;
  }


.map-side__panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #2f80ed;
  cursor: pointer;
  border-radius: 50%;
}

.map-side__panel  input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #2f80ed;
  cursor: pointer;
  border-radius: 50%;
}

.map-side__panel .slider-tooltip {
  position: absolute;
  top: -30px;
  font-size: 14px;
  color: #333;
  padding: 4px 8px;
  background-color: #f1f3f5;
  border-radius: 4px;
  transform: translateX(-50%);
}

.map-side__panel #toSliderTooltip {
  right:-30px;
}

.map-side__panel .range-background-track {
  position: absolute;
  top: 35%;
  left: 0;
  right: 0;
  height: 8px;
  background-color: #bbbbbb; 
  z-index: 1; 
  border-radius: 5px;
  transform: translateY(-50%); 
}

.map-side__panel .range-track {
  position: absolute;
  top: 50%;
  height: 8px;
  background-color: #2f80ed; 
  z-index: 2;
  border-radius: 5px;

}
/*------------------------------------------------*/

.map-componnent .fa-search {
  position: absolute;
  right: 20px;
  top: 21px;
  color: #2f80ed;
}





.checkbox-wrapper label {
    cursor: pointer;
}

/* Toggle Button */
.map-componnent .toggle-menu-btn {
  position: absolute;
  left: 20px;
  top: 20px;
  background-color: #2f80ed;
  color: white;
  border: none;
  padding: 1.6rem 2.4rem;
  cursor: pointer;
  border-radius: 14.8rem;
  z-index: 999;
  margin-left: 23vw;
  transition: all 0.4s cubic-bezier(0.25, 0.1, 0.2, 1);
  font-size:1.6rem;
}
.map-componnent .toggle-menu-btn::hover {
  color: rgb(255, 255, 255);
  background-color: rgb(47, 128, 237);
}  
.map-componnent .map-menu__closed.toggle-menu-btn {
    margin-left: 30px;
}

.map-componnent .toggle-menu-btn:hover {
  background-color: #1367ce;
}

.map-componnent .leaflet-control-container{
    position : initial;
}

/* Responsive Behavior */
@media (max-width: 768px) {
  .map-menu.map-side__panel {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 1000;
    width: 60vw;
  }

  .map-menu.show {
    transform: translateX(0);
  }

  .toggle-menu-btn {
    top: 10px;
    left: 10px;
  }
}

/* Map container*/
.map-container{
    width:100%!important;
}

.leaflet-popup-content ul{
  list-style: none;
}

.leaflet-popup-content .map-country__flag{
  font-size: 28px;
}


.map-componnent  .range-slider-container {
  position: relative;
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-componnent .slider-track {
  position: absolute;
  height: 5px;
  background: #007bff;
  border-radius: 5px;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  width: 100%;
  z-index: 1;
}

.map-componnent input[type="range"] {
  position: absolute;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;
  z-index: 2;
}

.map-componnent input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #007bff;
  border-radius: 50%;
  pointer-events: auto;
  cursor: pointer;
}

.map-componnent .range-values {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 14px;
  margin-top: 10px;
}

.leaflet-popup-content .scrollable-content{
overflow-x: hidden;
scrollbar-width: thin;
overflow-y: auto;
max-height: 350px;
}

.map-componnent .number-col {
display: flex;
flex-direction: column;
min-width: 100px;
margin-top: 10px;
}

.map-componnent .number-label {
font-weight: 500;
margin-bottom: 4px;
font-family: Roboto;
font-style: normal;
font-size: 12px;
line-height: 14px;
letter-spacing: 1px;
text-transform: uppercase;
}

.map-componnent .number-value {
font-size: 15px;
font-weight: bold;
text-align: left;
}

.map-componnent .fixed-popup {
position: absolute;
top: 60px;
right: 10vw;
width: 350px;
background: white;
padding: 15px;
z-index: 1000;
overflow-y: auto;
max-height: 300px;
background-clip: border-box;
box-shadow: 0px 4px 0px 0px rgba(204, 204, 204, 0.7);
-webkit-box-shadow: 0px 4px 0px 0px rgba(204, 204, 204, 0.7);
border: 1px solid #cccccc;
}

.map-componnent .fixed-popup.hidden {
display: none;
}

.map-componnent h6{
font-family: Roboto;
font-size: 14px;
font-style: normal;
font-weight: 500;
}
.map-componnent h6 a{
font-family: Roboto;
font-size: 14px;
font-style: normal;
font-weight: 500;
color: #2f80ed;
}
.map-componnent h6 a::after {
  margin-top:0!important;
  margin-left:6px;
}

.map-componnent .scrollable-content .popup-title{
margin-bottom:10px;
}
.map-componnent .scrollable-content .popup-title .info-icon{
float:right;
}
.map-popup-panel span {
font-size: 1.3rem;
color:#2F80ED;
}
.map-popup-panel .sub-section{
font-size: 1.3rem !important;
line-height: normal !important;
}
.map-popup-panel {
position: absolute;
top: 60px;
right: 200px;
width: 350px;
background: white;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.15);
z-index: 1000;
padding: 1rem;
padding-left: 2rem;
max-height: 70vh;
overflow-y: auto;
transition: all 0.3s ease;
display: none;
}

.map-popup-panel.active {
display: block;
}

.map-popup-panel .close-btn {
position: absolute;
top: 5px;
right: 10px;
cursor: pointer;
font-weight: bold;
font-size: 16px;
z-index: 1000;
}

.map-popup-panel .sector-wrapper{
font-size: 14px;
display: flex;
flex-direction: row;
justify-content: space-between;
}

.map-popup-panel .sector-label {
flex: auto;
font-family: Roboto;
font-size: 14px;
font-weight: 500;
}

.map-popup-panel .sector-value {
font-weight: 400;
}

.map-popup-panel .flex-wrapper a{
  font-size: 14px;
  font-weight: 500;
  margin-top: 7px;
  margin-bottom: 10px;
  margin-left: 90px;
}

.map-popup-panel .recent-signature, .map-popup-panel .media-card{
font-size: 16px;
font-weight: normal;
padding: 15px;
border-radius: 4px;
margin-bottom: 10px;
box-shadow: 0px 4px 0px 0px rgba(204, 204, 204, 0.7);
-webkit-box-shadow: 0px 4px 0px 0px rgba(204, 204, 204, 0.7);
border:1px solid #ccc;
}
.map-popup-panel .project-title, .map-popup-panel .media-title{
font-weight: 700;
color:#0e2031;
line-height: 100%;
line-clamp: 2;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
text-overflow: ellipsis;
display: -webkit-box;
overflow: hidden;
}

.map-popup-panel .project-date, .map-popup-panel .media-date{
color:#ababab;
font-weight: 700;
}

.map-popup-panel .project-description, .map-popup-panel .media-description{
max-height: 120px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
line-clamp: 3;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
}
.map-popup-panel .flex-wrapper{
display: flex;
}

.map-popup-panel img.meta-icon {
  width: 30px;
}

.page-map-office #mapLegend, .page-map-passa #mapLegend{
  display: none;
}

#mapLegend {
position: absolute;
bottom: 1rem;
right: 1rem;
max-width: 170px;
background: rgba(255, 255, 255, 0.95);
padding: 1rem;
border-radius: 0.5rem;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
font-family: "Segoe UI", Roboto, sans-serif;
font-size: 12px;
color: #333;
z-index: 1000;
}

#mapLegend h3 {
margin: 0 0 0.5rem;
font-size: 1.3rem;
font-weight: 600;
color: #0074D9;
}


#mapLegend ul {
list-style: none;
padding: 0;
margin: 0;
}


#mapLegend li {
display: flex;
align-items: center;
margin-bottom: 0.5rem;
}


#mapLegend .marker {
flex-shrink: 0;
width: 16px;
height: 16px;
margin-right: 0.5rem;
border-radius: 50%;
border: 1px solid #ccc;
background-color: #eee;
}


#mapLegend .legend-marker-1 { background-color: #0074D9; }
#mapLegend .legend-marker-2 { background-color: #FF4136; }
#mapLegend .legend-marker-3 { background-color: #2ECC40; }
#mapLegend .legend-marker-4 { background-color: #FF851B; }


#mapLegend li:hover {
background: rgba(0, 0, 0, 0.03);
cursor: pointer;
}

#mapLegend .legend-label {
font-size: 1.3rem;
}

/*------------------------------------------Offices merge-------------------------------------------  */
.map-js-component{
min-width: 100%;
min-height: 80vh;
}

/* General text styling */
.map-js-component  p {
color: #333;
font-family: 'Roboto', sans-serif;
font-size: 18px;
font-style: normal;
font-weight: 500;
}

.map-js-component p a {
color: #2f80ed !important;
}

.gapfund-map p a {
color: #05a880 !important;
}

.page-map-gapfund header.header__landing,.page-map-gapfund div#mapMenu,.page-map-gapfund button#toggleMenuBtn, .page-map-gapfund #mapLegend, .page-map-gapfund footer{
  display: none!important;
}

.page-map-gapfund .eib-section.mapComponent__component{
  height:695px;
}

.map-js-component h2 {
color: #0e2031;
font-family: 'Alegreya Sans';
font-size: 28px;
font-style: normal;
font-weight: 600;
line-height: 34px;
}

/* Custom styling for Leaflet controls */
.map-js-component .leaflet-touch .leaflet-bar, .map-js-component .leaflet-touch .leaflet-control-layers {
border: 2px solid #fff;
border-radius: 10px;
}

/* Zoom control position */
.map-js-component .leaflet-control-zoom {
right: 10px !important;
left: auto !important;
border-radius: 6px;
background-color: #2F80ED;
width:34px;
}

.gapfund-map .leaflet-control-zoom {
background-color: #05a880;
}

.map-js-component .leaflet-control-zoom a {
color:#2f80ED;
background-color:#fcfcfc
}

.gapfund-map .map-js-component .leaflet-control-zoom a {
color:#05a880;
}

/* Button styling */
.map-js-component .eib-button--icon-with-text-footer {
  font-family:Roboto, sans-serif;
  color: #fff!important;
  background-color: #2f80ed;
  border: 5px solid #2f80ed;
  transition: none;
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.6rem 1.4rem !important;
  overflow: hidden;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  vertical-align: middle;
  border-radius: 14.8rem;
}

.map-js-component .eib-button--icon-with-text-footer:hover {
color: #2F80ED !important;
background-color: #fff;
}
.map-js-component .eib-button--icon-with-text-footer:hover em {
color: #2F80ED !important;
}
.map-js-component .eib-button--icon-with-text-footer em {
color: #fff !important;
}

.map-js-component .eib-button .fa {
margin: 0 0 0 1.2rem;
}

.map-js-component .eib-button--icon-with-text-footer:hover {
color: #2f80ed !important;
text-decoration: none;
}

.map-js-component .eib-button--icon-with-text-footer:hover em {
transform: translateX(4px) !important;
}

/* Popup styling */
.map-js-component .leaflet-container a.leaflet-popup-close-button {
font: 32px/30px Tahoma, Verdana, sans-serif;
}

.map-js-component .leaflet-touch .leaflet-bar a {
height: 30px;
line-height: 30px;
width: 30px;
background-color: #2f80ed;
color: white;
border-radius: 3px;

}

.gapfund-map .map-js-component .leaflet-touch .leaflet-bar a {
background-color: #05a880;
}


.map-js-component h2>i {
font-size: 28px!important;
color: #2f80ed;
margin-right: 20px!important;
}

.map-js-component p i {
font-size: 15px!important;
color: gray;
margin-right: 20px!important;
}

@media only screen and (max-width: 375px) {
.map-js-component .leaflet-popup-content {
  margin: 6px !important;
}
}

.map-js-component .leaflet-popup-content-wrapper {
border-radius: 12px;
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.15);
}

.map-js-component .leaflet-popup-tip-container .leaflet-popup-tip {
background: #ffffff;
}

.map-js-component h2 {
font-family: 'Alegreya Sans'!important;
font-weight: bold;
margin-bottom: 0!important;
}

.map-js-component p {
font-size: 14px!important;
line-height: 1.5!important;
margin-bottom: 12px!important;
}

.map-js-component p.contact-info__mail {
  margin-bottom: 5px!important;
}

.map-js-component p.contact-info__phone {
  margin-top: 0!important;
}

.map-js-component .leaflet-popup-content-wrapper {
background-color: #ffffff;
color: #333333;
}

.map-js-component .leaflet-container a.leaflet-popup-close-button {
font-size: 30px!important;
color: #888888;
top: 12px;
right: 12px;
}

.map-js-component .leaflet-popup-content-wrapper {
animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.map-js-component .info-icon.flag-icon{
margin-left:15px;
}

.map-js-component .leaflet-popup-content p:first-of-type {
margin: 0 !important;
font-size: 13px !important;
color: #898989;
}
.map-js-component .leaflet-control-container .leaflet-top.leaflet-left{
right: 0 !important;
left: auto;
}


.menu-map-button {
top: 20px;
left: 20px;
z-index: 1001;
background-color: #2F80ED;
color: white;
border: none;
border-radius: 30px;
padding: 16px 24px;
cursor: pointer;
font-size: 16px;
font-family: Roboto, sans-serif;
position: absolute;
}
.menu-map-button i{
margin-right:10px;
}
/* Left menu styling */
.left-map-menu {
position: absolute;
top: 0;
left: 0;
width: 250px;
height: 100%;
border-right: 2px solid #ccc;
padding: 20px;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
z-index: 1000;
overflow-y: auto;
display: flex;
flex-direction: column;
background: #f7f7f7;
}

.left-map-menu h3 {
margin-bottom: 20px;
color: #333;
}

.left-map-menu  .checkbox-group{
margin-top: 15vh;
}

.left-map-menu  .checkbox-group label {
display: block;
margin-bottom: 10px;
font-family: 'Roboto', sans-serif !important;
font-weight: bold;
display: flex;
cursor:pointer;
}

.left-map-menu .checkbox-group input[type="checkbox"] {
margin-right: 10px;
margin-top: 0;
}

@media only screen and (max-width: 768px) {
    .left-map-menu {
    display: none;
}
}

/* Hide the default checkbox */
.left-map-menu input {
cursor: pointer;
}

.left-map-menu  .checkbox-group label{
font-family: Roboto;
font-size: 12px;
font-weight: 500;
line-height: 20px;
word-break: break-word;
margin-bottom: 5px;
margin-top: 15px;
}

.left-map-menu input[type="checkbox"] {
display: inline-block;
vertical-align: middle;
margin: 5px;
cursor: pointer;
}
.left-map-menu  input[type="checkbox"]:before {
display: inline-block;
content: '';
left: -1px;
top: 0px;
width: 16px;
height: 16px;
border: 2px solid #2f80eb4f;
background: #f7f7f7;
vertical-align: middle;
padding: 0px;
margin-right: 10px;
text-align: center;
}

.left-map-menu input[type="checkbox"]:checked:before {
background: #2f80ed;
outline: 2px solid #2f80eb4f;
border: 3px solid #f7f7f7;
}


/* FILTER  */
.map-side__panel .filter-wrapper {
margin-bottom: 25px;
padding-bottom: 10px;
border-bottom: 1px solid #e1e1e1;
}

.map-side__panel .custom-dropdown,
.map-side__panel .custom-multiselect {
position: relative;
font-family: 'Roboto', sans-serif;
}

.elena-sector-custom-dropdown {
  width: 100%;
}

.elena-sector-custom-dropdown .dropdown-toggle {
  width: 100%;
  text-align: left;
}

.elena-sector-custom-dropdown .dropdown-options {
  max-height: 320px;
  overflow-y: auto;
}

.elena-sector-custom-dropdown .dropdown-group-title {
  padding: 12px 16px 8px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #555;
  background: #f5f5f5;
  pointer-events: none;
}

.elena-sector-custom-dropdown
  .dropdown-group-title:not(:first-child) {
  margin-top: 8px;
  border-top: 1px solid #ddd;
}

.elena-sector-custom-dropdown .dropdown-error {
  padding: 12px 16px;
}

/* DROPDOWN BUTTON */
.map-side__panel .dropdown-toggle,
.map-side__panel .multiselect-input {
display: flex;
align-items: center;
justify-content: space-between;
background-color: white;
border: 1px solid #ddd;
padding: 10px 12px;
font-size: 14px;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease-in-out;
}

.map-side__panel .dropdown-toggle:hover,
.map-side__panel .multiselect-input:hover {
border-color: #2f80ed;
}

/* SEARCH INSIDE MULTISELECT */
.map-side__panel .multiselect-input input[type="text"] {
flex-grow: 1;
border: none;
outline: none;
padding: 0 5px;
font-size: 14px;
background: transparent;
}

/* DROPDOWN OPTIONS CONTAINER */
.map-side__panel .dropdown-options,
.map-side__panel .multiselect-dropdown {
display: none;
position: absolute;
z-index: 10;
background: white;
border: 1px solid #ccc;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
padding: 10px;
max-height: 250px;
overflow-y: auto;
width: 100%;
margin-top: 5px;
}

.map-side__panel .dropdown-options.show,
.map-side__panel .multiselect-dropdown.show {
display: block;
}

/* CHECKBOX WRAPPERS */
.map-side__panel .checkbox-wrapper {
display: flex;
align-items: center;
margin-bottom: 8px;
font-size: 14px;
color: #333;
border-bottom: 1px solid lightgray;
padding-bottom: 10px;
}

.map-side__panel .checkbox-wrapper input[type="checkbox"] {
margin-right: 10px;
accent-color: #2f80ed;
cursor: pointer;
}

.map-side__panel .checkbox-wrapper label {
cursor: pointer;
flex-grow: 1;
margin-bottom: 0;
margin-top: 5px;
}

.map-side__panel .clear-filters-btn {
position: relative;
display: inline-flex;
align-items: center;
padding: 0.5em 1em 0.5em 2.5em;
font-size: 0.9rem;
font-weight: 500;
color: #333;
background: #f5f5f5;
border: 1px solid #ccc;
border-radius: 0.25rem;
cursor: pointer;
transition: background 0.2s, border-color 0.2s;
float: right;
z-index: 2;
}

.map-side__panel .clear-filters-btn::before {
content: "\f05c";                  
font-family: "Font Awesome 6 Pro";
font-weight: 900;
position: absolute;
left: 0.75em;
top: 50%;
transform: translateY(-50%);
font-size: 1.1em;
color: #d33;
}

.map-side__panel .clear-filters-btn:hover {
background: #eaeaea;
border-color: #999;
}

.map-side__panel .clear-filters-btn:active {
background: #ddd;
border-color: #888;
}

/* SELECTED FILTER TAGS */
.map-side__panel .selected-options {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 8px;
justify-content: end;
}

.map-side__panel .selected-options .tag {
background-color: #2f80ed;
color: white;
border-radius: 12px;
padding: 4px 10px;
font-size: 12px;
line-height: 1.4;
cursor: pointer;
transition: background 0.2s ease;
}

.map-side__panel .selected-options .tag:hover {
background-color: #1367ce;
}

.map-side__panel .slider-wrapper {
position: relative;
padding: 10px 0;
height: 40px;
margin-bottom: 1rem;
}

.map-side__panel .slider-wrapper input[type="range"] {
position: absolute;
width: 100%;
height: 2px;
background: transparent;
pointer-events: none;
appearance: none;
-webkit-appearance: none;
}

.map-side__panel .slider-wrapper input[type="range"]::-webkit-slider-thumb {
pointer-events: all;
width: 16px;
height: 16px;
background: #2f80ed;
border-radius: 50%;
border: none;
cursor: pointer;
-webkit-appearance: none;
}

.map-side__panel .range-labels {
display: flex;
justify-content: space-between;
font-size: 13px;
color: #333;
margin-top: 15px;
}
.map-side__panel .range-slider-track {
position: absolute;
height: 3px;
top: 50%;
transform: translateY(-50%);
background-color: #2f80ed;
z-index: 1;
border-radius: 4px;
margin-left: 10px;
}

/* Gapfund CUSTOM HOVER */
.gf-tooltip-wrapper {
  background: transparent;
  border: none;
  box-shadow: none;
}

.gf-tooltip {
  background: #ffffff;
  color: #1a1a1a;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.3;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-width: 220px;
  white-space: normal;
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transform: none;
}


.gf-tooltip strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.gf-tooltip span {
  font-size: 12px;
  color: #666;
}

.gf-tooltip {
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.leaflet-tooltip.gf-tooltip-wrapper {
   transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
  white-space: normal !important;
  width: 220px;
  padding-bottom:0;
}

.leaflet-tooltip.gf-tooltip-wrapper.leaflet-tooltip-open {
  transform: translateY(0);
}

.page-map-gapfund .map-componnent.map-wrapper{
  height: 100%;
}

/* SEARCH FILTER ICON POSITION */
.map-side__panel .filter-wrapper[data-filtername="mapFilterInput"] {
position: relative;
}

.map-side__panel .filter-wrapper[data-filtername="mapFilterInput"] i.fa-search {
position: absolute;
right: 12px;
top: 45%;
transform: translateY(-50%);
color: #2f80ed;
}

.map-side__panel .filter-icon {
  width: 20px;
}

/* DROPDOWN ARROW */
.map-side__panel .multiselect-input .arrow {
margin-left: auto;
font-size: 12px;
color: #2f80ed;
}

@media only screen and (max-width: 576px) {
  .map-wrapper {
    flex-direction: column;
    height: auto;
  }

  .map-menu.map-side__panel {
    width: 100vw;
    max-width: 100%;
    height: auto;
    padding: 10px;
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-100%);
  }

  .map-menu.show {
    transform: translateX(0);
  }

  .map-container {
    height: 60vh !important;
  }

  .toggle-menu-btn {
    top: 10px;
    left: 10px;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    margin-left: 0;
  }

  .fixed-popup, .map-popup-panel {
    width: 90vw;
    right: 5vw;
  }

  .left-map-menu {
    width: 100vw;
    height: auto;
    padding: 10px;
    position: static;
  }
}
@media only screen and (max-width: 768px) {
  .map-wrapper {
    flex-direction: column;
  }

  .map-menu.map-side__panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 60vw;
    z-index: 1000;
    transform: translateX(0); 
    padding: 15px;
  }

  .map-menu.map-side__panel.hide {
    transform: translateX(-100%);
  }

  .toggle-menu-btn {
    top: 10px;
    left: 10px;
    margin-left: 0;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
  }

  .fixed-popup, .map-popup-panel {
    width: 80vw;
    right: 10vw;
  }

  .map-container {
    height: 70vh !important;
  }

  .toggle-menu-btn {
    font-size: 1.4rem;
    margin-left: 0;
  }
}
@media only screen and (max-width: 1024px) {
  .map-menu.map-side__panel {
    max-width: 30vw;
    padding: 15px;
  }

  .map-container {
    height: 75vh;
  }

  .toggle-menu-btn {
    margin-left: 25vw;
  }

  .fixed-popup, .map-popup-panel {
    width: 290px;
    left: 5px;
  }
}
@media only screen and (max-width: 425px) {
  /* Hide Side Panel */
  .map-menu.map-side__panel,
  .left-map-menu {
    display: none !important;
  }

  /* Hide Map Legend */
  #mapLegend {
    display: none !important;
  }
  .map-componnent.map-wrapper #toggleMenuBtn{
    display: none !important;
  }
}


/* ==========================================================================
   MINI STYLE MAP
   ========================================================================== */
.map-wrapper--mini-style,
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"]) {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dce6f2;
  border-radius: 10px;
}

/* Mini map should fill its parent, not force 100vh */
.map-wrapper--mini-style .map-container,
.map-container--mini-style,
.map-container--mini-style.leaflet-container,
.map-componnent .map-container[data-mapstyle*="miniStyle"] {
  width: 100% !important;
  height: 100% !important;
  min-height: 95vh;
  position: relative !important;
  background: #ffffff !important;
}

/* Hide map UI for mini embeds */
.map-wrapper--mini-style .map-menu,
.map-wrapper--mini-style .map-side__panel,
.map-wrapper--mini-style #toggleMenuBtn,
.map-wrapper--mini-style .toggle-menu-btn,
.map-wrapper--mini-style .menu-map-button,
.map-wrapper--mini-style #mapLegend,
.map-container--mini-style .leaflet-control-container,
.map-container--mini-style .leaflet-control-zoom,
.map-container--mini-style .leaflet-control-attribution {
  display: none !important;
}

/* Keep tile layer visible: this is what shows countries with no data */
.map-container--mini-style .leaflet-tile-pane,
.map-container--mini-style .leaflet-tile-container,
.map-container--mini-style .leaflet-tile,
.map-container[data-mapstyle*="miniStyle"] .leaflet-tile-pane,
.map-container[data-mapstyle*="miniStyle"] .leaflet-tile-container,
.map-container[data-mapstyle*="miniStyle"] .leaflet-tile {
  display: block !important;
  visibility: visible !important;
}

/* Make the base map soft and white/light, close to a Datawrapper-like embed */
.map-container--mini-style .leaflet-tile-pane {
  opacity: 0.58 !important;
  filter: grayscale(1) saturate(0) contrast(0.82) brightness(1.35);
}

/* Transparent panes over the white map background */
.map-container--mini-style .leaflet-map-pane,
.map-container--mini-style .leaflet-pane,
.map-container--mini-style .leaflet-overlay-pane,
.map-container--mini-style .leaflet-marker-pane,
.map-container--mini-style .leaflet-shadow-pane,
.map-container--mini-style .leaflet-popup-pane {
  background: transparent !important;
}

/* Cleaner SVG country overlay */
.map-container--mini-style .leaflet-overlay-pane svg {
  shape-rendering: geometricPrecision;
}

.map-container--mini-style .leaflet-interactive {
  cursor: pointer;
  transition:
    fill-opacity 0.16s ease,
    stroke-width 0.16s ease,
    filter 0.16s ease;
}

/* Prevent global media rules from breaking Leaflet */
.map-container--mini-style .leaflet-pane,
.map-container--mini-style .leaflet-map-pane,
.map-container--mini-style .leaflet-tile,
.map-container--mini-style .leaflet-marker-icon,
.map-container--mini-style .leaflet-marker-shadow,
.map-container--mini-style .leaflet-tile-container,
.map-container--mini-style .leaflet-pane > svg {
  max-width: none;
}

/* ==========================================================================
   Video series popup for mini map
   ========================================================================== */

.map-wrapper--mini-style .map-popup-panel {
  top: 50%;
  right: 2rem;
  left: auto;
  transform: translateY(-50%);
  width: min(420px, calc(100% - 4rem));
  max-height: calc(100% - 4rem);
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dce6f2;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(14, 32, 49, 0.24);
}

.map-wrapper--mini-style .map-popup-panel.active {
  display: flex;
  flex-direction: column;
}

.map-wrapper--mini-style .map-popup-panel .close-btn {
  top: 1.1rem;
  right: 1.2rem;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #0e2031;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dce6f2;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(14, 32, 49, 0.12);
}

.map-wrapper--mini-style .map-popup-panel .close-btn:hover {
  color: #2f80ed;
  border-color: #2f80ed;
}

/* The popup background now wraps ALL content */
.videoseries-popup {
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: rgba(14, 32, 49, 0.35) transparent;
}

.videoseries-popup::-webkit-scrollbar {
  width: 8px;
}

.videoseries-popup::-webkit-scrollbar-thumb {
  background: rgba(14, 32, 49, 0.28);
  border-radius: 999px;
}

/* Header area */
.videoseries-popup__header {
  position: relative;
  display: block;
  margin-left: 2.4rem;
  margin-right: 2.4rem;
  margin-top: 1.8rem;
}

.videoseries-popup__header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #2f80ed;
}

.videoseries-popup__meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 3rem 1.2rem 0;
}

.videoseries-popup .flag-icon {
  width: 3.2rem;
  height: 2.2rem;
  margin: 0;
  flex: 0 0 auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(14, 32, 49, 0.08);
}

.videoseries-popup__country {
  color: #0e2031;
  font-family: Roboto, sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.videoseries-popup__project {
  margin: 0 0 1rem;
  color: #0e2031;
  font-family: "Alegreya Sans", Roboto, sans-serif;
  font-size: clamp(2.1rem, 2vw, 2.7rem);
  font-weight: 700;
  line-height: 1.08;
}

.videoseries-popup__description {
  margin-left: 2.4rem !important;
  margin-right: 2.4rem !important;
  color: #24384c;
  font-family: Roboto, sans-serif;
  font-size: 1.35rem;
  line-height: 1.55;
}

/* Remove empty content gap if template keeps this element empty */
.videoseries-popup__content:empty {
  display: none;
}

/* Video section */
.videoseries-popup__video {
  position: relative;
  width: calc(100% - 4.8rem);
  margin: 2rem 2.4rem 1.6rem;
  padding-bottom: calc((100% - 4.8rem) * 0.5625);
  overflow: hidden;
  border-radius: 12px;
  background: #0e2031;
  box-shadow: 0 10px 24px rgba(14, 32, 49, 0.18);
}

.videoseries-popup__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* CTA */
.videoseries-popup .call-to-action {
  float: none;
  margin: 0;
  padding: 0 2.4rem 2.2rem;
}

.videoseries-popup .eib-button.eib-button--icon-with-text-footer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 4.2rem;
  padding: 0.9rem 1.7rem !important;
  color: #ffffff !important;
  background: #2f80ed;
  border: 2px solid #2f80ed;
  border-radius: 999px;
  font-family: Roboto, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(47, 128, 237, 0.22);
}

.videoseries-popup .eib-button.eib-button--icon-with-text-footer:hover,
.videoseries-popup .eib-button.eib-button--icon-with-text-footer:focus {
  color: #2f80ed !important;
  background: #ffffff;
  text-decoration: none;
}

.videoseries-popup .eib-button.eib-button--icon-with-text-footer em {
  margin-left: 0.4rem;
  transition: transform 0.18s ease;
}

.videoseries-popup .eib-button.eib-button--icon-with-text-footer:hover em {
  transform: translateX(4px);
}

/* Mobile */
@media only screen and (max-width: 576px) {
  .map-wrapper--mini-style,
  .map-container--mini-style,
  .map-componnent .map-container[data-mapstyle*="miniStyle"] {
    min-height: 420px;
  }

  .map-wrapper--mini-style .map-popup-panel {
    top: auto;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    width: auto;
    max-height: 78%;
    transform: none;
    border-radius: 14px;
  }

  .videoseries-popup__header {
    padding: 1.8rem 1.8rem 1.4rem;
  }

  .videoseries-popup__video {
    width: calc(100% - 3.6rem);
    margin: 1.6rem 1.8rem 1.4rem;
    padding-bottom: calc((100% - 3.6rem) * 0.5625);
  }

  .videoseries-popup .call-to-action {
    padding: 0 1.8rem 1.8rem;
  }

  .videoseries-popup .eib-button.eib-button--icon-with-text-footer {
    width: 100%;
  }
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .map-popup-panel:has(.videoseries-popup) {
  top: 50%;
  right: auto;
  left: 2rem;
  transform: translateY(-50%);
  width: min(390px, calc(100% - 4rem));
  max-height: calc(100% - 4rem);
  padding: 0 !important;
  overflow: hidden !important;
  background: #ffffff;
  border: 1px solid #dce6f2;
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(14, 32, 49, 0.24);
}

/* Tablet */
@media (min-width: 768px) {
  .map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
    .map-popup-panel:has(.videoseries-popup) {
    width: min(520px, calc(100% - 4rem));
  }
}

/* Desktop */
@media (min-width: 1200px) {
  .map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
    .map-popup-panel:has(.videoseries-popup) {
    width: min(680px, calc(100% - 6rem));
    left: 3rem;
  }
}

/* Large desktop */
@media (min-width: 1600px) {
  .map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
    .map-popup-panel:has(.videoseries-popup) {
    width: min(800px, calc(100% - 8rem));
    left: 4rem;
  }
}

/* Make the panel behave like one clean card */
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .map-popup-panel.active:has(.videoseries-popup) {
  display: flex;
  flex-direction: column;
}

/* Close button */
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .map-popup-panel:has(.videoseries-popup)
  .close-btn {
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #0e2031;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dce6f2;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(14, 32, 49, 0.12);
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .map-popup-panel:has(.videoseries-popup)
  .close-btn:hover {
  color: #2f80ed;
  border-color: #2f80ed;
}

/* Popup inner scroll */
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup {
  width: 100%;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  background: #ffffff;
  font-family: Roboto, sans-serif;
  scrollbar-width: thin;
  scrollbar-color: rgba(14, 32, 49, 0.35) transparent;
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup::-webkit-scrollbar {
  width: 8px;
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup::-webkit-scrollbar-thumb {
  background: rgba(14, 32, 49, 0.28);
  border-radius: 999px;
}

/* Header */
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup {
  position: relative;
  display: block;
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.13), rgba(47, 128, 237, 0)),
    #f7f9fc;
  border-bottom: 1px solid #e5edf7;
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup__header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #2f80ed;
}

/* Country + flag */
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup__meta {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 0 3rem 1.2rem 0;
}
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup__meta::before {
  content: unset !important;
}
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup .flag-icon {
  width: 3.2rem;
  height: 2.2rem;
  margin: 0;
  flex: 0 0 auto;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(14, 32, 49, 0.1);
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup__country {
  color: #0e2031;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Title and text */
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup__project {
  margin: 0 0 1rem;
  color: #0e2031;
  font-family: "Alegreya Sans", Roboto, sans-serif;
  font-size: clamp(2rem, 2vw, 2.6rem);
  font-weight: 700;
  line-height: 1.08;
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup__description {
  margin: 0;
  color: #24384c;
  font-size: 1.35rem;
  line-height: 1.55;
}

/* Hide the empty div from the template */
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup__content:empty {
  display: none;
}

/* Video */
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup__video {
  position: relative;
  width: calc(100% - 4.8rem);
  aspect-ratio: 16 / 9;
  margin: 2rem 2.4rem 1.6rem;
  padding-bottom: 0 !important;
  overflow: hidden;
  border-radius: 12px;
  background: #0e2031;
  box-shadow: 0 10px 24px rgba(14, 32, 49, 0.18);
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* CTA */
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup .call-to-action {
  float: none;
  margin: 0;
  padding: 0 2.4rem 2.2rem;
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup .eib-button.eib-button--icon-with-text-footer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 4.2rem;
  padding: 0.9rem 1.7rem !important;
  color: #ffffff !important;
  background: #2f80ed;
  border: 2px solid #2f80ed;
  border-radius: 999px;
  font-family: Roboto, sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(47, 128, 237, 0.22);
  margin-left: 2.4rem;
  margin-bottom:3rem;
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup .eib-button.eib-button--icon-with-text-footer:hover,
.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup .eib-button.eib-button--icon-with-text-footer:focus {
  color: #2f80ed !important;
  background: #ffffff;
  text-decoration: none;
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup .eib-button.eib-button--icon-with-text-footer em {
  margin-left: 0.4rem;
  transition: transform 0.18s ease;
  color: #fff!important;
}

.map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
  .videoseries-popup .eib-button.eib-button--icon-with-text-footer:hover em {
  transform: translateX(4px);
  color: #2f80ed!important;
}

/* Mobile */
@media only screen and (max-width: 576px) {
  .map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
    .map-popup-panel:has(.videoseries-popup) {
    top: auto;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    width: auto;
    max-height: 78%;
    transform: none;
    border-radius: 14px;
  }

  .map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
    .videoseries-popup__video {
    width: calc(100% - 3.6rem);
    margin: 1.6rem 1.8rem 1.4rem;
  }

  .map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
    .videoseries-popup .call-to-action {
    padding: 0 1.8rem 1.8rem;
  }

  .map-componnent.map-wrapper:has(.map-container[data-mapstyle*="miniStyle"])
    .videoseries-popup .eib-button.eib-button--icon-with-text-footer {
    width: 100%;
  }
}

/* ELENA display mode and legend */
.elena-display-mode-filter {
  margin-bottom: 1rem;
}

.elena-display-mode-filter .dropdown-toggle {
  width: 100%;
  text-align: left;
}

.elena-display-mode-filter .dropdown-options {
  max-height: none;
}

.elena-map-legend__title {
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.elena-map-legend__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0;
  white-space: nowrap;
}

.elena-map-legend__swatch {
  display: inline-block;
  width: 1.25rem;
  height: 0.75rem;
  flex: 0 0 auto;
}

/* ==========================================================================
   Video series thumbnail + modal
   ========================================================================== */

.videoseries-popup__video-trigger {
  position: relative;
  width: calc(100% - 4.8rem);
  aspect-ratio: 16 / 9;
  margin: 2rem 2.4rem 1.6rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  overflow: hidden;
  color: #ffffff;
  background-color: #0e2031;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(14, 32, 49, 0.18);
  cursor: pointer;
  isolation: isolate;
}

.videoseries-popup__video-trigger::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0);
  transition: background-color 180ms ease;
}

.videoseries-popup__video-trigger:hover::after,
.videoseries-popup__video-trigger:focus-visible::after {
  background: rgba(0, 0, 0, 0.2);
}

.videoseries-popup__video-trigger:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: -6px;
}

.videoseries-popup__play-icon {
  width: 6rem;
  height: 6rem;
  display: grid;
  place-items: center;
  background: #2f80ed;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  transition: transform 180ms ease, background-color 180ms ease;
}

.videoseries-popup__play-icon::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 0.5rem;
  border-top: 1.1rem solid transparent;
  border-bottom: 1.1rem solid transparent;
  border-left: 1.8rem solid #ffffff;
}

.videoseries-popup__video-trigger:hover .videoseries-popup__play-icon,
.videoseries-popup__video-trigger:focus-visible .videoseries-popup__play-icon {
  background: #1768d4;
  transform: scale(1.08);
}

.videoseries-popup__play-label {
  padding: 0.75rem 1.25rem;
  color: #ffffff !important;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 999px;
  font-family: Roboto, sans-serif;
  font-size: 1.45rem !important;
  font-weight: 700;
  line-height: 1;
}

body.videoseries-modal-is-open {
  overflow: hidden;
}

.videoseries-video-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.78);
}

.videoseries-video-modal__dialog {
  width: 75vw;
  height: 75vh;
  max-width: 1600px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.88);
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.videoseries-video-modal__toolbar {
  min-height: 5rem;
  display: flex;
  flex: 0 0 5rem;
  align-items: center;
  justify-content: flex-end;
  padding: 0 1rem;
}

.videoseries-video-modal__close {
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  padding: 0;
  color: #ffffff;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  cursor: pointer;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.videoseries-video-modal__close:hover,
.videoseries-video-modal__close:focus-visible {
  background: #2f80ed;
  border-color: #ffffff;
  outline: none;
}

.videoseries-video-modal__frame {
  min-height: 0;
  flex: 1 1 auto;
  background: #000000;
}

.videoseries-video-modal__frame iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

@media only screen and (max-width: 576px) {
  .videoseries-popup__video-trigger {
    width: calc(100% - 3.6rem);
    margin: 1.6rem 1.8rem 1.4rem;
  }

  .videoseries-popup__play-icon {
    width: 5rem;
    height: 5rem;
  }

  .videoseries-video-modal {
    padding: 1rem;
  }

  .videoseries-video-modal__dialog {
    width: 94vw;
    height: 72vh;
  }
}
