/**
 * hcn-wishlist.css — bottone-cuore wishlist (v0.4.21).
 * Token semantici del child (light-dark), touch target ≥44px, focus visibile.
 */

/* ---------------------------------------------------------------- common -- */
.hcn-wl-btn {
	display: inline-grid;
	place-items: center;
	inline-size: 44px;
	block-size: 44px;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--hcn-text);
	cursor: pointer;
	border-radius: 999px;
	transition: transform var(--hcn-duration-fast, 120ms) var(--hcn-ease-out, ease);
}

.hcn-wl-btn:hover { transform: scale(1.08); }
.hcn-wl-btn:active { transform: scale(0.94); }

.hcn-wl-btn:focus-visible {
	outline: 2px solid var(--hcn-focus-ring);
	outline-offset: 2px;
}

/* Outline visibile sempre; fill nascosto finché non attivo. */
.hcn-wl-btn .hcn-wl-fill { display: none; }
.hcn-wl-btn .hcn-wl-outline { display: block; }

.hcn-wl-btn.is-active { color: var(--hcn-primary); }
.hcn-wl-btn.is-active .hcn-wl-fill { display: block; fill: currentColor; }
.hcn-wl-btn.is-active .hcn-wl-outline { display: none; }

/* ------------------------------------------------------------- card ------ */
/* v0.4.37 (richiesta owner): il cuore NON è più flottante sulla copertina —
 * vive nella RIGA PREZZO, a destra del prezzo (flex in hcn-archivio.css).
 * Colore neutro del tema (niente bianco/ombra da copertina), riempimento
 * arancio quando attivo. */
.hikaru-card-price-row .hcn-wl-slot {
	line-height: 0;
	flex: 0 0 auto;
}

/* NESSUN cerchio al click/selezione (richiesta owner): outline rimosso su
 * ogni stato di focus del cuore-card; resta il RIEMPIMENTO arancio dello
 * stato attivo. Per la navigazione da tastiera un glow soft sull'icona
 * (focus-visible NON scatta col mouse): a11y mantenuta senza anelli. */
.hikaru-card-price-row .hcn-wl-btn:focus,
.hikaru-card-price-row .hcn-wl-btn:focus-visible {
	outline: none;
}

.hikaru-card-price-row .hcn-wl-btn:focus-visible {
	filter: drop-shadow(0 0 6px var(--hcn-focus-ring));
}

/* ------------------------------------------------------------ scheda ----- */
/* Nella scheda il cuore vive nella RIGA D'ACQUISTO, accanto a stock
   (v0.4.23): 44px come le CTA, bordo neutro (non compete col brand). */
.hcn-wl-btn--single {
	block-size: 2.75rem;
	inline-size: 2.75rem;
	border: var(--hcn-border-width, 1px) solid var(--hcn-border);
	color: var(--hcn-text);
	flex: 0 0 auto;
}

.hcn-wl-btn--single .hcn-wl-outline,
.hcn-wl-btn--single .hcn-wl-fill {
	width: 22px;
	height: 22px;
}

.hcn-wl-btn--single:hover {
	background: color-mix(in srgb, var(--hcn-primary) 8%, transparent);
}

.hcn-wl-btn--single.is-active {
	border-color: var(--hcn-primary);
	background: color-mix(in srgb, var(--hcn-primary) 10%, transparent);
}

/* ---------------------------------------------------------- bacheca ------ */
.hcn-wl-title {
	font-family: var(--hcn-font-display);
	font-size: 1.5rem;
	margin: 0 0 0.75rem;
}

.hcn-wl-count {
	color: var(--hcn-text-muted);
	font-family: var(--hcn-font-display);
	font-size: 0.875rem;
	margin: 0 0 1rem;
}

.hcn-wl-empty {
	padding: 2rem;
	border: 1px dashed var(--hcn-border);
	border-radius: 12px;
	font-family: var(--hcn-font-display);
	color: var(--hcn-text);
}

.hcn-wl-empty .hikaru-card-btn {
	display: inline-block;
	margin-top: 0.5rem;
	padding-block: 12px;
}

.hcn-wl-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

@media (max-width: 1200px) { .hcn-wl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 992px)  { .hcn-wl-grid { grid-template-columns: repeat(2, 1fr); } }

.hcn-wl-dash-count {
	font-family: var(--hcn-font-display);
	color: var(--hcn-text-muted);
}

/* Live region del toggle: nascosta visivamente ma leggibile dagli screen
 * reader. Fallback necessario: WooCommerce la definisce nel SUO css — il
 * fallback rende l'annuncio robusto anche se Woo cambia/rimuove la regola. */
.hcn-wishlist-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip-path: inset(50%);
	overflow: hidden;
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.hcn-wl-btn { transition: none; }
	.hcn-wl-btn:hover,
	.hcn-wl-btn:active { transform: none; }
}
