/* =====================================================================
   Announcements — ticker styles
   Every visual value is a CSS custom property:
   1) .ann-ticker               — defaults (purple preset)
   2) .ann-ticker--skin-*       — style presets, override defaults
   3) Elementor style controls  — set the same vars on {{WRAPPER}} .ann-ticker
                                  (higher specificity → always win)
   ===================================================================== */

.ann-ticker {
	/* fonts */
	--ann-font: "DM Sans";
	--ann-font-mono: "Space Mono";
	--ann-text-font: var(--ann-font);

	/* bar */
	--ann-bg: #6e3b8f;
	--ann-bg-image: none;
	--ann-fg: #ffffff;
	--ann-height: 48px;
	--ann-bar-pad: 0px;
	--ann-border: 0 solid transparent;
	--ann-fade: 28px;
	--ann-focus: var(--ann-fg);

	/* links */
	--ann-link-deco: none;
	--ann-link-hover: #ffb59a;
	--ann-link-hover-deco: underline;

	/* label */
	--ann-label-bg: #e85d2a;
	--ann-label-fg: #ffffff;
	--ann-label-pad: 0px 18px 0px 18px;
	--ann-label-radius: 0px;
	--ann-edge: 14px;
	--ann-dot: currentColor;
	--ann-dot-size: 8px;

	/* tag & date */
	--ann-tag-bg: #e85d2a;
	--ann-tag-fg: #ffffff;
	--ann-tag-border: transparent;
	--ann-tag-bw: 0px;
	--ann-tag-pad: 3px 9px 3px 9px;
	--ann-tag-radius: 999px;
	--ann-date: var(--ann-fg);
	--ann-inner-gap: 10px;

	/* separator */
	--ann-sep: #e85d2a;
	--ann-sep-size: 0.7em;
	--ann-gap: 32px;

	/* buttons */
	--ann-btn-size: 32px;
	--ann-btn-icon: 14px;
	--ann-btn-radius: 50%;
	--ann-btn-bw: 1px;
	--ann-btn-fg: var(--ann-fg);
	--ann-btn-bg: transparent;
	--ann-btn-border: transparent;
	--ann-btn-hover-fg: var(--ann-btn-fg);
	--ann-btn-hover-bg: rgba(255, 255, 255, 0.14);
	--ann-btn-hover-border: rgba(255, 255, 255, 0.3);
	--ann-controls-bg: transparent;

	position: relative;
	display: flex;
	align-items: stretch;
	min-height: var(--ann-height);
	padding: var(--ann-bar-pad);
	overflow: hidden;
	background: var(--ann-bg);
	background-image: var(--ann-bg-image);
	border: var(--ann-border);
	color: var(--ann-fg);
	font-family: var(--ann-font), system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.3;
	box-sizing: border-box;
}

/* ---------- Skins ---------- */

.ann-ticker--skin-orange {
	--ann-bg: #e85d2a;
	--ann-label-bg: #6e3b8f;
	--ann-tag-bg: #ffffff;
	--ann-tag-fg: #e85d2a;
	--ann-sep: #6e3b8f;
	--ann-link-hover: #ffffff;
}

.ann-ticker--skin-light {
	--ann-bg: #ffffff;
	--ann-fg: #2b1a38;
	--ann-border: 1px solid #e7deee;
	--ann-tag-bg: #f2eaf7;
	--ann-tag-fg: #6e3b8f;
	--ann-link-hover: #e85d2a;
	--ann-btn-hover-bg: rgba(110, 59, 143, 0.08);
	--ann-btn-hover-border: rgba(110, 59, 143, 0.25);
}

.ann-ticker--skin-dark {
	--ann-bg: #17111f;
	--ann-fg: #f1ecf5;
	--ann-tag-bg: transparent;
	--ann-tag-fg: #ff8a5c;
	--ann-tag-border: #ff8a5c;
	--ann-tag-bw: 1px;
	--ann-sep: #8f5bb3;
	--ann-link-hover: #ff8a5c;
	--ann-date: #b9a6c9;
}

.ann-ticker--skin-blueprint {
	--ann-bg: #4e2868;
	--ann-bg-image:
		linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
	--ann-text-font: var(--ann-font-mono);
	--ann-tag-bg: transparent;
	--ann-tag-fg: #ffffff;
	--ann-tag-border: rgba(255, 255, 255, 0.55);
	--ann-tag-bw: 1px;
	--ann-tag-radius: 0px;
	--ann-label-radius: 0px;
	--ann-btn-radius: 0px;
	--ann-btn-border: rgba(255, 255, 255, 0.3);
	background-size: 12px 12px;
	font-size: 13px;
}

