/*
 * Bettiga — accessibilità (WCAG 2.1 AA). Caricato dal tema figlio, vedi functions.php.
 */

/* 2.4.7 Focus visibile: anello blu con bordo bianco, si vede su fondo chiaro e sul menu blu */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
	outline: 3px solid #015092 !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 2px #ffffff !important;
}

/* destinazione dello skip-link: riceve il focus ma non mostra un riquadro su tutta la pagina */
main#content:focus,
main#content:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

/* testo solo per screen reader */
.sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* 2.3.3 Rispetto della preferenza di sistema "riduci movimento" */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* ------------------------------------------------------------------
 * Ritocchi grafici (21/10). Stanno qui e non in style.css perche' questo
 * file e' caricato con versione = data del file: le modifiche si vedono subito.
 * ------------------------------------------------------------------ */

/* Home: testo dello slider senza animazione d'ingresso */
.elementor-element-nrh0a02 .swiper-slide-contents,
.elementor-element-nrh0a02 .swiper-slide-contents.animated {
	animation: none !important;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
}

/* Card prodotto (listing 264): pulsanti gialli "vedi" e "carrello" piu' piccoli (prima 50px) */
.elementor-264 .elementor-element-1b8533e1 .elementor-icon,
.elementor-264 .elementor-element-6a4ac369 .elementor-button-wrapper > a.elementor-button:not(.added_to_cart) {
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
}
.elementor-264 .elementor-element-1b8533e1 .elementor-icon { font-size: 18px !important; }
.elementor-264 .elementor-element-1b8533e1 .elementor-icon svg { width: 18px; height: 18px; }
.elementor-264 .elementor-element-6a4ac369 .elementor-button-content-wrapper { padding-top: 0 !important; }
.elementor-264 .elementor-element-6a4ac369 .elementor-button-icon { font-size: 16px !important; }
.elementor-264 .elementor-element-6a4ac369 .elementor-button-icon svg { width: 16px; height: 16px; }
/* contenitore dei pulsanti: stessa altezza in tutte le card (in home era 56px) */
.elementor-264 .elementor-element-fa88db5 { min-height: 44px !important; }

@media (max-width: 767px) {
	.elementor-264 .elementor-element-1b8533e1 .elementor-icon,
	.elementor-264 .elementor-element-6a4ac369 .elementor-button-wrapper > a.elementor-button:not(.added_to_cart) {
		width: 40px !important;
		height: 40px !important;
	}
	.elementor-264 .elementor-element-1b8533e1 .elementor-icon { font-size: 16px !important; }
	.elementor-264 .elementor-element-1b8533e1 .elementor-icon svg { width: 16px; height: 16px; }
	.elementor-264 .elementor-element-6a4ac369 .elementor-button-icon { font-size: 15px !important; }
	.elementor-264 .elementor-element-fa88db5 { min-height: 40px !important; }
}

/* Pagine di categoria, Noleggio, Usato e Promozioni: su smartphone 2 prodotti affiancati (22/10).
   Griglie: #product-list-listing (template categoria), #product-listing-noleggio, #product-listing-usato, #promo-grid (pagina Promozioni). */
