/**
 * Lyode Dynamic Typing Animation Frontend Styles
 * Version: 1.0.0
 */

.lyode-typing-container {
	display: inline-block;
	position: relative;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	vertical-align: baseline;
}

.lyode-typing-text {
	display: inline-block;
	position: relative;
	white-space: nowrap;
	overflow: hidden;
	color: var(--lyode-typing-text-color, inherit);
	vertical-align: baseline;
	line-height: inherit;
}

.lyode-typing-text:empty::after {
	content: '\00a0';
	visibility: hidden;
}

.lyode-typing-cursor {
	display: inline-block;
	position: relative;
	animation: lyode-typing-blink 0.7s infinite;
	color: var(--lyode-typing-cursor-color, currentColor);
	vertical-align: baseline;
	line-height: inherit;
	font-family: inherit;
	font-size: inherit;
	width: 2px;
	height: 1.2em;
	background-color: var(--lyode-typing-cursor-color, currentColor);
	margin-left: 1px;
}

@keyframes lyode-typing-blink {
	0%, 50% { opacity: 1; }
	51%, 100% { opacity: 0; }
}

/* Typewriter style - remove the border cursor since we have a separate cursor element */
.lyode-typing-style-typewriter .lyode-typing-text {
	/* Remove the border cursor to avoid double cursors */
}

/* Glitch style */
.lyode-typing-style-glitch .lyode-typing-text {
	position: relative;
	animation: lyode-typing-glitch 0.3s infinite;
}

.lyode-typing-style-glitch .lyode-typing-text::before,
.lyode-typing-style-glitch .lyode-typing-text::after {
	content: attr(data-text);
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: inherit;
	color: inherit;
}

.lyode-typing-style-glitch .lyode-typing-text::before {
	animation: lyode-typing-glitch-1 0.3s infinite;
	color: #ff0000;
	z-index: -1;
}

.lyode-typing-style-glitch .lyode-typing-text::after {
	animation: lyode-typing-glitch-2 0.3s infinite;
	color: #00ff00;
	z-index: -2;
}

@keyframes lyode-typing-glitch {
	0%, 100% { transform: translate(0); }
	20% { transform: translate(-2px, 2px); }
	40% { transform: translate(-2px, -2px); }
	60% { transform: translate(2px, 2px); }
	80% { transform: translate(2px, -2px); }
}

@keyframes lyode-typing-glitch-1 {
	0%, 100% { transform: translate(0); }
	20% { transform: translate(2px, -2px); }
	40% { transform: translate(2px, 2px); }
	60% { transform: translate(-2px, -2px); }
	80% { transform: translate(-2px, 2px); }
}

@keyframes lyode-typing-glitch-2 {
	0%, 100% { transform: translate(0); }
	20% { transform: translate(-2px, 2px); }
	40% { transform: translate(-2px, -2px); }
	60% { transform: translate(2px, 2px); }
	80% { transform: translate(2px, -2px); }
}

/* Neon style */
.lyode-typing-style-neon {
	overflow: visible !important;
}

.lyode-typing-style-neon .lyode-typing-text {
	color: #fff !important;
	overflow: visible !important;
	text-shadow: 
		0 0 7px #fff,
		0 0 10px #fff,
		0 0 21px #fff,
		0 0 42px var(--lyode-typing-text-color, #0fa),
		0 0 82px var(--lyode-typing-text-color, #0fa),
		0 0 92px var(--lyode-typing-text-color, #0fa),
		0 0 102px var(--lyode-typing-text-color, #0fa),
		0 0 151px var(--lyode-typing-text-color, #0fa);
	animation: lyode-typing-neon-pulse 2s ease-in-out infinite alternate;
}

.lyode-typing-style-neon .lyode-typing-cursor {
	background-color: #fff;
	vertical-align: baseline;
	position: relative;
	top: 0;
	height: 1em;
	box-shadow: 
		0 0 7px #fff,
		0 0 10px #fff,
		0 0 21px #fff,
		0 0 42px var(--lyode-typing-text-color, #0fa),
		0 0 82px var(--lyode-typing-text-color, #0fa),
		0 0 92px var(--lyode-typing-text-color, #0fa),
		0 0 102px var(--lyode-typing-text-color, #0fa),
		0 0 151px var(--lyode-typing-text-color, #0fa);
	animation: lyode-typing-neon-pulse 2s ease-in-out infinite alternate;
}

@keyframes lyode-typing-neon-pulse {
	from {
		text-shadow: 
			0 0 7px #fff,
			0 0 10px #fff,
			0 0 21px #fff,
			0 0 42px var(--lyode-typing-text-color, #0fa),
			0 0 82px var(--lyode-typing-text-color, #0fa),
			0 0 92px var(--lyode-typing-text-color, #0fa),
			0 0 102px var(--lyode-typing-text-color, #0fa),
			0 0 151px var(--lyode-typing-text-color, #0fa);
	}
	to {
		text-shadow: 
			0 0 7px #fff,
			0 0 10px #fff,
			0 0 21px #fff,
			0 0 42px var(--lyode-typing-text-color, #0fa),
			0 0 82px var(--lyode-typing-text-color, #0fa),
			0 0 92px var(--lyode-typing-text-color, #0fa),
			0 0 102px var(--lyode-typing-text-color, #0fa),
			0 0 151px var(--lyode-typing-text-color, #0fa);
	}
}

/* Border radius style */
.lyode-typing-style-border-radius {
	position: relative;
	display: inline-block;
	padding: 8px 20px;
	border: 2px solid var(--lyode-typing-cursor-color, #80ff00);
	border-radius: 50px;
	background: transparent;
}

.lyode-typing-style-border-radius .lyode-typing-text {
	color: var(--lyode-typing-text-color, inherit);
	background: transparent;
}

.lyode-typing-style-border-radius .lyode-typing-cursor {
	background-color: var(--lyode-typing-cursor-color, #80ff00);
	width: 2px;
	height: 1.2em;
	margin-left: 1px;
}



/* Cursor blink animation for when animation stops */
.lyode-typing-cursor-blink {
	animation: lyode-typing-blink 0.7s infinite !important;
}

/* Responsive design */
@media (max-width: 768px) {
	.lyode-typing-container {
		font-size: 0.9em;
	}
	
	.lyode-typing-cursor {
		font-size: 0.9em;
	}
}

@media (max-width: 480px) {
	.lyode-typing-container {
		font-size: 0.8em;
	}
	
	.lyode-typing-cursor {
		font-size: 0.8em;
	}
}

/* Accessibility */
.lyode-typing-text {
	/* Ensure text is readable */
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.lyode-typing-cursor {
	/* Ensure cursor is visible */
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.lyode-typing-style-neon .lyode-typing-text {
		text-shadow: 0 0 2px currentColor;
	}
	
	.lyode-typing-style-neon .lyode-typing-cursor {
		text-shadow: 0 0 2px currentColor;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.lyode-typing-container * {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
	
	.lyode-typing-cursor {
		animation: none !important;
		opacity: 1 !important;
	}
}

/* Print styles */
@media print {
	.lyode-typing-container {
		/* Ensure text is visible in print */
		color: #000 !important;
		background: transparent !important;
	}
	
	.lyode-typing-text {
		/* Remove animations for print */
		animation: none !important;
		text-shadow: none !important;
	}
	
	.lyode-typing-style-neon .lyode-typing-text {
		/* Ensure neon text is readable in print */
		color: #000 !important;
		text-shadow: none !important;
	}
	
	.lyode-typing-cursor {
		/* Hide cursor in print */
		display: none !important;
	}
}