/**
 * Frontend Styles for Techbari News scroll
 */

.tbns-ticker-wrap {
	display: flex;
	align-items: center;
	height: 48px;
	overflow: hidden;
	box-sizing: border-box;
	transition: background 0.3s ease, border-color 0.3s ease;
	width: 100%;
}

/* Position Styles */
.tbns-position-sticky-bottom {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	z-index: 999999;
}

.tbns-position-sticky-top {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 999999;
}

.tbns-position-below_header {
	position: relative;
	width: 100%;
	z-index: 99999;
}

.tbns-position-above_footer {
	position: relative;
	width: 100%;
	z-index: 99999;
	margin-top: 20px;
}

.tbns-position-inline {
	position: relative;
	width: 100%;
	z-index: 999;
	margin: 15px 0;
}

/* Title Badge Styling */
.tbns-ticker-title {
	height: 100%;
	display: flex;
	align-items: center;
	padding: 0 24px;
	font-weight: 700;
	font-size: 14px;
	z-index: 20;
	position: relative;
	white-space: nowrap;
	box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
	transition: all 0.3s ease;
}

/* Badge Shape Modifiers */
.tbns-ticker-title.tbns-title-rounded {
	border-radius: 4px;
	height: 75%;
	margin-left: 8px;
	margin-right: 8px;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.tbns-ticker-title.tbns-title-angle {
	transform: skewX(-15deg);
	margin-left: -10px;
	padding-right: 30px;
}

.tbns-ticker-title.tbns-title-angle span {
	transform: skewX(15deg);
	display: inline-block;
}

/* Content & Scrolling Marquee Track */
.tbns-ticker-content {
	flex-grow: 1;
	overflow: hidden;
	height: 100%;
	display: flex;
	align-items: center;
	position: relative;
}

.tbns-ticker-track {
	display: flex;
	align-items: center;
	white-space: nowrap;
	padding-left: 20px;
}

/* Scrolling Direction Animations */
.tbns-dir-ltr .tbns-ticker-track {
	animation: tbns-marquee-left 25s linear infinite;
}

.tbns-dir-rtl .tbns-ticker-track {
	animation: tbns-marquee-right 25s linear infinite;
}

/* Pause on Hover option */
.tbns-pause-hover:hover .tbns-ticker-track {
	animation-play-state: paused;
}

/* Individual Post Items Styling */
.tbns-ticker-item {
	display: inline-block;
	padding: 0 16px;
	font-weight: 500;
	font-size: 0.95em;
}

.tbns-ticker-item a {
	text-decoration: none;
	transition: color 0.2s ease;
	outline: none;
}

.tbns-item-date {
	opacity: 0.7;
	font-size: 0.85em;
	margin-right: 8px;
	font-weight: 400;
}

.tbns-ticker-separator {
	opacity: 0.35;
	font-size: 1.2em;
	user-select: none;
}

/* Pulse Live Red Dot Animation */
.tbns-live-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	background-color: #ef4444;
	border-radius: 50%;
	margin-right: 6px;
	box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
	animation: tbns-pulse-dot 1.5s infinite;
	vertical-align: middle;
}

@keyframes tbns-pulse-dot {
	0% {
		box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
	}
	70% {
		box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
	}
}

/* Loop Animation Keyframes */
@keyframes tbns-marquee-left {
	0% {
		transform: translate3d(0, 0, 0);
	}
	100% {
		transform: translate3d(-50%, 0, 0);
	}
}

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

/* Responsive Rules */
@media screen and (max-width: 768px) {
	.tbns-ticker-wrap {
		height: 42px;
	}
	.tbns-ticker-title {
		padding: 0 16px;
		font-size: 12px;
	}
	.tbns-ticker-item {
		padding: 0 10px;
	}
	.tbns-item-date {
		display: none;
	}
	/* Class to hide entire ticker on mobile screens if enabled */
	.tbns-hide-mobile {
		display: none !important;
	}
}

@media screen and (max-width: 480px) {
	.tbns-ticker-title {
		padding: 0 10px;
	}
	.tbns-ticker-track {
		padding-left: 10px;
	}
}
