/**
 * Kubota Europe shared slider navigation arrow (`.kbeu-nav-arrow`).
 *
 * The single, standardized prev/next control reused across the plugin's carousels
 * (News, Sliders, Products by division). It reproduces the Figma design
 * (node 4595-1810): the button itself is a circular disc holding a thin white line
 * arrow (the direction comes from the SVG inside, left or right).
 *
 * Two states, driven by the button's `:disabled`:
 *   - Enabled ("active"): a filled teal disc with a white arrow and NO border.
 *   - Disabled ("inactive"): a transparent disc with a light outline ring and a dim
 *     arrow.
 *
 * The palette is set through custom properties so an element on a light background
 * can keep the idle state legible — use the `.kbeu-nav-arrow--on-light` modifier for
 * that (e.g. Products by division). Looping sliders that never disable their arrows
 * (Sliders) simply show both as the active teal disc.
 *
 * Usage: add `.kbeu-nav-arrow` next to the element's own arrow class (kept for JS
 * hooks and layout), and put the shared line-arrow SVG inside the button:
 *   prev: <path d="M20 12H4m0 0l7-7m-7 7l7 7" .../>
 *   next: <path d="M4 12h16m0 0l-7-7m7 7l-7 7" .../>
 */

.kbeu-nav-arrow {
	--kbeu-nav-arrow-size: 48px;
	--kbeu-nav-arrow-active-bg: var( --kbeu-color-teal );
	--kbeu-nav-arrow-active-hover-bg: var( --kbeu-color-teal-dark );
	--kbeu-nav-arrow-active-fg: #fff;
	--kbeu-nav-arrow-idle-bg: transparent;
	--kbeu-nav-arrow-idle-border: rgba( 255, 255, 255, 0.8 );
	--kbeu-nav-arrow-idle-fg: rgba( 255, 255, 255, 0.55 );
	--kbeu-nav-arrow-focus-ring: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: var( --kbeu-nav-arrow-size );
	height: var( --kbeu-nav-arrow-size );
	padding: 0;
	border: 1px solid transparent;
	border-radius: 50%;
	background: var( --kbeu-nav-arrow-active-bg );
	color: var( --kbeu-nav-arrow-active-fg );
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Just the line arrow, centered at ~48% of the disc. */
.kbeu-nav-arrow svg {
	width: 48%;
	height: 48%;
}

.kbeu-nav-arrow:hover:not( :disabled ),
.kbeu-nav-arrow:focus-visible:not( :disabled ) {
	background: var( --kbeu-nav-arrow-active-hover-bg );
	border-color: var( --kbeu-nav-arrow-active-hover-bg );
}

.kbeu-nav-arrow:focus-visible {
	outline: 3px solid var( --kbeu-nav-arrow-focus-ring );
	outline-offset: 2px;
}

.kbeu-nav-arrow:disabled {
	background: var( --kbeu-nav-arrow-idle-bg );
	border-color: var( --kbeu-nav-arrow-idle-border );
	color: var( --kbeu-nav-arrow-idle-fg );
	cursor: default;
}

/* On a light background the idle/disabled disc must stay visible: a white disc with a
   grey ring and a grey arrow (matches the old Products-by-division look). */
.kbeu-nav-arrow--on-light {
	--kbeu-nav-arrow-idle-bg: #fff;
	--kbeu-nav-arrow-idle-border: #c7c7c7;
	--kbeu-nav-arrow-idle-fg: #9a9a9a;
	--kbeu-nav-arrow-focus-ring: var( --kbeu-color-teal );
}

@media ( prefers-reduced-motion: reduce ) {
	.kbeu-nav-arrow {
		transition: none;
	}
}
