/**
 * NIYAPRESS: 24 ساعة Ticker Layout Fix
 * Fix timestamp positioning and overall layout alignment
 */

/* Fix ticker item layout - proper RTL structure */
.hero-news-ticker .ticker-item {
	position: relative !important;
	padding: 14px 32px 14px 18px !important;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
	transition: background-color 0.2s ease !important;
	display: block !important;
	direction: rtl !important;
	text-align: right !important;
}

/* Timeline dot on the right side */
.hero-news-ticker .ticker-item::before {
	content: '' !important;
	position: absolute !important;
	right: 18px !important;
	top: 20px !important;
	width: 8px !important;
	height: 8px !important;
	background: var(--brand-red, #001D83) !important;
	border-radius: 50% !important;
	box-shadow: 0 0 0 3px rgba(0, 29, 131, 0.15) !important;
}

/* Vertical line connecting dots */
.hero-news-ticker .ticker-item::after {
	content: '' !important;
	position: absolute !important;
	right: 21px !important;
	top: 28px !important;
	width: 2px !important;
	height: calc(100% - 8px) !important;
	background: rgba(0, 29, 131, 0.15) !important;
}

.hero-news-ticker .ticker-item:last-child::after {
	display: none !important;
}

/* Container for time + content - horizontal layout */
.hero-news-ticker .ticker-item {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-end !important;
	gap: 6px !important;
}

/* Timestamp badge - positioned on the LEFT in RTL (appears right visually) */
.hero-news-ticker .ticker-time {
	display: inline-block !important;
	color: #ffffff !important;
	background: var(--brand-red, #001D83) !important;
	font-size: clamp(11px, 1vw, 12px) !important;
	font-weight: 800 !important;
	margin: 0 !important;
	padding: 3px 10px !important;
	border-radius: 4px !important;
	font-family: 'Tajawal', sans-serif !important;
	direction: ltr !important;
	text-align: center !important;
	min-width: 50px !important;
	flex-shrink: 0 !important;
	align-self: flex-start !important;
}

/* Content container */
.hero-news-ticker .ticker-content {
	margin: 0 !important;
	padding: 0 !important;
	flex: 1 !important;
	width: 100% !important;
	direction: rtl !important;
	text-align: right !important;
}

/* Article link */
.hero-news-ticker .ticker-link {
	color: var(--news-ink, #1a1a1a) !important;
	font-size: clamp(13px, 1.1vw, 14px) !important;
	font-weight: 600 !important;
	line-height: 1.5 !important;
	text-decoration: none !important;
	display: block !important;
	transition: color 0.2s ease !important;
	direction: rtl !important;
	text-align: right !important;
	width: 100% !important;
}

.hero-news-ticker .ticker-link:hover {
	color: var(--brand-red, #001D83) !important;
}

/* Hover effect on item */
.hero-news-ticker .ticker-item:hover {
	background: rgba(0, 29, 131, 0.04) !important;
}

/* Alternative layout: timestamp on same line as title (if preferred) */
.hero-news-ticker .ticker-item.ticker-inline {
	flex-direction: row !important;
	align-items: flex-start !important;
	gap: 10px !important;
}

.hero-news-ticker .ticker-item.ticker-inline .ticker-time {
	margin-top: 2px !important;
	align-self: flex-start !important;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
	.hero-news-ticker .ticker-item {
		padding: 12px 28px 12px 16px !important;
	}
	
	.hero-news-ticker .ticker-item::before {
		right: 16px !important;
	}
	
	.hero-news-ticker .ticker-item::after {
		right: 19px !important;
	}
	
	.hero-news-ticker .ticker-time {
		font-size: 11px !important;
		padding: 2px 8px !important;
		min-width: 45px !important;
	}
	
	.hero-news-ticker .ticker-link {
		font-size: 13px !important;
	}
}

@media (max-width: 768px) {
	.hero-news-ticker .ticker-item {
		padding: 10px 24px 10px 14px !important;
		gap: 4px !important;
	}
	
	.hero-news-ticker .ticker-item::before {
		right: 14px !important;
		width: 6px !important;
		height: 6px !important;
		top: 16px !important;
	}
	
	.hero-news-ticker .ticker-item::after {
		right: 16px !important;
		top: 22px !important;
	}
	
	.hero-news-ticker .ticker-time {
		font-size: 10px !important;
		padding: 2px 6px !important;
		min-width: 40px !important;
	}
	
	.hero-news-ticker .ticker-link {
		font-size: 12px !important;
		line-height: 1.4 !important;
	}
}

/* Ensure proper scroll behavior */
.hero-news-ticker .ticker-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow-y: auto !important;
	flex: 1 !important;
	scrollbar-width: thin !important;
	scrollbar-color: rgba(0, 29, 131, 0.3) transparent !important;
	direction: rtl !important;
}

.hero-news-ticker .ticker-list::-webkit-scrollbar {
	width: 5px !important;
}

.hero-news-ticker .ticker-list::-webkit-scrollbar-track {
	background: transparent !important;
}

.hero-news-ticker .ticker-list::-webkit-scrollbar-thumb {
	background: rgba(0, 29, 131, 0.3) !important;
	border-radius: 3px !important;
}

.hero-news-ticker .ticker-list::-webkit-scrollbar-thumb:hover {
	background: rgba(0, 29, 131, 0.5) !important;
}

/* Header styling */
.hero-news-ticker .ticker-header {
	background: var(--brand-red, #001D83) !important;
	padding: 14px 18px !important;
	text-align: center !important;
}

.hero-news-ticker .ticker-title {
	color: #ffffff !important;
	font-size: clamp(16px, 1.4vw, 18px) !important;
	font-weight: 800 !important;
	margin: 0 !important;
}
