/* ******************************************************************************************************************
	BLOCCO RICERCA IN TESTATA HOME */
.selectbox > select { opacity: 0; }

.selectbox .select2-container .select2-selection {
    border: 0;
    background-color: transparent;
    color: var(--eti-font-light);
    font-size: 16px;
    font-weight: 400;
    line-height: 150%;
	letter-spacing: -0.25px;
    padding: 0;
    margin-top: 4px;
}
.selectbox .select2-container.select2-container--disabled .select2-selection {
    background-color: transparent;
}
.selectbox .select2-container .select2-selection .select2-selection__rendered {
    padding: 0;
}
.selectbox .select2-container button.select2-selection__clear {
    margin-right: 0;
    font-size: 20px;
}
.selectbox .select2-container .select2-selection-rata:has( > .select2-selection__rendered[title="Tutto"])  button.select2-selection__clear {
    display: none;
}
.selectbox .select2-container span.select2-selection__arrow {
    display: none;
}

.select2-container .select2-dropdown.select2-selectbox-dropdown {
    border: 1px solid var(--grigio-medio);
    background-color: var(--eti-bg-white);
    padding: 16px;
    border-radius: 8px;
}
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-search {
    padding: 0 0 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--grigio-medio);
    display: flex;
    align-items: center;
    gap: 4px;
}
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-search input.select2-search__field {
    color: var(--eti-font-dark);
    font-size: 11px;
    line-height: 1.5;
    font-weight: 400;
    border: 0;
}
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-search input.select2-search__field::placeholder {
    color: var(--grigio-scuro);
}
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-search:before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M21.0002 21L16.6602 16.66' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M11 19C15.4183 19 19 15.4183 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'><path d='M21.0002 21L16.6602 16.66' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/><path d='M11 19C15.4183 19 19 15.4183 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19Z' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
    background-color: var(--grigio-scuro);
}
.select2-container:has(> .select2-selectbox-km) .select2-dropdown.select2-selectbox-dropdown .select2-search,
.select2-container:has(> .select2-selectbox-prezzo) .select2-dropdown.select2-selectbox-dropdown .select2-search,
.select2-container:has(> .select2-selectbox-rata) .select2-dropdown.select2-selectbox-dropdown .select2-search { display: none; }
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-results > ul {
	padding-right: 4px;
}
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-results > ul > li.select2-results__option {
    font-size: 13px;
    line-height: 1.5;
    font-weight: 400;
    padding: 4px 6px;
	transition: var(--transition);
    text-transform: capitalize;
}
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-results > ul > li.select2-results__option.select2-results__option--selected,
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-results > ul > li.select2-results__option.select2-results__option--highlighted,
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-results > ul > li.select2-results__option:not(.select2-results__option--disabled):hover {
	background-color: var(--grigio-chiaro);
	color: var(--eti-font-dark);
}
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-results > ul > li.select2-results__option.select2-results__option--disabled:hover { cursor: no-drop;}

.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-results > ul::-webkit-scrollbar {
    background-color: transparent;
    display: block;
    width: 3px;
    box-shadow: inset -1px 0 12px var(--eti-bg-light);
}
.select2-container .select2-dropdown.select2-selectbox-dropdown .select2-results > ul::-webkit-scrollbar-thumb {
    background-color: var(--grigio-medio);
}

#prezzo_rata.selectbox.prezzo_on span.select2:has(.select2-selection-rata),
#prezzo_rata.selectbox.rata_on span.select2:has(.select2-selection-prezzo),
#prezzo_rata_adv.selectbox.prezzo_on span.select2:has(.select2-selection-rata),
#prezzo_rata_adv.selectbox.rata_on span.select2:has(.select2-selection-prezzo) {
	/*opacity: 0;
	height: 0;
	pointer-events: none;*/
	display: none;
}

