/* Breaking News Ticker CSS */
:root {
	--hinden-ticker-bg: #c8102e; /* Deep Red */
	--hinden-ticker-text: #ffffff;
	--hinden-ticker-hover: #e0e0e0;
	--hinden-ticker-border: rgba(255, 255, 255, 0.2);
}

.hinden-ticker-wrapper {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: var(--hinden-ticker-bg);
	color: var(--hinden-ticker-text);
	z-index: 99998;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
	display: flex;
	justify-content: center;
	align-items: center;
	height: 40px; /* More compact */
	overflow: hidden;
}

/* Push down sticky headers for known themes (e.g. Soledad) to prevent overlapping */
body.hinden-ticker-active .penci_builder_sticky_header_desktop.sticky-apply {
	top: 40px !important;
}
body.admin-bar.hinden-ticker-active .penci_builder_sticky_header_desktop.sticky-apply {
	top: 72px !important;
}
body.hinden-ticker-active .penci_navbar_mobile.mobile-sticky {
	top: 40px !important;
}
body.admin-bar.hinden-ticker-active .penci_navbar_mobile.mobile-sticky {
	top: 40px !important; /* Admin bar scrolls away on mobile, so we just need 40px */
}

.hinden-ticker-inner {
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 1400px;
	height: 100%;
	padding: 0 15px;
}

.hinden-ticker-badge {
	display: flex;
	align-items: center;
	font-weight: 700;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding-right: 15px;
	border-right: 1px solid rgba(255, 255, 255, 0.2);
	white-space: nowrap;
	flex-shrink: 0;
}

.pulse-dot {
	display: inline-block;
	width: 6px;
	height: 6px;
	background-color: #fff;
	border-radius: 50%;
	margin-right: 8px;
	box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
	animation: hinden-pulse 2s infinite;
}

@keyframes hinden-pulse {
	0% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
	}
	70% {
		transform: scale(1);
		box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
	}
	100% {
		transform: scale(0.95);
		box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
	}
}

.hinden-ticker-content-wrapper {
	flex-grow: 1;
	position: relative;
	height: 100%;
	display: flex;
	align-items: center;
	margin: 0 15px;
	overflow: hidden;
}

.hinden-ticker-content {
	position: relative;
	width: 100%;
	height: 100%;
}

.hinden-ticker-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(15px);
	transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.8s;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

.hinden-ticker-item.active {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.hinden-ticker-item.fade-out {
	opacity: 0;
	visibility: hidden;
	transform: translateY(-15px);
}

.hinden-ticker-headline {
	color: var(--hinden-ticker-text) !important;
	text-decoration: none !important;
	font-size: 13px;
	font-weight: 500;
	transition: color 0.2s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
	width: 100%;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

.hinden-ticker-headline::before,
.hinden-ticker-headline::after,
.hinden-ticker-item::before,
.hinden-ticker-item::after {
	display: none !important;
	content: none !important;
}

.hinden-ticker-headline:hover {
	color: var(--hinden-ticker-hover) !important;
	text-decoration: underline !important;
}

.hinden-ticker-controls {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	border-left: 1px solid rgba(255, 255, 255, 0.2);
	padding-left: 15px;
}

.hinden-control-btn {
	background: none;
	border: 1px solid transparent;
	color: var(--hinden-ticker-text);
	cursor: pointer;
	padding: 4px;
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 50%;
	transition: all 0.2s ease;
}

.hinden-control-btn:hover {
	background-color: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.3);
}

.hinden-control-btn svg {
	width: 14px;
	height: 14px;
}

/* Fix spacing issue - apply padding only to the main container or adjust based on site layout */
body.hinden-ticker-active {
	padding-top: 40px !important;
}

/* Adjust WP Admin bar padding if logged in */
body.admin-bar .hinden-ticker-wrapper {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .hinden-ticker-wrapper {
		top: 0;
	}
	
	.hinden-ticker-badge {
		font-size: 11px;
		padding-right: 10px;
	}
	
	.hinden-ticker-headline {
		font-size: 12px;
	}
}

@media screen and (max-width: 600px) {
	.hinden-badge-text {
		display: none;
	}
	
	.hinden-ticker-badge {
		padding-right: 8px;
	}
	
	.hinden-ticker-content-wrapper {
		margin: 0 8px;
	}
	
	.hinden-ticker-controls {
		padding-left: 8px;
		gap: 4px;
	}
	
	.hinden-control-btn svg {
		width: 12px;
		height: 12px;
	}
}
