/**
 * Event Countdown Styles - Spectacular Edition
 */

.mlet-countdown-container {
	position: relative;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: clamp(15px, 2vw, 30px);
	padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 2.5rem);
	margin: clamp(1.5rem, 3vw, 2.5rem) 0;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(102, 126, 234, 0.4);
	width: 100%;
	box-sizing: border-box;
}

/* Animated Background */
.mlet-countdown-background {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	overflow: hidden;
	opacity: 0.15;
}

.mlet-countdown-particles {
	width: 100%;
	height: 100%;
	background-image: 
		radial-gradient(circle, white 2px, transparent 2px),
		radial-gradient(circle, white 2px, transparent 2px);
	background-size: 50px 50px, 80px 80px;
	background-position: 0 0, 40px 40px;
	animation: particlesMove 20s linear infinite;
}

@keyframes particlesMove {
	0% { transform: translateY(0); }
	100% { transform: translateY(-50px); }
}

/* Content */
.mlet-countdown-content {
	position: relative;
	z-index: 2;
}

/* Header */
.mlet-countdown-header {
	text-align: center;
	margin-bottom: clamp(2rem, 5vw, 3rem);
}

.mlet-countdown-icon {
	font-size: clamp(2.5rem, 7vw, 4.5rem);
	display: inline-block;
}

.mlet-countdown-title {
	color: white;
	font-size: clamp(1.5rem, 5vw, 2.625rem);
	font-weight: 900;
	margin: clamp(0.75rem, 2vw, 1.25rem) 0 clamp(0.5rem, 1.5vw, 0.625rem);
	text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
	letter-spacing: clamp(0.5px, 0.1vw, 1px);
	text-transform: uppercase;
	line-height: 1.2;
}

.mlet-countdown-subtitle {
	color: rgba(255, 255, 255, 0.95);
	font-size: clamp(1.125rem, 3vw, 1.5rem);
	font-weight: 600;
	margin: 0 0 clamp(0.5rem, 1.5vw, 0.625rem);
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	line-height: 1.3;
}

.mlet-countdown-date {
	color: rgba(255, 255, 255, 0.85);
	font-size: clamp(0.875rem, 2.5vw, 1.125rem);
	margin: 0;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Timer */
.mlet-countdown-timer {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: clamp(0.375rem, 1.5vw, 1.25rem);
	margin-bottom: clamp(2rem, 5vw, 3rem);
	flex-wrap: nowrap; /* NUNCA hace wrap */
	overflow: visible;
	width: 100%;
	max-width: 100%;
}

.mlet-countdown-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(0.25rem, 1vw, 0.75rem);
	flex: 0 1 auto;
	min-width: 0; /* Permite que se encoja */
}

/* Number Cards - Simplified */
.mlet-countdown-number {
	position: relative;
	width: clamp(28px, 7vw, 75px);
	height: clamp(34px, 9vw, 90px);
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(10px);
	border: clamp(1px, 0.2vw, 2px) solid rgba(255, 255, 255, 0.3);
	border-radius: clamp(5px, 1vw, 9px);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 
		0 10px 30px rgba(0, 0, 0, 0.3),
		0 -5px 20px rgba(255, 255, 255, 0.1) inset;
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	animation: cardPulse 3s ease-in-out infinite;
	transform-style: preserve-3d;
	perspective: 1000px;
}

/* Flip animation class */
.mlet-countdown-number.flip {
	animation: flipCard 0.6s ease;
}

@keyframes flipCard {
	0% { transform: rotateX(0deg); }
	50% { transform: rotateX(90deg); }
	100% { transform: rotateX(0deg); }
}

@keyframes cardPulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.05); }
}

.mlet-countdown-number::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
	border-radius: 15px;
	pointer-events: none;
}

.mlet-countdown-value {
	font-size: clamp(1.5rem, 6vw, 3.5rem);
	font-weight: 900;
	color: white;
	text-shadow: 
		0 4px 15px rgba(0, 0, 0, 0.5),
		0 0 30px rgba(255, 255, 255, 0.3);
	line-height: 1;
	font-family: 'Arial Black', 'Arial Bold', sans-serif;
	user-select: none;
	position: relative;
	z-index: 1;
	animation: numberGlow 2s ease-in-out infinite;
}

@keyframes numberGlow {
	0%, 100% { text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 255, 255, 0.3); }
	50% { text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 255, 255, 0.6); }
}

/* Label */
.mlet-countdown-label {
	color: white;
	font-size: clamp(1.5rem, 5.5vw, 2.5rem) !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: clamp(0.5px, 0.3vw, 2.5px);
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
	white-space: nowrap;
	line-height: 1.2 !important;
}

.mlet-countdown-unit .mlet-countdown-label {
	font-size: clamp(1.5rem, 5.5vw, 2.5rem) !important;
}

/* Separator */
.mlet-countdown-separator {
	font-size: clamp(1.5rem, 4vw, 3rem);
	font-weight: 900;
	color: white;
	text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
	margin: 0 clamp(0.125rem, 0.5vw, 0.5rem);
	animation: blink 2s ease-in-out infinite;
	line-height: 1;
	flex-shrink: 0;
}

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