.ann-ticker--skin-minimal {
	--ann-bg: transparent;
	--ann-fg: #2b1a38;
	--ann-border: 0 solid transparent;
	--ann-label-bg: transparent;
	--ann-label-fg: #e85d2a;
	--ann-label-pad: 0px 16px 0px 0px;
	--ann-tag-bg: transparent;
	--ann-tag-fg: #6e3b8f;
	--ann-tag-border: #6e3b8f;
	--ann-tag-bw: 1px;
	--ann-link-hover: #e85d2a;
	--ann-fade: 16px;
	--ann-btn-hover-bg: rgba(110, 59, 143, 0.08);
	--ann-btn-hover-border: rgba(110, 59, 143, 0.25);
	border-top: 1px solid #e7deee;
	border-bottom: 1px solid #e7deee;
}

.ann-ticker--skin-minimal .ann-ticker__label::after {
	display: none;
}

/* ---------- Base ---------- */

.ann-ticker *,
.ann-ticker *::before,
.ann-ticker *::after {
	box-sizing: border-box;
}

.ann-ticker[hidden] {
	display: none !important;
}

/* ---------- Label ---------- */

.ann-ticker__label {
	position: relative;
	z-index: 2;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: var(--ann-label-pad);
	border-radius: var(--ann-label-radius);
	background: var(--ann-label-bg);
	color: var(--ann-label-fg);
	font-family: var(--ann-font-mono), ui-monospace, "SFMono-Regular", Menlo, monospace;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
}

.ann-ticker--edge-slant .ann-ticker__label,
.ann-ticker--edge-arrow .ann-ticker__label {
	margin-right: var(--ann-edge);
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.ann-ticker--edge-slant .ann-ticker__label::after,
.ann-ticker--edge-arrow .ann-ticker__label::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 100%;
	width: var(--ann-edge);
	background: var(--ann-label-bg);
}

.ann-ticker--edge-slant .ann-ticker__label::after {
	clip-path: polygon(0 0, 100% 0, 0 100%);
}

.ann-ticker--edge-arrow .ann-ticker__label::after {
	clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.ann-ticker__dot {
	position: relative;
	width: var(--ann-dot-size);
	height: var(--ann-dot-size);
	flex: 0 0 var(--ann-dot-size);
	border-radius: 50%;
	background: var(--ann-dot);
}

.ann-ticker__dot::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--ann-dot);
	animation: ann-ticker-pulse 1.8s ease-out infinite;
}

@keyframes ann-ticker-pulse {
	0%   { transform: scale(1);   opacity: 0.7; }
	100% { transform: scale(2.8); opacity: 0; }
}

/* ---------- Scrolling area ---------- */

.ann-ticker__viewport {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	overflow: hidden;
}

.ann-ticker--fade .ann-ticker__viewport {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--ann-fade), #000 calc(100% - var(--ann-fade)), transparent 100%);
	        mask-image: linear-gradient(90deg, transparent 0, #000 var(--ann-fade), #000 calc(100% - var(--ann-fade)), transparent 100%);
}

.ann-ticker__track {
	display: flex;
	flex-wrap: nowrap;
	width: max-content;
	will-change: transform;
	animation: ann-ticker-scroll var(--ann-duration, 30s) linear infinite;
}

.ann-ticker:not(.is-ready) .ann-ticker__track {
	animation: none;
}

.ann-ticker--right .ann-ticker__track {
	animation-direction: reverse;
}

@keyframes ann-ticker-scroll {
	from { transform: translate3d(0, 0, 0); }
	to   { transform: translate3d(calc(-1 * var(--ann-distance, 0px)), 0, 0); }
}

.ann-ticker.is-paused .ann-ticker__track,
.ann-ticker__viewport:focus-within .ann-ticker__track,
.ann-ticker--hover-pause .ann-ticker__viewport:hover .ann-ticker__track {
	animation-play-state: paused;
}

