/* Banner */
.wpm-easter-egg-banner {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999998;
	background: linear-gradient(135deg, #C5A3FF 0%, #FFB3C6 50%, #B5E8B5 100%);
	color: #333;
	text-align: center;
	padding: 12px 20px;
	font-size: 15px;
	line-height: 1.4;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.4s ease, opacity 0.4s ease;
}

.wpm-easter-egg-banner.is-hidden {
	transform: translateY(-100%);
	opacity: 0;
	pointer-events: none;
}

body.admin-bar .wpm-easter-egg-banner {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .wpm-easter-egg-banner {
		top: 46px;
	}
}

.wpm-easter-egg-banner-content {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
}

.wpm-easter-egg-banner-text p:last-child {
	margin-bottom: 0;
}

.wpm-easter-egg-banner-countdown {
	display: inline-flex;
	gap: 8px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.wpm-easter-egg-banner-countdown:empty {
	display: none;
}

.wpm-countdown-segment {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	min-width: 40px;
}

.wpm-countdown-value {
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.wpm-countdown-label {
	font-size: 10px;
	text-transform: uppercase;
	opacity: 0.7;
	letter-spacing: 0.5px;
}

/* Hide expired eggs */
.wpm-hunt-expired {
	display: none;
}

/* Easter Egg - Clickable egg on the page */
.wpm-easter-egg {
	display: inline-block;
	width: var(--wpm-egg-w, 80px);
	height: var(--wpm-egg-h, 88px);
	cursor: pointer;
	transition: transform 0.2s ease;
	animation: wpm-egg-wobble 3s ease-in-out infinite;
	vertical-align: middle;
}

.wpm-easter-egg:hover {
	transform: scale(1.15);
	animation: none;
}

.wpm-easter-egg:focus-visible {
	outline: 2px solid #9B8FE8;
	outline-offset: 4px;
	border-radius: 50%;
}

.wpm-easter-egg img,
.wpm-easter-egg svg {
	display: block;
	pointer-events: none;
}

@keyframes wpm-egg-wobble {
	0%, 100% { transform: rotate(0deg); }
	15% { transform: rotate(3deg); }
	30% { transform: rotate(-3deg); }
	45% { transform: rotate(2deg); }
	55% { transform: rotate(0deg); }
}

/* Modal Overlay */
.wpm-easter-egg-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 999999;
	justify-content: center;
	align-items: center;
	animation: wpm-overlay-fadein 0.3s ease;
}

.wpm-easter-egg-modal-overlay.is-active {
	display: flex;
}

@keyframes wpm-overlay-fadein {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* Modal Box */
.wpm-easter-egg-modal {
	position: relative;
	background-color: #fff;
	background-image: var(--wpm-modal-bg, none);
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: 16px;
	padding: 40px 32px 32px;
	max-width: var(--wpm-modal-w, 500px);
	width: 90%;
	min-height: var(--wpm-modal-min-h, auto);
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: wpm-modal-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	z-index: 1000000;
}

@keyframes wpm-modal-pop {
	from {
		opacity: 0;
		transform: scale(0.7) translateY(20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

/* Close Button */
.wpm-easter-egg-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 4px 8px;
	transition: color 0.2s;
}

.wpm-easter-egg-modal-close:hover {
	color: #333;
}

/* Modal Content */
.wpm-easter-egg-modal-content {
	font-size: 16px;
	line-height: 1.6;
	color: #333;
}

.wpm-easter-egg-modal-content p:last-child {
	margin-bottom: 0;
}

/* Confetti Container */
.wpm-confetti-container {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 1000001;
	overflow: hidden;
}

/* Confetti Piece */
.wpm-confetti-piece {
	position: absolute;
	bottom: 0;
	width: 16px;
	height: 16px;
	opacity: 0;
	animation: wpm-confetti-cannon 2.5s cubic-bezier(0.15, 0.8, 0.3, 1) forwards;
}

.wpm-confetti-piece.is-circle {
	border-radius: 50%;
	width: 14px;
	height: 14px;
}

.wpm-confetti-piece.is-rect {
	border-radius: 2px;
	width: 12px;
	height: 22px;
}

@keyframes wpm-confetti-cannon {
	0% {
		opacity: 1;
		transform: translateY(0) translateX(0) rotate(0deg) scale(1);
	}
	50% {
		opacity: 1;
		transform:
			translateY(var(--wpm-confetti-y))
			translateX(var(--wpm-confetti-x))
			rotate(var(--wpm-confetti-rot))
			scale(1.1);
	}
	100% {
		opacity: 0;
		transform:
			translateY(calc(var(--wpm-confetti-y) + 200px))
			translateX(var(--wpm-confetti-x))
			rotate(calc(var(--wpm-confetti-rot) * 2))
			scale(0.6);
	}
}