/* Footer Button */
.mlet-countdown-footer {
	text-align: center;
}

.mlet-countdown-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 18px 40px;
	background: white;
	color: #667eea;
	border-radius: 50px;
	font-size: 20px;
	font-weight: 800;
	text-decoration: none;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
	transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	text-transform: uppercase;
	letter-spacing: 1px;
}

.mlet-countdown-btn:hover {
	transform: translateY(-5px) scale(1.05);
	box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
	background: linear-gradient(135deg, #FFE66D 0%, #FF6B6B 100%);
	color: white;
}

.mlet-btn-icon {
	font-size: 28px;
	animation: bounce 1s ease-in-out infinite;
}

/* Glow Effect */
.mlet-countdown-card-top::before,
.mlet-countdown-card-bottom::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
	pointer-events: none;
}

/* Pulse Animation on Cards */
.mlet-countdown-card {
	animation: cardPulse 3s ease-in-out infinite;
}

@keyframes cardPulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.02); }
}

/* Event Finished State */
.mlet-countdown-finished {
	background: linear-gradient(135deg, #434343 0%, #000000 100%);
	border-radius: 30px;
	padding: 60px 40px;
	text-align: center;
	color: white;
	margin: 40px 0;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.mlet-finished-icon {
	font-size: 80px;
	margin-bottom: 20px;
	animation: rotate 3s linear infinite;
}

@keyframes rotate {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.mlet-countdown-finished h3 {
	font-size: 36px;
	font-weight: 900;
	margin: 0 0 15px;
	color: #FFE66D;
}

.mlet-countdown-finished p {
	font-size: 18px;
	margin: 10px 0;
	opacity: 0.9;
}

.mlet-finished-message {
	font-size: 16px;
	opacity: 0.7;
	margin-top: 20px;
}

/* Progress Bar */
.mlet-countdown-progress {
	width: 100%;
	height: 6px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 10px;
	overflow: hidden;
	margin-top: 30px;
	position: relative;
}

.mlet-countdown-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #FFE66D 0%, #FF6B6B 100%);
	border-radius: 10px;
	transition: width 1s ease;
	box-shadow: 0 0 20px rgba(255, 230, 109, 0.8);
	animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
	0%, 100% { box-shadow: 0 0 20px rgba(255, 230, 109, 0.8); }
	50% { box-shadow: 0 0 30px rgba(255, 230, 109, 1); }
}

/* Urgency Messages */
.mlet-countdown-urgency {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	text-align: center;
	margin-top: 20px;
	padding: 15px 25px;
	background: rgba(255, 107, 107, 0.2);
	border: 2px solid rgba(255, 107, 107, 0.5);
	border-radius: 15px;
	backdrop-filter: blur(10px);
}

.mlet-countdown-urgency-text {
	color: white;
	font-size: 18px;
	font-weight: 700;
	margin: 0;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Confetti Effect (when almost there) */
.mlet-countdown-container.almost-time::before {
	content: '🎊';
	position: absolute;
	font-size: 40px;
	animation: confettiFall 3s linear infinite;
	top: -50px;
	left: 10%;
}

.mlet-countdown-container.almost-time::after {
	content: '🎉';
	position: absolute;
	font-size: 40px;
	animation: confettiFall 3s linear infinite 1.5s;
	top: -50px;
	right: 10%;
}

@keyframes confettiFall {
	0% { transform: translateY(0) rotate(0deg); opacity: 1; }
	100% { transform: translateY(500px) rotate(360deg); opacity: 0; }
}

/* Responsive - Mobile Optimization */
@media (max-width: 768px) {
	.mlet-countdown-container {
		padding: 1.75rem 1rem;
		border-radius: 18px;
		margin: 1.5rem 0;
	}
	
	.mlet-countdown-icon {
		font-size: 2.75rem;
	}
	
	.mlet-countdown-title {
		font-size: 1.4rem;
	}
	
	.mlet-countdown-date {
		font-size: 0.875rem;
	}
	
	.mlet-countdown-timer {
		gap: 0.625rem;
	}
	
	.mlet-countdown-number {
		width: 38px;
		height: 46px;
	}
	
	.mlet-countdown-value {
		font-size: 1.75rem;
	}
	
	.mlet-countdown-separator {
		font-size: 1.5rem;
		margin: 0 0.125rem;
	}
	
	.mlet-countdown-label {
		font-size: 1.3rem !important;
	}
	
	.mlet-countdown-unit .mlet-countdown-label {
		font-size: 1.3rem !important;
	}
}

@media (max-width: 480px) {
	.mlet-countdown-container {
		padding: 1.5rem 0.75rem;
	}
	
	.mlet-countdown-header {
		margin-bottom: 1.25rem;
	}
	
	.mlet-countdown-icon {
		font-size: 2.25rem;
	}
	
	.mlet-countdown-title {
		font-size: 1.15rem;
		padding: 0 0.5rem;
	}
	
	.mlet-countdown-timer {
		gap: 0.375rem;
		margin-bottom: 1.5rem;
	}
	
	.mlet-countdown-number {
		width: 32px;
		height: 38px;
	}
	
	.mlet-countdown-value {
		font-size: 1.5rem;
	}
	
	.mlet-countdown-separator {
		font-size: 1.35rem;
		margin: 0;
	}
	
	.mlet-countdown-label {
		font-size: 1.15rem !important;
		letter-spacing: 0.5px;
	}
	
	.mlet-countdown-unit .mlet-countdown-label {
		font-size: 1.15rem !important;
	}
}

@media (max-width: 360px) {
	.mlet-countdown-timer {
		gap: 0.25rem;
	}
	
	.mlet-countdown-number {
		width: 30px;
		height: 36px;
	}
	
	.mlet-countdown-value {
		font-size: 1.35rem;
	}
	
	.mlet-countdown-separator {
		font-size: 1.25rem;
	}
	
	.mlet-countdown-label {
		font-size: 1rem !important;
	}
	
	.mlet-countdown-unit .mlet-countdown-label {
		font-size: 1rem !important;
	}
}

/* Extra small - Para anchos menores a 240px o contenedores laterales */
@media (max-width: 240px), (min-width: 0px) {
	.mlet-countdown-container {
		padding: 1.25rem 0.5rem;
	}
	
	.mlet-countdown-timer {
		gap: 0.1875rem;
	}
	
	.mlet-countdown-number {
		width: 28px;
		height: 34px;
		border-radius: 5px;
	}
	
	.mlet-countdown-value {
		font-size: 1.25rem;
	}
	
	.mlet-countdown-separator {
		font-size: 1.125rem;
		margin: 0;
	}
	
	.mlet-countdown-label {
		font-size: 1rem !important;
		letter-spacing: 0;
	}
	
	.mlet-countdown-unit .mlet-countdown-label {
		font-size: 1rem !important;
	}
}

@media (min-width: 1200px) {
	.mlet-countdown-timer {
		gap: 1.5rem;
	}
	
	.mlet-countdown-number {
		width: 85px;
		height: 100px;
	}
	
	.mlet-countdown-value {
		font-size: 3.5rem;
	}
}

/* Neon Style Variant */
.mlet-countdown-container[data-style="neon"] {
	background: linear-gradient(135deg, #0a0a0a 0%, #1a0a1a 100%) !important;
	border: 3px solid #00ffff !important;
	box-shadow: 
		0 0 20px rgba(0, 255, 255, 0.5),
		0 0 40px rgba(0, 255, 255, 0.3),
		0 0 60px rgba(0, 255, 255, 0.1) !important;
}

.mlet-countdown-container[data-style="neon"] .mlet-countdown-number {
	background: rgba(0, 255, 255, 0.1) !important;
	border-color: #00ffff !important;
	box-shadow: 
		0 0 20px rgba(0, 255, 255, 0.4),
		inset 0 0 20px rgba(0, 255, 255, 0.1) !important;
}

.mlet-countdown-container[data-style="neon"] .mlet-countdown-value {
	color: #00ffff !important;
	text-shadow: 
		0 0 10px #00ffff,
		0 0 20px #00ffff,
		0 0 30px #00ffff,
		0 0 40px #00ffff !important;
}

.mlet-countdown-container[data-style="neon"] .mlet-countdown-label,
.mlet-countdown-container[data-style="neon"] .mlet-countdown-title,
.mlet-countdown-container[data-style="neon"] .mlet-countdown-separator {
	color: #00ffff !important;
	text-shadow: 0 0 10px rgba(0, 255, 255, 0.8) !important;
}

/* Elegant Style Variant */
.mlet-countdown-container[data-style="elegant"] {
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%, #0f3460 100%) !important;
	border: 2px solid rgba(212, 175, 55, 0.5) !important;
	box-shadow: 
		0 10px 40px rgba(0, 0, 0, 0.8),
		inset 0 0 60px rgba(212, 175, 55, 0.1) !important;
}

.mlet-countdown-container[data-style="elegant"] .mlet-countdown-number {
	background: rgba(212, 175, 55, 0.1) !important;
	border-color: rgba(212, 175, 55, 0.4) !important;
	box-shadow: 
		0 5px 20px rgba(0, 0, 0, 0.5),
		inset 0 0 20px rgba(212, 175, 55, 0.15) !important;
}

.mlet-countdown-container[data-style="elegant"] .mlet-countdown-value {
	color: #d4af37 !important;
	text-shadow: 
		0 0 10px rgba(212, 175, 55, 0.6),
		0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.mlet-countdown-container[data-style="elegant"] .mlet-countdown-label,
.mlet-countdown-container[data-style="elegant"] .mlet-countdown-title {
	color: #d4af37 !important;
	text-shadow: 0 0 8px rgba(212, 175, 55, 0.5) !important;
}

.mlet-countdown-container[data-style="elegant"] .mlet-countdown-separator {
	color: rgba(212, 175, 55, 0.7) !important;
}

