/* Immagini e copertine (lavoro 111) e testo delle schede prodotto (lavoro 142), spenti per lo staff da mg-staff su <html>.
   Progetti: docs/plans/2026-11-18-blocco-copia-immagini-design.md, docs/plans/2026-12-02-blocco-copia-testo-design.md. */

html:not(.mg-staff) img {
	-webkit-user-drag: none;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	user-select: none;
}

/* Sulle foto dentro un link il tasto destro arriva al link: restano solo le voci del link. */
html:not(.mg-staff) a[href] img {
	pointer-events: none;
}

html:not(.mg-staff) .wp-block-cover {
	-webkit-touch-callout: none;
}

/* La proprieta' e' ereditata: i link della copertina tornano al menu normale.
   :where tiene bassa la specificita', cosi' la regola dei link a file qui sotto vince. */
html:not(.mg-staff) .wp-block-cover :where(a[href]) {
	-webkit-touch-callout: default;
}

/* Testo della scheda prodotto: niente selezione ne' menu di pressione lunga.
   Progetto: docs/plans/2026-12-02-blocco-copia-testo-design.md. */
html:not(.mg-staff) body.single-product div.product {
	-webkit-user-select: none;
	user-select: none;
	-webkit-touch-callout: none;
}

/* Zona ed esclusioni stanno anche nel JS: vanno cambiate insieme. Proprieta' ereditata: i controlli tornano normali. */
html:not(.mg-staff) body.single-product div.product :where(a[href], input, select, textarea, button) {
	-webkit-user-select: auto;
	user-select: auto;
}

/* Specificita' piu' bassa della regola dei link a file immagine qui sotto, che deve vincere sulla galleria. */
html:not(.mg-staff) :where(body.single-product div.product a[href]) {
	-webkit-touch-callout: default;
}

/* Link a un file immagine che contengono una foto (galleria): nessun menu, nessun trascinamento. */
html:not(.mg-staff) a[href$=".jpg" i]:has(img),
html:not(.mg-staff) a[href$=".jpeg" i]:has(img),
html:not(.mg-staff) a[href$=".png" i]:has(img),
html:not(.mg-staff) a[href$=".gif" i]:has(img),
html:not(.mg-staff) a[href$=".webp" i]:has(img),
html:not(.mg-staff) a[href$=".avif" i]:has(img),
html:not(.mg-staff) a[href$=".svg" i]:has(img) {
	-webkit-touch-callout: none;
	-webkit-user-drag: none;
}