.select2-custom-header {
	display: flex;
	justify-content: center;
	align-items: center;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--grigio-medio);
    margin-bottom: 8px;
	font-size: 13px;
	gap: 8px;
}
.switch_prezzo_rata {
	position: relative;
	display: inline-block;
	width: 34px;
	height: 20px;
}
.switch_prezzo_rata input { opacity: 0; width: 0; height: 0; }
.switch_prezzo_rata .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #eff9ff;
    border: 1px solid var(--eti-color-one);
    border-radius: 24px;
    transition: .3s;
}
.switch_prezzo_rata .slider:before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    left: 3px;
    bottom: 2px;
    background: var(--eti-color-one);
    border-radius: 50%;
    transition: .3s;
    transform: translateX(14px);
}
.switch_prezzo_rata input:checked + .slider {
    border-color: var(--grigio-scuro);
    background: #fff;
}
.switch_prezzo_rata input:checked + .slider:before {
    transform: translateX(0px);
    background: var(--grigio-scuro);
}

@media (max-width: 575px){
	body > span.select2-container.select2-container--open {
		left: 50% !important;
	}
	body > span.select2-container.select2-container--open .select2-dropdown.select2-selectbox-dropdown {
		transform: translateX(-50%);
	}
	.select2-container .select2-dropdown.select2-selectbox-dropdown {
		min-width: 250px;
	}
}

