/*
###############################################################################################################################################################
GEOCODER ADMIN
###############################################################################################################################################################
*/

.geocoder {
    margin-top: 0;   /* FRANCK 25/09 : 0.5% > 0 */
	z-index: 7;
}

/* Redefine the ctrl-geocoder box and text */
.mapboxgl-ctrl-geocoder {
    width: var(--GEOCODER_WIDTH) !important;
    height: var(--HEADER_HEIGHT) !important;
	border-radius: var(--BUTTON_BORDER_RADIUS);
	background: none;
    outline: none;
    border: 0.1px solid var(--COLOR_SURFACE_50);
    box-shadow: var(--NEUMORPHISM_BOX_SHADOW);
    /* transform-origin: left;	Define the transform-origin point. Syntax: [ <length-percentage> | left | center | right | top | bottom ] */
    /* -webkit-transition-timing-function: cubic-bezier(0.5, 2.5, 0.5, 0.5) !important;
	-moz-transition-timing-function: cubic-bezier(0.5, 2.5, 0.5, 0.5) !important;
	-o-transition-timing-function: cubic-bezier(0.5, 2.5, 0.5, 0.5) !important;
	transition-timing-function: cubic-bezier(0.5, 2.5, 0.5, 0.5) !important;
	transition-duration: 0.5s !important;
	transition-property: transform !important; */
}

.mapboxgl-ctrl-geocoder--input:focus {
    outline: unset !important;
  }

/* The 2 geocoder icons: search and close
.mapboxgl-ctrl-geocoder--icon {
}*/

.mapboxgl-ctrl-geocoder--icon-search {
    fill: white;
    margin-left: 2%;
    width: 27px;
    height: 27px;
}

.mapboxgl-ctrl-geocoder--icon-close {
    fill: var(--COLOR_SURFACE_90)!important;
}

.mapboxgl-ctrl-geocoder--input {
	position: relative !important;
	height: 100%!important;
	padding-left: 45px;
	border-radius: var(--BUTTON_BORDER_RADIUS);
	font-size: 0.80rem !important;
	letter-spacing: 0.02em;
	color: white !important;	/* Change the entered text color */
	text-align: left !important; /* Force the cursor to position at the beginning */
}

.mapboxgl-ctrl-geocoder input::placeholder {
	color: var(--COLOR_SURFACE_90);
}

.mapboxgl-ctrl-geocoder .suggestions {
    background-color: rgba(255, 255, 255, 0.5);
	-webkit-backdrop-filter: blur(25px) saturate(180%);
    backdrop-filter: blur(15px) saturate(180%);
    border-radius: 0 0 var(--BUTTON_BORDER_RADIUS) var(--BUTTON_BORDER_RADIUS);
    box-shadow: var(--FORM_SHADOW_BLACK);
	font-size: 0.9rem;
    top: 100% !important;
}

.mapboxgl-ctrl-geocoder .suggestions > li > a:hover {
    background: linear-gradient(to right, var(--COLOR_ACTION_40), var(--COLOR_ACTION_60)) !important;
	box-shadow: var(--NEUMORPHISM_BOX_SHADOW);
    color: var(--COLOR_SURFACE_90) !important;
    cursor: pointer;
}

.mapboxgl-ctrl-geocoder--button {
	background-color: transparent !important;
}

/* .mapboxgl-ctrl-geocoder::placeholder { */
/*   font-weight: bold; */
/* } */
.mapboxgl-ctrl.mapboxgl-ctrl-attrib {
	clear: none !important;
	margin: 0 !important;
	height: 1rem /*16px*/;
	font-size: 0.69rem /*11px*/;
	box-shadow: 0.25rem 0.06rem 0rem 0.25rem rgba(255, 255, 255, 0.75)
		/*4 1 0 4px*/;
	margin: 0rem 0rem 0.19rem 0rem !important /*0 0 3 0px*/;
	background-color: rgba(255, 255, 255, 0.75) !important;
	line-height: 1rem /*16px*/;
}

.mapboxgl-ctrl-scale {
	line-height: 1rem;
    background-color: #ffffff8a;
    border: none;
}

.mapboxgl-ctrl-geocoder--icon-close {
    margin-top: 8px !important;
}

/*.mapboxgl-ctrl-geocoder--icon-search {
	right: 10px;
	left: unset;
	top: 7px;
}*/


/*
###############################################################################################################################################################
GEOCODER POI
###############################################################################################################################################################
*/

