/* Emirates Elements: scroll helpers for containers.
 *
 *  eg-scroll-hint  on the OUTER (non-scrolling) container: adds a vertical "SCROLL DOWN" label with an arrow just
 *                  outside its right edge, centred vertically. Move it with --eg-hint-right (default -36px).
 *  eg-scrollbar    on the container that scrolls: a slim scrollbar that appears only while hovering it.
 *
 * Each can be set as a CSS class, as the element's ID (eg-scroll-hint / eg-scrollbar) or as a custom attribute
 * (data-eg-scroll-hint / data-eg-scrollbar), whichever the element type offers. */

/* ---------- Scroll Down label ---------- */
:is(.eg-scroll-hint, #eg-scroll-hint, [data-eg-scroll-hint]) {
	position: relative;
}

:is(.eg-scroll-hint, #eg-scroll-hint, [data-eg-scroll-hint])::after {
	content: "Scroll down";
	content: "Scroll down" / ""; /* decorative: hidden from screen readers where supported */
	position: absolute;
	top: 50%;
	right: var(--eg-hint-right, -36px);
	transform: translateY(-50%);
	writing-mode: vertical-rl;
	padding-bottom: 28px;
	background: url("data:image/svg+xml,%3Csvg width='12' height='16' viewBox='0 0 12 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 1v13M1.5 9.5L6 14l4.5-4.5' stroke='%2348151E' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center bottom / 12px 16px;
	font-family: Manrope, sans-serif;
	font-size: 11px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--e-global-color-primary, #48151E);
	pointer-events: none;
}

/* Tablet and mobile have no page margin to hold it, so it would cause sideways scrolling. */
@media (max-width: 1024px) {
	:is(.eg-scroll-hint, #eg-scroll-hint, [data-eg-scroll-hint])::after {
		display: none;
	}
}

/* ---------- Scrollbar that shows only on hover ---------- */
:is(.eg-scrollbar, #eg-scrollbar, [data-eg-scrollbar]) {
	scrollbar-width: thin;
	scrollbar-color: transparent transparent;
}

:is(.eg-scrollbar, #eg-scrollbar, [data-eg-scrollbar]):hover,
:is(.eg-scrollbar, #eg-scrollbar, [data-eg-scrollbar]):focus-within {
	scrollbar-color: var(--e-global-color-primary, #48151E) transparent;
}

/* Older Safari only (no scrollbar-color): same idea with the WebKit parts. */
@supports not (scrollbar-color: auto) {
	:is(.eg-scrollbar, #eg-scrollbar, [data-eg-scrollbar])::-webkit-scrollbar {
		width: 6px;
		height: 6px;
	}

	:is(.eg-scrollbar, #eg-scrollbar, [data-eg-scrollbar])::-webkit-scrollbar-track {
		background: transparent;
	}

	:is(.eg-scrollbar, #eg-scrollbar, [data-eg-scrollbar])::-webkit-scrollbar-thumb {
		border-radius: 6px;
		background: transparent;
	}

	:is(.eg-scrollbar, #eg-scrollbar, [data-eg-scrollbar]):hover::-webkit-scrollbar-thumb {
		background: var(--e-global-color-primary, #48151E);
	}
}
