/* Dreamods - Cuore dei preferiti su tutti i prodotti (06/11/2026, solo demo, nuovo stile).
   0.1.3 (titolare: «stesso colore rosa delle barre Aggiungi»): il cuore pieno e il contorno al passaggio sono del rosa dei pulsanti
   «Aggiungi» (#C8377A, --dm-accent-strong), non più rossi.
   0.1.1 (titolare: «togli il cerchio e lascia solo un cuore vuoto, che una volta cliccato o se il prodotto è già nei preferiti spunta pieno e
   rosso»): niente tondo; cuore solo contorno blu notte (lo stesso disegno del cuore della testata), pieno rosso se il prodotto è nei preferiti
   (dm-pref-si; dalla 0.1.2 tutti i cuori sono di questo plugin, anche quelli del catalogo e della foto della scheda). Un alone bianco leggero lo fa leggere anche sulle foto
   scure. Il pulsante è un'area da 40 px (comoda col dito), il cuore 26 px. La finestrella scura del tema non si mostra. */

/* schede del catalogo (tema): il cuore c'era ma solo passandoci sopra; ora sempre, anche al telefono */
body.dm-stile-elenco .product-small .image-tools.top.right:has(.wishlist-icon, .dm-cuore) { opacity: 1; pointer-events: auto; transform: none !important; display: block }
/* 0.1.2: nel catalogo e sulla foto della scheda il cuore sta già nel riquadro degli strumenti del tema, in alto a destra */
body.dm-stile :is(.product-small, .product-gallery) .image-tools .dm-cuore { position: static }

/* aspetto comune: solo il cuore, senza tondo */
body.dm-stile .wishlist-icon .wishlist-popup { display: none }
body.dm-stile .dm-cuore { position: absolute; top: 4px; right: 4px; z-index: 3; margin: 0 }
:is(body.dm-stile .dm-cuore, body.dm-stile-elenco .product-small.col .image-tools, body.dm-stile .product-small .image-tools, body.dm-stile .product-gallery .image-tools) :is(.wishlist-button, .dm-cuore-btn) {
	display: inline-block; width: 40px; height: 40px; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.5s-7.6-4.6-9.4-9.4C1.3 7.8 3.4 4.5 6.9 4.5c2.1 0 3.9 1.2 5.1 3 1.2-1.8 3-3 5.1-3 3.5 0 5.6 3.3 4.3 6.6-1.8 4.8-9.4 9.4-9.4 9.4z' fill='none' stroke='%231F2A5C' stroke-width='1.9' stroke-linejoin='round'/%3E%3C/svg%3E") center / 26px 26px no-repeat; color: transparent; font-size: 0; line-height: 0; letter-spacing: 0; text-transform: none;
	box-sizing: border-box; cursor: pointer; filter: drop-shadow(0 0 1.5px rgba(255, 255, 255, .95)) drop-shadow(0 1px 1px rgba(255, 255, 255, .7));
	transition: transform .15s ease }