/* Appliquer le style de l'ancien geocoder au nouveau */
.custom-geocoder-input {
    position: absolute;
    top: 0;
    height: var(--HEADER_BUTTON_HEIGHT) !important;
    width: var(--GEOCODER_POI_WIDTH);
    border-radius: var(--BUTTON_BORDER_RADIUS);
    background-color: var(--MAP_BUTTONS_COLOR);
    box-shadow: none;
    padding-left: 30px;
    font-size: 0.85rem !important; /* FONT SIZE MINIMUM DE 16px POUR NE PAS AVOIR DE ZOOM SUR IOS */
    border: none;
    margin: var(--MAP_ELEMENT_MARGIN);
    font-weight: normal;
    color: var(--COLOR_ACTION_50);
    z-index: 2;
}

.custom-geocoder-input:focus {
    border: 1px solid var(--COLOR_SURFACE_30);
    outline: none;
}

.custom-suggestion-list {
    position: absolute;
    z-index: 7;
    top: calc(var(--HEADER_BUTTON_HEIGHT));
    margin: var(--MAP_ELEMENT_MARGIN);
    padding: 0;
    width: var(--GEOCODER_POI_WIDTH);
    max-height: calc(98% - var(--HEADER_BUTTON_HEIGHT) - var(--MAP_ELEMENT_MARGIN));
    background-color: var(--COLOR_SURFACE_30);
    overflow-y: auto;
    overflow-x: hidden; /* Hide the horizontal scrollbar */
    list-style: none;
    box-shadow: var(--FORM_SHADOW_BLACK);
    border-radius: 20px;
}

.custom-suggestion-item {
    width: var(--GEOCODER_POI_WIDTH) !important;
    padding: 5px 10px 5px 10px;
    cursor: pointer;
    font-size: 14px;
    color: white; /* Texte en blanc */
}

.custom-suggestion-item:hover {
    background-color: var(--COLOR_SURFACE_40);
}

/* Style de l'adresse en dessous du nom principal */
.custom-suggestion-item .suggestion-address {
    font-size: 12px;
    color: #aaa; /* Couleur grise plus légère pour différencier l'adresse */
    margin-top: 2px; /* Espace entre le nom et l'adresse */
}


/*
###############################################################################################################################################################
PREDEFINED CITIES GEOCODER DROPDOWN
###############################################################################################################################################################
*/

.city-dropdown-container {
    position: relative;
    height: 40px;
    display: flex;
    align-items: center;
    background: none;
    border-radius: var(--BUTTON_BORDER_RADIUS);
    border: 0.1px solid var(--COLOR_SURFACE_50);
    box-shadow: var(--NEUMORPHISM_BOX_SHADOW);
}

.city-dropdown {
    width: 300px;
    height: 100%;
    padding-left: 45px;
    border: none;
    border-radius: var(--BUTTON_BORDER_RADIUS);
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    color: var(--COLOR_SURFACE_90) !important;
    background: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    outline: none;
}

.city-dropdown option {
    background-color: var(--COLOR_SURFACE_30);
    color: white;
    padding: 10px;
}

.city-dropdown-container::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.city-dropdown-container::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
}

.city-dropdown-container.single-city::after {
    display: none;
}

.city-dropdown-clear {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    color: var(--COLOR_ACTION_50);
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    z-index: 2;
}

.city-dropdown-container.active {
    background: linear-gradient(to right, var(--COLOR_ACTION_40), var(--COLOR_ACTION_60)) !important;
}


/*
###############################################################################################################################################################
RESPONSIVE
###############################################################################################################################################################
*/

@media screen and (min-width: 897px) {
	.geocoder {
		left: 448px;
		top: var(--HEADER_HEIGHT);
	}
}

@media screen and (max-width: 896px) and (orientation: portrait) {	/* a calc based on the side bar width is NOT supported */
	.geocoder {
		left: 10px;
		top: var(--HEADER_HEIGHT);
	}

	.city-dropdown-container {
        width: 100% !important;
    }

	.city-dropdown {
		font-size: 0.70rem;
		width: 200px;
	}

    .custom-geocoder-input {
        max-width: var(--GEOCODER_POI_WIDTH_MOBILE);
        padding-left: 15px;
    }

    .custom-suggestion-list {
        max-width: var(--GEOCODER_POI_WIDTH_MOBILE);
    }
}

@media screen and (max-width: 626px) {
	.mapboxgl-ctrl-geocoder--input {
		font-size: 16px !important; /* FONT SIZE MINIMUM DE 16px POUR NE PAS AVOIR DE ZOOM SUR IOS */
	}
        
    .mapboxgl-ctrl-geocoder {
        width: unset !important;
    }

	.mapboxgl-ctrl-geocoder--icon-search {
		width: 17px;
		height: 20px;
	}

    .mapboxgl-ctrl-geocoder--icon-close {
        width: 13px;
        height: 13px;
        margin-top: 2px;
        margin-right: 5px;
    }
}