/**
 * Timer Styles
 *
 * Countdown timer frontend styling.
 *
 * @package EMBusinessTimer
 */

/* ==========================================================================
   Base Timer Styles
   ========================================================================== */

.em-countdown-timer {
	background: var(--em-gradient-radial, radial-gradient(circle, #73CDD6 0%, #9CDDE3 35%, #C5EBF0 65%, #FFFFFF 100%));
	padding: 12px 0;
	text-align: center;
	font-family: var(--em-font-body, 'Oswald', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
	position: sticky;
	top: var(--em-header-height, 70px);
	z-index: 99;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.em-countdown-timer__container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.em-countdown-timer__icon {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.em-countdown-timer__icon svg {
	width: 24px;
	height: 24px;
	color: var(--em-text-dark, #000000);
}

.em-countdown-timer__content {
	display: flex;
	align-items: center;
	justify-content: center;
}

.em-countdown-timer__message {
	font-size: 16px;
	font-weight: 400;
	color: var(--em-text-dark, #000000);
	line-height: 1.4;
}

.em-countdown-timer__time {
	font-weight: 600;
	color: var(--em-text-dark, #000000);
}

/* ==========================================================================
   Urgent State (< 2 hours)
   ========================================================================== */

.em-countdown-timer--urgent {
	background: linear-gradient(90deg, #FFE0B2 0%, #FFCC80 100%);
}

.em-countdown-timer--urgent .em-countdown-timer__time {
	color: #E65100;
	animation: em-timer-pulse 1s ease-in-out infinite;
}

@keyframes em-timer-pulse {
	0%, 100% {
		opacity: 1;
	}
	50% {
		opacity: 0.7;
	}
}

/* ==========================================================================
   Closed State
   ========================================================================== */

.em-countdown-timer--closed {
	background: var(--em-bg-light, #F5F7F9);
}

.em-countdown-timer--closed .em-countdown-timer__message {
	color: var(--em-text-secondary, #525252);
}

.em-countdown-timer--closed .em-countdown-timer__icon svg {
	color: var(--em-text-secondary, #525252);
}

/* ==========================================================================
   Style Variants
   ========================================================================== */

/* Minimal style */
.em-countdown-timer--minimal {
	background: var(--em-bg-light, #F5F7F9);
	border-bottom: 1px solid var(--em-border-color, #e5e5e5);
}

.em-countdown-timer--minimal .em-countdown-timer__message {
	font-size: 14px;
}

/* Banner style */
.em-countdown-timer--banner {
	background: var(--em-color-primary, #73CDD6);
	padding: 16px 0;
}

.em-countdown-timer--banner .em-countdown-timer__message {
	font-size: 18px;
	font-weight: 500;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
	.em-countdown-timer {
		padding: 10px 0;
	}

	.em-countdown-timer__container {
		padding: 0 16px;
		gap: 8px;
	}

	.em-countdown-timer__message {
		font-size: 14px;
	}

	.em-countdown-timer__icon svg {
		width: 20px;
		height: 20px;
	}

	/* Banner smaller on mobile */
	.em-countdown-timer--banner {
		padding: 12px 0;
	}

	.em-countdown-timer--banner .em-countdown-timer__message {
		font-size: 15px;
	}
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* High contrast mode */
@media (prefers-contrast: high) {
	.em-countdown-timer {
		background: #ffffff;
		border-bottom: 2px solid #000000;
	}

	.em-countdown-timer__message,
	.em-countdown-timer__time {
		color: #000000;
	}

	.em-countdown-timer--urgent {
		background: #FFCC80;
		border-color: #E65100;
	}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.em-countdown-timer--urgent .em-countdown-timer__time {
		animation: none;
	}
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
	.em-countdown-timer {
		display: none;
	}
}