form.modal_form_ricerca_avanzata {
    width: 90%;
    max-width: 700px;
    left: 50%;
    top: 100%;
    transform: translate(-50%, 0%);
    padding: 24px 32px;
    border-radius: 16px;
}
form.modal_form_ricerca_avanzata > .row {
    row-gap: 24px;
}
form.modal_form_ricerca_avanzata hr { margin: 8px 0; }
form.modal_form_ricerca_avanzata .col-filtri {
    display: flex;
    flex-direction: column;
    gap: 16px;
	
	max-height: calc(90vh - 100px);
    overflow-y: scroll;
}
form.modal_form_ricerca_avanzata .col-filtri::-webkit-scrollbar {
    background-color: transparent;
    display: block;
    width: 3px;
    box-shadow: inset -1px 0 12px var(--eti-bg-light);
}
form.modal_form_ricerca_avanzata .col-filtri::-webkit-scrollbar-thumb {
    background-color: var(--grigio-medio);
}
form.modal_form_ricerca_avanzata .buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
form.modal_form_ricerca_avanzata .buttons a.button_filtro {
    font-size: 16px;
    line-height: 1.5;
	color: var(--grigio-dark);
    border: 1px solid var(--grigio);
    border-radius: 8px;
    padding: 8px 4px;
	cursor: pointer;	
    display: flex;
    gap: 0px;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
/* Caso: 2 o 4 figli → 50% */
form.modal_form_ricerca_avanzata .buttons a.button_filtro:first-child:nth-last-child(2),
form.modal_form_ricerca_avanzata .buttons a.button_filtro:first-child:nth-last-child(2) ~ a.button_filtro,
form.modal_form_ricerca_avanzata .buttons a.button_filtro:first-child:nth-last-child(4),
form.modal_form_ricerca_avanzata .buttons a.button_filtro:first-child:nth-last-child(4) ~ a.button_filtro {
    width: calc((100% - 8px) / 2);
}
/* Caso: 3, 5 o 6 figli → 33% */
form.modal_form_ricerca_avanzata .buttons a.button_filtro:first-child:nth-last-child(3),
form.modal_form_ricerca_avanzata .buttons a.button_filtro:first-child:nth-last-child(3) ~ a.button_filtro,
form.modal_form_ricerca_avanzata .buttons a.button_filtro:first-child:nth-last-child(5),
form.modal_form_ricerca_avanzata .buttons a.button_filtro:first-child:nth-last-child(5) ~ a.button_filtro,
form.modal_form_ricerca_avanzata .buttons a.button_filtro:first-child:nth-last-child(6),
form.modal_form_ricerca_avanzata .buttons a.button_filtro:first-child:nth-last-child(6) ~ a.button_filtro {
    width: calc((100% - 16px) / 3);
}

form.modal_form_ricerca_avanzata .buttons a.button_filtro.on,
form.modal_form_ricerca_avanzata .buttons a.button_filtro:hover {	
	border-color: var(--eti-color-one);
    color: var(--eti-color-one);
}
form.modal_form_ricerca_avanzata .buttons a.button_filtro.on { 
	background-color: #EFF9FF;
	gap: 4px;
}
form.modal_form_ricerca_avanzata .buttons a.button_filtro:after {
	content: "";
	width: 0;
	height: 16px;
	opacity: 0;
	display: inline-block;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M13.3333 4L5.99996 11.3333L2.66663 8' stroke='%23009FE3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M13.3333 4L5.99996 11.3333L2.66663 8' stroke='%23009FE3' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
	background-color: var(--eti-color-one);
}
form.modal_form_ricerca_avanzata .buttons a.button_filtro.on:after {
	width: 16px;
	opacity: 1;
}

form.modal_form_ricerca_avanzata .col-filtri .cont_switch {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

form.modal_form_ricerca_avanzata .col-filtri .buttons > * {
    width: calc((100% - 8px) / 2);
}
form.modal_form_ricerca_avanzata .col-filtri .buttons > * {
    width: calc((100% - 8px) / 2);
    justify-content: center;
}

form.modal_form_ricerca_avanzata .tit_container {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: flex-start;
}
form.modal_form_ricerca_avanzata .tit_container a.chiudi_modale {
    line-height: calc(28px*1.2);
    cursor: pointer;
}

form#form_ricerca_testata button.btn[type="submit"] {
    padding: 16px 12px;
    width: 230px;
    justify-content: space-around;
}

form#form_ricerca_testata button.btn[type="submit"] span.cont,
form.modal_form_ricerca_avanzata button.btn[type="submit"] span.cont {
    font-weight: 400;
}


form.modal_form_ricerca_avanzata .select_filtro .select2-container .select2-selection {
	min-height: 42px;
    padding: 6px 8px;
    border: 1px solid var(--grigio);
    border-radius: 8px;
    height: auto;
    font-size: 16px;
    line-height: 1.5;
    margin-top: 8px;
    text-align: center;
	transition: var(--transition);
}
form.modal_form_ricerca_avanzata .select_filtro .select2-container:not(.select2-container--disabled) .select2-selection:hover { border-color: var(--eti-color-one); }

form.modal_form_ricerca_avanzata .select_filtro .select2-container .select2-selection .select2-selection__placeholder { color: var(--grigio-dark); transition: var(--transition); }
form.modal_form_ricerca_avanzata .select_filtro .select2-container:not(.select2-container--disabled) .select2-selection:hover .select2-selection__placeholder { color: var(--eti-color-one); } 

form.modal_form_ricerca_avanzata .select_filtro .select2-container button.select2-selection__clear { font-size: 18px; }

form.modal_form_ricerca_avanzata .select_filtro .select2-container { width: 100% !important; }

@media (max-width: 991px) {
	form#form_ricerca_testata button.btn[type="submit"] {
		width: 100%;
        justify-content: center;
	}
}
@media (max-width: 767px) {
	form#form_ricerca_avanzata.modal_form_ricerca_avanzata {
		width: 100%;
		overflow-y: scroll;
		padding: 60px 24px 48px;
		border-radius: 0;
		border-top-left-radius: 24px;
		border-top-right-radius: 24px;
	}
	form#form_ricerca_avanzata.modal_form_ricerca_avanzata:before {
		content: "";
		position: absolute;
		left: 50%;
		transform: translateX(-50%);
		top: 12px;
		width: 50%;
		height: 10px;
		background-color: var(--grigio-chiaro);
		border-radius: 50px;
		z-index: 5;
	}
	
	form.modal_form_ricerca_avanzata .row:has(.col-filtri) {
		overflow-y: scroll;
        /*position: relative;*/
	}
	/*form.modal_form_ricerca_avanzata .col-filtri {
		max-height: unset;
		height: stretch;
	}
	form.modal_form_ricerca_avanzata .buttons:has(button[type="submit"]) {
		position: sticky;
		bottom: 0px;
		width: 100%;
		background-color: var(--eti-bg-white);
	}*/
	
	form.modal_form_ricerca_avanzata .tit_container a.chiudi_modale {
		display: none;
	}
}

/* ****************************************************************************************************************** */