:is(body.dm-stile .dm-cuore, body.dm-stile-elenco .product-small.col .image-tools, body.dm-stile .product-small .image-tools, body.dm-stile .product-gallery .image-tools) :is(.wishlist-button, .dm-cuore-btn) > :is(i, svg) { display: none }
:is(body.dm-stile .dm-cuore, body.dm-stile-elenco .product-small.col .image-tools, body.dm-stile .product-small .image-tools, body.dm-stile .product-gallery .image-tools) :is(.wishlist-button, .dm-cuore-btn):hover { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.5s-7.6-4.6-9.4-9.4C1.3 7.8 3.4 4.5 6.9 4.5c2.1 0 3.9 1.2 5.1 3 1.2-1.8 3-3 5.1-3 3.5 0 5.6 3.3 4.3 6.6-1.8 4.8-9.4 9.4-9.4 9.4z' fill='none' stroke='%23C8377A' stroke-width='1.9' stroke-linejoin='round'/%3E%3C/svg%3E"); background-color: transparent; transform: scale(1.08) }
:is(body.dm-stile .dm-cuore, body.dm-stile-elenco .product-small.col .image-tools, body.dm-stile .product-small .image-tools, body.dm-stile .product-gallery .image-tools) :is(.wishlist-button.wishlist-added, .dm-cuore-btn.dm-pref-si),
:is(body.dm-stile .dm-cuore, body.dm-stile-elenco .product-small.col .image-tools, body.dm-stile .product-small .image-tools, body.dm-stile .product-gallery .image-tools) :is(.wishlist-button.wishlist-added, .dm-cuore-btn.dm-pref-si):hover { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.5s-7.6-4.6-9.4-9.4C1.3 7.8 3.4 4.5 6.9 4.5c2.1 0 3.9 1.2 5.1 3 1.2-1.8 3-3 5.1-3 3.5 0 5.6 3.3 4.3 6.6-1.8 4.8-9.4 9.4-9.4 9.4z' fill='%23C8377A' stroke='%23C8377A' stroke-width='1.9' stroke-linejoin='round'/%3E%3C/svg%3E"); background-color: transparent }
:is(body.dm-stile .dm-cuore, body.dm-stile-elenco .product-small.col .image-tools, body.dm-stile .product-small .image-tools, body.dm-stile .product-gallery .image-tools) :is(.wishlist-button, .dm-cuore-btn):focus-visible { outline: 3px solid var(--dm-focus); outline-offset: -2px; border-radius: 8px }
:is(body.dm-stile .dm-cuore, body.dm-stile-elenco .product-small.col .image-tools, body.dm-stile .product-small .image-tools, body.dm-stile .product-gallery .image-tools) :is(.wishlist-button.loading, .dm-cuore-btn.dm-pref-attesa) { opacity: .55; cursor: progress }
/* al clic che aggiunge: il cuore pieno «batte» una volta */
body.dm-stile .dm-cuore-btn.dm-pref-pop { animation: dm-pref-pop .4s ease }
@keyframes dm-pref-pop { 0% { transform: scale(1) } 40% { transform: scale(1.3) } 100% { transform: scale(1) } }
@media (prefers-reduced-motion: reduce) { body.dm-stile .dm-cuore-btn.dm-pref-pop { animation: none } body.dm-stile :is(.wishlist-button, .dm-cuore-btn) { transition: none } }

/* home: le schede devono fare da riferimento per il cuore */
body.dm-stile-home .nh-home :is(.nh-prod, .nh-off) { position: relative }
/* righe (Novità, Completa la linea): il nome dei righi è una griglia, quindi il cuore sta fuori dal flusso, nell'angolo in alto a destra della riga;
   il nome lascia lo spazio */
body.dm-stile-home .nh-home .nh-riga { position: relative }
body.dm-stile-home .nh-home .nh-riga .nh-riga-nome { padding-right: 38px }
body.dm-stile-home .nh-home .nh-riga .nh-riga-nome > .dm-cuore { position: absolute; top: 4px; right: 4px }
body.dm-stile-home .nh-home .nh-riga .nh-riga-nome > .dm-cuore .dm-cuore-btn { width: 36px; height: 36px; background-size: 22px 22px }
/* «Modifica e riordina» al computer (righe su una sola linea, «Aggiungi» a destra): il cuore a destra del nome, a metà altezza */
@media (min-width: 760px) {
	body.dm-stile-home .nh-home .nh-pannello .nh-riga .nh-riga-nome { position: relative; padding-right: 40px }
	body.dm-stile-home .nh-home .nh-pannello .nh-riga .nh-riga-nome > .dm-cuore { top: 50%; right: 0; transform: translateY(-50%) }
}
/* Riordina i tuoi preferiti (schede in fila): sulla foto, in alto a destra (la casella per scegliere è in alto a sinistra) */
body.dm-stile-home .nh-home .nh-tabella > .nh-righe > .nh-riga .nh-riga-nome { padding-right: 0 }
body.dm-stile-home .nh-home .nh-tabella > .nh-righe > .nh-riga .nh-riga-nome > .dm-cuore { top: 6px; right: 6px; transform: none }
body.dm-stile-home .nh-home .nh-tabella > .nh-righe > .nh-riga .nh-riga-nome > .dm-cuore .dm-cuore-btn { width: 40px; height: 40px; background-size: 26px 26px }

/* pagine dei negozi: le etichette che stavano in alto a destra scendono sotto il cuore */
body.dm-stile-negozi .dm-vb .dm-vb-card:has(.dm-vb-pos) .dm-vb-sconto { top: 48px }
body.dm-stile-negozi .dm-ad .dm-ad-finendo .dm-ad-sconto { top: 48px }

/* scheda del prodotto: il cuore torna sulla foto, in alto a destra (il nuovo stile lo nascondeva); la scritta nel riquadro si toglie, così il
   comando dei preferiti resta uno solo */
body.dm-stile-scheda .product-gallery .image-tools:has(.wishlist-icon, .dm-cuore) { opacity: 1; pointer-events: auto; transform: none !important; z-index: 3 }
body.dm-stile-scheda .product-gallery .image-tools .wishlist-icon { display: block }
body.dm-stile-scheda .dm-sch-box .yith-wcwl-add-to-wishlist { display: none }

/* avviso dopo l'aggiunta (cuori della home e delle pagine dei negozi): in alto, sotto la testata (in basso c'è la barra dei cookie) */
.dm-pref-avviso { position: fixed; left: 50%; top: calc(var(--dm-testata-h, 120px) + 12px); z-index: 100000; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: var(--dm-radius-pill, 999px);
	background: var(--dm-primary-dark, #1F2A5C); color: #fff; font-size: 15px; font-weight: 600; box-shadow: 0 8px 24px rgba(31, 42, 92, .25);
	transform: translate(-50%, -12px); opacity: 0; transition: transform .25s ease, opacity .25s ease; pointer-events: none }
.dm-pref-avviso.su { transform: translate(-50%, 0); opacity: 1; pointer-events: auto }
.dm-pref-avviso a { color: var(--dm-highlight, #D4F200); text-decoration: underline }
@media (max-width: 480px) { .dm-pref-avviso { padding: 10px 14px; font-size: 14px; white-space: nowrap } }
@media (prefers-reduced-motion: reduce) { .dm-pref-avviso { transition: none } }

/* 0.1.5 · Icone del plugin dei preferiti (YITH): il tema non carica il foglio di YITH, quindi un'icona senza misura si allarga quanto la pagina
   (la X e la spunta di «Modifica titolo» uscivano da 213 px). Misura di base pari al testo, con e senza nuovo stile; :where() la lascia
   più debole di ogni regola che già dà una misura. «Modifica titolo» e la sua casella non ci sono più (dreamods-preferiti.php). */
:where(svg.yith-wcwl-icon-svg) { width: 1.2em; height: 1.2em; max-width: 32px; max-height: 32px; vertical-align: middle }
.wishlist-title-container :is(.show-title-form, .hidden-title-form) { display: none !important }
