/**
 * Front-end Stylesheet for News Ticker [GM]
 */

.ag-ticker-container {
	display: flex;
	align-items: center;
	width: 100%;
	background: var(--ag-bg, #1a1a2e);
	color: var(--ag-text-color, #ffffff);
	border: var(--ag-border-width, 0) solid var(--ag-border-color, #333333);
	border-radius: var(--ag-border-radius, 4px);
	font-size: var(--ag-font-size, 14px);
	font-weight: var(--ag-font-weight, normal);
	padding: var(--ag-padding-y, 12px) var(--ag-padding-x, 15px);
	box-sizing: border-box;
	overflow: hidden;
	position: relative;
	box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* RTL Layout overrides */
.ag-is-rtl {
	direction: rtl;
}

/* Badge Styling */
.ag-ticker-badge {
	background: var(--ag-badge-bg, #e74c3c);
	color: var(--ag-badge-color, #ffffff);
	font-weight: bold;
	font-size: 0.8em;
	padding: 6px 12px;
	border-radius: 3px;
	text-transform: uppercase;
	white-space: nowrap;
	display: flex;
	align-items: center;
	margin-right: 15px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	z-index: 10;
	letter-spacing: 0.5px;
}

.ag-is-rtl .ag-ticker-badge {
	margin-right: 0;
	margin-left: 15px;
}

/* Pulse animation on badge */
.ag-ticker-badge.ag-pulse {
	animation: agPulseGlow 2s infinite ease-in-out;
}

@keyframes agPulseGlow {
	0% {
		box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
	}
	70% {
		box-shadow: 0 0 0 6px rgba(231, 76, 60, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
	}
}

/* Content Area Wrapper */
.ag-ticker-content-wrapper {
	flex: 1;
	overflow: hidden;
	position: relative;
	display: flex;
	align-items: center;
	height: 100%;
	min-height: 24px;
}

.ag-ticker-track {
	display: flex;
	align-items: center;
	width: 100%;
	position: relative;
}

/* Ticker Items */
.ag-ticker-item {
	white-space: nowrap;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
}

.ag-ticker-item a {
	color: inherit;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	transition: color 0.2s ease-in-out;
}

.ag-ticker-item a:hover {
	color: var(--ag-link-color, #00adb5);
}

.ag-ticker-icon {
	margin-right: 8px;
	font-size: 1.1em;
	display: inline-flex;
	align-items: center;
}

.ag-is-rtl .ag-ticker-icon {
	margin-right: 0;
	margin-left: 8px;
}

/* Post Metadata Badge Layout & Styles */
.ag-ticker-item-meta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-right: 12px;
	vertical-align: middle;
}

.ag-is-rtl .ag-ticker-item-meta {
	margin-right: 0;
	margin-left: 12px;
}

.ag-meta-pill {
	background: var(--ag-meta-bg, #00adb5);
	color: var(--ag-meta-color, #ffffff);
	font-size: 10px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	line-height: 1;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
	white-space: nowrap;
}

.ag-meta-date, .ag-meta-time {
	opacity: 0.85;
	background: rgba(255, 255, 255, 0.12);
	color: inherit;
	border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Controls Navigation */
.ag-ticker-controls {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: 15px;
	z-index: 10;
}

.ag-is-rtl .ag-ticker-controls {
	margin-left: 0;
	margin-right: 15px;
}

.ag-ticker-controls button {
	background: rgba(255, 255, 255, 0.08);
	border: none;
	color: inherit;
	cursor: pointer;
	opacity: 0.75;
	padding: 5px;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, opacity 0.2s, transform 0.15s;
}

.ag-ticker-controls button:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.15);
	transform: scale(1.05);
}

.ag-ticker-controls button:active {
	transform: scale(0.95);
}

.ag-ticker-controls button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}


/* ==========================================================================
   ANIMATIONS LAYOUTS
   ========================================================================== */

/* 1. HORIZONTAL MARQUEE LAYOUT */
.ag-layout-marquee .ag-ticker-track {
	width: auto;
	will-change: transform;
	animation: ag-marquee var(--ag-speed, 15s) linear infinite;
}

.ag-layout-marquee.ag-hover-paused:hover .ag-ticker-track {
	animation-play-state: paused;
}

.ag-layout-marquee.ag-js-paused .ag-ticker-track {
	animation-play-state: paused;
}

.ag-layout-marquee .ag-ticker-item {
	padding: 0 40px; /* Generous gap between marquee scrolling items */
}

@keyframes ag-marquee {
	0% {
		transform: translate3d(0, 0, 0);
	}
	100% {
		transform: translate3d(-50%, 0, 0);
	}
}

@keyframes ag-marquee-rtl {
	0% {
		transform: translate3d(0, 0, 0);
	}
	100% {
		transform: translate3d(50%, 0, 0);
	}
}

.ag-is-rtl.ag-layout-marquee .ag-ticker-track {
	animation-name: ag-marquee-rtl;
}


/*/* 2. FADE LAYOUT */
.ag-layout-fade .ag-ticker-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.5s ease-in-out;
}

.ag-layout-fade .ag-ticker-item.ag-active {
	opacity: 1;
	pointer-events: auto;
	position: relative; /* Maintain parent wrapper dimensions */
}


/* 3. VERTICAL SLIDE UP LAYOUT */
.ag-layout-slide-up .ag-ticker-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
	transform: translate3d(0, 100%, 0);
	transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}
.ag-layout-slide-up .ag-ticker-item.ag-active {
	opacity: 1;
	pointer-events: auto;
	transform: translate3d(0, 0, 0);
	position: relative;
}
.ag-layout-slide-up .ag-ticker-item.ag-leaving {
	opacity: 0;
	pointer-events: none;
	transform: translate3d(0, -100%, 0);
}

/* 4. VERTICAL SLIDE DOWN LAYOUT */
.ag-layout-slide-down .ag-ticker-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
	transform: translate3d(0, -100%, 0);
	transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}
.ag-layout-slide-down .ag-ticker-item.ag-active {
	opacity: 1;
	pointer-events: auto;
	transform: translate3d(0, 0, 0);
	position: relative;
}
.ag-layout-slide-down .ag-ticker-item.ag-leaving {
	opacity: 0;
	pointer-events: none;
	transform: translate3d(0, 100%, 0);
}

/* 5. HORIZONTAL SLIDE REVEAL LAYOUT */
.ag-layout-slide-horizontal .ag-ticker-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
	transform: translate3d(100%, 0, 0);
	transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
}
.ag-layout-slide-horizontal.ag-is-rtl .ag-ticker-item {
	transform: translate3d(-100%, 0, 0);
}
.ag-layout-slide-horizontal .ag-ticker-item.ag-active {
	opacity: 1;
	pointer-events: auto;
	transform: translate3d(0, 0, 0);
	position: relative;
}
.ag-layout-slide-horizontal .ag-ticker-item.ag-leaving {
	opacity: 0;
	pointer-events: none;
	transform: translate3d(-100%, 0, 0);
}
.ag-layout-slide-horizontal.ag-is-rtl .ag-ticker-item.ag-leaving {
	transform: translate3d(100%, 0, 0);
}

/* 6. ZOOM SCALE IN LAYOUT */
.ag-layout-zoom .ag-ticker-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
	transform: scale(0.85);
	transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
}
.ag-layout-zoom .ag-ticker-item.ag-active {
	opacity: 1;
	pointer-events: auto;
	transform: scale(1);
	position: relative;
}

/* 7. 3D HORIZONTAL BILLBOARD FLIP LAYOUT */
.ag-layout-flip {
	perspective: 800px;
}
.ag-layout-flip .ag-ticker-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
	transform: rotateX(-90deg);
	transform-origin: 50% 50%;
	backface-visibility: hidden;
	transition: transform 0.5s ease, opacity 0.5s ease;
}
.ag-layout-flip .ag-ticker-item.ag-active {
	opacity: 1;
	pointer-events: auto;
	transform: rotateX(0deg);
	position: relative;
}
.ag-layout-flip .ag-ticker-item.ag-leaving {
	opacity: 0;
	pointer-events: none;
	transform: rotateX(90deg);
}

/* 8. ELASTIC SPRING BOUNCE LAYOUT */
.ag-layout-elastic .ag-ticker-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
	transform: translate3d(0, 150%, 0);
	transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s ease;
}
.ag-layout-elastic .ag-ticker-item.ag-active {
	opacity: 1;
	pointer-events: auto;
	transform: translate3d(0, 0, 0);
	position: relative;
}

