/**
 * IEMA shared carousel interaction styles.
 *
 * Applies to every `[data-iema-carousel]` viewport (Latest Articles,
 * Partners, Projects). Purely behavioural — cursor affordance for the
 * new desktop click-and-drag and the transient state while dragging. It
 * does NOT touch layout, sizing or the pixel-matched card designs, which
 * remain owned by each block's own stylesheet.
 *
 * Loaded once, globally, by iema_enqueue_carousel_assets() alongside
 * assets/js/iema-carousel.js.
 */

/* Stop images/links from being "ghost dragged" by the browser while the
   user drags the carousel. Harmless on touch. */
[data-iema-viewport] img,
[data-iema-viewport] a {
	-webkit-user-drag: none;
}

/* Grab affordance appears only once JS confirms the track overflows
   (class toggled by the engine). */
[data-iema-carousel] [data-iema-viewport].is-draggable {
	cursor: grab;
}

/* While actively dragging with the mouse: show the closed hand, freeze
   snap so the track follows the cursor 1:1, and block text selection.
   The `[data-iema-carousel]` prefix keeps this ahead of the blocks'
   own `.iema-*__viewport { scroll-snap-type }` rules on specificity. */
[data-iema-carousel] [data-iema-viewport].is-dragging {
	cursor: grabbing;
	scroll-snap-type: none;
	scroll-behavior: auto;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

[data-iema-carousel] [data-iema-viewport].is-dragging a {
	pointer-events: none;
}