/* reset theme list styles */
.ann-ticker .ann-ticker__group {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: nowrap;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ann-ticker .ann-ticker__entry {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	white-space: nowrap;
}

.ann-ticker .ann-ticker__entry::before,
.ann-ticker .ann-ticker__entry::marker {
	content: none;
}

.ann-ticker__item {
	display: inline-flex;
	align-items: center;
	gap: var(--ann-inner-gap);
	color: inherit;
	text-decoration: none;
}

.ann-ticker__text {
	font-family: var(--ann-text-font), system-ui, sans-serif;
}

.ann-ticker a.ann-ticker__item,
.ann-ticker a.ann-ticker__item:visited {
	color: inherit;
	text-decoration: none;
}

.ann-ticker a.ann-ticker__item .ann-ticker__text {
	text-decoration: var(--ann-link-deco);
	text-underline-offset: 3px;
	transition: color 0.15s ease;
}

.ann-ticker a.ann-ticker__item:hover .ann-ticker__text,
.ann-ticker a.ann-ticker__item:focus-visible .ann-ticker__text {
	color: var(--ann-link-hover);
	text-decoration: var(--ann-link-hover-deco);
}

.ann-ticker a.ann-ticker__item:focus-visible {
	outline: 2px solid var(--ann-focus);
	outline-offset: 3px;
	border-radius: 2px;
}

.ann-ticker__text strong,
.ann-ticker__text b {
	font-weight: 700;
}

.ann-ticker__tag {
	display: inline-block;
	padding: var(--ann-tag-pad);
	border: var(--ann-tag-bw) solid var(--ann-tag-border);
	border-radius: var(--ann-tag-radius);
	background: var(--ann-tag-bg);
	color: var(--ann-tag-fg);
	font-family: var(--ann-font-mono), ui-monospace, Menlo, monospace;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.ann-ticker__date {
	color: var(--ann-date);
	font-family: var(--ann-font-mono), ui-monospace, Menlo, monospace;
	font-size: 12px;
	opacity: 0.8;
}

.ann-ticker__sep {
	display: inline-block;
	padding: 0 var(--ann-gap);
	color: var(--ann-sep);
	font-size: var(--ann-sep-size);
	line-height: 1;
}

.ann-ticker__sep--blank {
	padding: 0 calc(var(--ann-gap) / 2);
}

/* ---------- Buttons ---------- */

.ann-ticker__controls {
	position: relative;
	z-index: 2;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 8px 0 4px;
	background: var(--ann-controls-bg);
}

/* strong reset: themes (e.g. Hello Elementor) style every <button> */
.ann-ticker .ann-ticker__btn,
.ann-ticker .ann-ticker__btn:hover,
.ann-ticker .ann-ticker__btn:focus,
.ann-ticker .ann-ticker__btn:active {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--ann-btn-size);
	height: var(--ann-btn-size);
	min-height: 0;
	margin: 0;
	padding: 0;
	border: var(--ann-btn-bw) solid var(--ann-btn-border);
	border-radius: var(--ann-btn-radius);
	background: var(--ann-btn-bg);
	box-shadow: none;
	color: var(--ann-btn-fg);
	cursor: pointer;
	line-height: 1;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ann-ticker .ann-ticker__btn:hover {
	background: var(--ann-btn-hover-bg);
	border-color: var(--ann-btn-hover-border);
	color: var(--ann-btn-hover-fg);
}

.ann-ticker .ann-ticker__btn:focus-visible {
	outline: 2px solid var(--ann-focus);
	outline-offset: 1px;
}

.ann-ticker__icon {
	width: var(--ann-btn-icon);
	height: var(--ann-btn-icon);
	fill: currentColor;
}

.ann-ticker__icon--play,
.ann-ticker.is-paused .ann-ticker__icon--pause {
	display: none;
}

.ann-ticker.is-paused .ann-ticker__icon--play {
	display: block;
}

/* ---------- Static mode (reduced motion) ---------- */

.ann-ticker.is-static .ann-ticker__track {
	animation: none;
	transform: none;
}

.ann-ticker.is-static .ann-ticker__viewport {
	overflow-x: auto;
	scrollbar-width: thin;
	-webkit-mask-image: none;
	        mask-image: none;
}

.ann-ticker.is-static .ann-ticker__toggle {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.ann-ticker__track,
	.ann-ticker__dot::after {
		animation: none !important;
	}
	.ann-ticker__viewport {
		overflow-x: auto;
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	.ann-ticker {
		font-size: 14px;
	}
	.ann-ticker--label-compact .ann-ticker__label {
		padding-left: 14px;
		padding-right: 14px;
	}
	.ann-ticker--label-compact .ann-ticker__label-text {
		position: absolute !important;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
	.ann-ticker__controls {
		padding: 0 4px 0 0;
	}
}

/* ---------- Editor placeholder ---------- */

.ann-ticker--empty {
	align-items: center;
	padding: 0 18px;
	opacity: 0.6;
	font-style: italic;
}