/* 9. CYBER GLITCH REVEAL LAYOUT */
.ag-layout-glitch .ag-ticker-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
	filter: blur(8px);
	transition: filter 0.3s ease, opacity 0.3s ease;
}
.ag-layout-glitch .ag-ticker-item.ag-active {
	opacity: 1;
	pointer-events: auto;
	filter: blur(0);
	position: relative;
	animation: agGlitchFlash 0.4s ease-out;
}
@keyframes agGlitchFlash {
	0%, 100% { opacity: 1; filter: none; }
	20% { opacity: 0.8; filter: blur(1px) contrast(1.2); }
	40% { opacity: 0.3; filter: blur(3px) contrast(1.8); }
	60% { opacity: 0.9; filter: blur(0px); }
	80% { opacity: 0.6; filter: blur(2px) contrast(1.5); }
}


/* 10. TYPEWRITER LAYOUT */
.ag-layout-typewriter .ag-ticker-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	opacity: 0;
	pointer-events: none;
}

.ag-layout-typewriter .ag-ticker-item.ag-active {
	opacity: 1;
	pointer-events: auto;
	position: relative;
}

.ag-layout-typewriter .ag-active .ag-ticker-text::after {
	content: '|';
	animation: agCursorBlink 0.8s infinite steps(2);
	font-weight: bold;
	margin-left: 3px;
	color: var(--ag-link-color, #00adb5);
}

.ag-is-rtl.ag-layout-typewriter .ag-active .ag-ticker-text::after {
	margin-left: 0;
	margin-right: 3px;
}

@keyframes agCursorBlink {
	0%, 100% { opacity: 0; }
	50% { opacity: 1; }
}
