/**
 * Hopmans Sync - Scrollabels Display Styles
 *
 * Quicklinks-based pattern using margin-left positioning instead of width changes.
 *
 * Architecture:
 * - Container positioned at left: 100% (items slide in from right)
 * - Items use margin-left: -50px (partially visible by default)
 * - Hover expands via negative margin-left (generated inline per item)
 * - Three-element structure: link overlay (p > a), figure, label (p)
 * - Theme color variables for integration
 * - Current site indicator styling
 *
 * @package Hopmans_Sync
 * @since 2.0.0
 */

/* Container - Fixed positioning from left side with transform */
.hopmans-scrollabels-container {
	position: fixed;
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	z-index: 9999;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 10px 0;
}

/* Individual scrollabel item - Margin-based positioning */
.scrollabel-item {
	position: relative;
	margin-left: -50px;
	height: 50px;
	overflow: hidden;
	background-color: var(--e-global-color-primary, #00b5ad);
	border: none;
	border-radius: 4px 0 0 4px;
	box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.1);
	transition: margin-left 0.5s ease-out, box-shadow 0.3s ease;
	cursor: pointer;
	display: flex;
	align-items: center;
	padding: 0;
	gap: 0;
	box-sizing: border-box;
}

/* Hover state - Negative margin expansion (per-item inline CSS overrides this) */
.scrollabel-item:hover {
	box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.2);
	/* margin-left: -XXXpx is set via inline CSS per item */
}

/* Link overlay - First paragraph with anchor (clickable area) */
.scrollabel-item > p:first-of-type {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	z-index: 2;
}

.scrollabel-item > p:first-of-type a {
	display: block;
	width: 100%;
	height: 100%;
	text-indent: -9999px;
	overflow: hidden;
}

/* Logo/Icon figure */
.scrollabel-item figure.scrollabel-logo {
	margin: 0;
	flex-shrink: 0;
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--e-global-color-primary, #00b5ad);
	border-radius: 4px 0 0 4px;
	z-index: 1;
}

.scrollabel-item figure.scrollabel-logo img {
	padding: 5px;
	width: 40px;
	height: 40px;
	object-fit: contain;
	border-radius: 4px 0 0 4px;
}

/* Label text - Last paragraph */
.scrollabel-item > p:last-of-type {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	line-height: 50px;
	padding: 8px 20px 8px 10px;
	height: 50px;
	margin: 0;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
	z-index: 1;
}

/* Show label on hover */
.scrollabel-item:hover > p:last-of-type {
	opacity: 1;
}

/* Current site indicator - Secondary color (orange/accent) */
.scrollabel-item.current-site,
.scrollabel-item.current-site figure.scrollabel-logo {
	background-color: var(--e-global-color-secondary, #ff9800);
}

.scrollabel-item.current-site > p:last-of-type {
	color: #fff;
}

/* Responsive: Hide on mobile devices */
@media (max-width: 767px) {
	.hopmans-scrollabels-container {
		display: none !important;
	}
}