@media (max-width: 767px) {
	:is(#product-list-listing, #product-listing-noleggio, #product-listing-usato, #promo-grid) .jet-listing-grid__items {
		--columns: 2 !important;
	}
	:is(#product-list-listing, #product-listing-noleggio, #product-listing-usato, #promo-grid) .jet-listing-grid__items > .jet-listing-grid__item {
		flex: 0 0 50% !important;
		max-width: 50% !important;
		width: 50% !important;
		padding-left: 5px !important;
		padding-right: 5px !important;
	}
	/* card compatta, come nei caroselli della home: il titolo prende lo spazio, prezzo e pulsante restano in fondo */
	:is(#product-list-listing, #product-listing-noleggio, #product-listing-usato, #promo-grid) .elementor-element-304c441 { --padding-top: 8px; --padding-right: 10px; --padding-bottom: 10px; --padding-left: 10px; }
	:is(#product-list-listing, #product-listing-noleggio, #product-listing-usato, #promo-grid) .elementor-element-76e918c5 { --margin-bottom: 8px; }
	:is(#product-list-listing, #product-listing-noleggio, #product-listing-usato, #promo-grid) .elementor-element-5aae75de img { height: 120px !important; }
	:is(#product-list-listing, #product-listing-noleggio, #product-listing-usato, #promo-grid) .elementor-element-68ef560d { flex-grow: 1; }
	:is(#product-list-listing, #product-listing-noleggio, #product-listing-usato, #promo-grid) .elementor-element-68ef560d .elementor-heading-title { font-size: 14px; line-height: 1.25; }
	:is(#product-list-listing, #product-listing-noleggio, #product-listing-usato, #promo-grid) :is(.elementor-element-149a424f, .elementor-element-d6b20f8, .elementor-element-49154640, .elementor-element-26336eef) { --flex-grow: 0; flex-grow: 0 !important; }
	:is(#product-list-listing, #product-listing-noleggio, #product-listing-usato, #promo-grid) .elementor-element-149a424f { --margin-top: 8px; }
}

/* Griglie di categorie (listing 436), 27/10.
   Pagine macro: 36b2021, 24dd6bb, 21766cc (con icona). Pagine di categoria: c3a9144 (template categoria),
   5e4cb54 (Noleggio), 2886ea1 (Usato), senza icona. Ovunque 6 per riga su desktop, 3 su tablet, 2 su smartphone;
   box grigio con testo nero a sinistra, blu con testo bianco al passaggio del mouse o al focus. */
@media (min-width: 1025px) {
	:is(.elementor-element-36b2021, .elementor-element-24dd6bb, .elementor-element-21766cc, .elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .jet-listing-grid__items > .jet-listing-grid__item {
		--columns: 6;
		flex: 0 0 calc(100% / 6) !important;
		max-width: calc(100% / 6) !important;
	}
}
:is(.elementor-element-36b2021, .elementor-element-24dd6bb, .elementor-element-21766cc, .elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .single-product-category {
	height: 100%;
	transition: background-color .15s;
}
:is(.elementor-element-36b2021, .elementor-element-24dd6bb, .elementor-element-21766cc, .elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .category-name .jet-listing-dynamic-field__content {
	color: #333333;
	transition: color .15s;
}
:is(.elementor-element-36b2021, .elementor-element-24dd6bb, .elementor-element-21766cc, .elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .jet-engine-listing-overlay-wrap:is(:hover, :focus-within) .single-product-category {
	background-color: #015092 !important;
}
:is(.elementor-element-36b2021, .elementor-element-24dd6bb, .elementor-element-21766cc, .elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .jet-engine-listing-overlay-wrap:is(:hover, :focus-within) :is(.category-name .jet-listing-dynamic-field__content, .category-icon i) {
	color: #ffffff !important;
}

/* pagine di categoria: niente icona, box basso con il testo centrato in altezza */
:is(.elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .category-icon {
	display: none !important;
}
:is(.elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .single-product-category .e-con-inner {
	min-height: 58px;
	padding: 8px 14px !important;
	justify-content: center !important;
	align-items: stretch !important;
}
:is(.elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .category-name {
	margin: 0 !important;
}
:is(.elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .category-name .jet-listing-dynamic-field__content {
	text-align: left;
	font-size: 15px;
	line-height: 1.25;
}
@media (max-width: 767px) {
	:is(.elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .single-product-category .e-con-inner {
		min-height: 54px;
		padding: 8px 10px !important;
	}
	:is(.elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) .category-name .jet-listing-dynamic-field__content {
		font-size: 14px;
	}
	/* Elementor qui mette 20px di rientro ai lati: griglia e titolo allineati al testo della pagina */
	:is(.elementor-element-c3a9144, .elementor-element-5e4cb54, .elementor-element-2886ea1) > .elementor-widget-container {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
}

/* Noleggio e Usato: le categorie dopo il titolo e il testo (stesso contenitore flex, si sposta solo l'ordine) */
:is(.elementor-element-5e4cb54, .elementor-element-2886ea1) {
	order: 1;
}

/* titolo "Categorie" sopra la griglia: lo mette a11y.js, stile del titolo delle pagine macro (971b43e) */
.nr-sottocat-titolo {
	font-family: "Gantari", sans-serif;
	font-size: 20px;
	font-weight: 800;
	line-height: 24px;
	color: #015092;
	margin: 24px 0 16px;
}

/* "Mostra tutte": con più di 6 sottocategorie chiuse se ne vedono 6 (una riga su desktop, due su tablet, tre su smartphone).
   La classe nr-sottocat-chiuso e il pulsante li mette a11y.js. */
.nr-sottocat-chiuso .jet-listing-grid__item:nth-child(n+7) { display: none !important; }
.nr-sottocat-altre {
	display: flex;
	justify-content: center;
	margin-top: 14px;
}
.nr-sottocat-altre button {
	font-family: "Gantari", sans-serif;
	font-size: 15px;
	font-weight: 600;
	color: #015092;
	background: #ffffff;
	border: 2px solid #015092;
	border-radius: 8px;
	padding: 10px 22px;
	cursor: pointer;
}
/* solo blu e bianco in ogni stato: il tema Hello di base colora focus e clic di fucsia */
.nr-sottocat-altre button:is(:hover, :active, :focus-visible) {
	background: #015092 !important;
	color: #ffffff !important;
	border-color: #015092 !important;
}
.nr-sottocat-altre button:focus:not(:focus-visible):not(:hover) {
	background: #ffffff !important;
	color: #015092 !important;
	border-color: #015092 !important;
}
