/**
 * MM Notification Bar - Frontend Styles
 *
 * @package MMNotificationBar
 */

/* ============================================
   Notification Bar
   ============================================ */
.mmnb-notification-bar {
	position: relative;
	width: 100%;
	z-index: 9999;
	background: #8e1d36;
	color: #ffffff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	
	/* GPU acceleration - only during animation */
	transform: translateZ(0);
}

/* Container */
.mmnb-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 8px 36px 8px 36px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
}

/* Content */
.mmnb-content {
	flex: 1;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.mmnb-content p {
	margin: 0;
	display: inline;
}

.mmnb-content a {
	color: inherit;
	text-decoration: underline;
}

/* Link as Text Link */
.mmnb-link {
	color: #ffffff;
	text-decoration: underline;
	margin-left: 8px;
	font-weight: 600;
	transition: opacity 0.2s;
}

.mmnb-link:hover {
	color: #ffffff;
	text-decoration: none;
	opacity: 0.8;
}

/* Close Button */
.mmnb-close {
	position: absolute;
	top: 50%;
	right: 20px;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	color: #ffffff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.mmnb-close:hover {
	opacity: 1;
}

.mmnb-close:focus {
	outline: 2px solid rgba(255, 255, 255, 0.5);
	outline-offset: 2px;
}

/* ============================================
   Animations
   ============================================ */

/* Slide Down Animation */
.mmnb-animation-slide-down {
	animation: mmNBSlideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.15s backwards;
	will-change: transform, opacity;
}

@keyframes mmNBSlideDown {
	from {
		transform: translateY(-100%) translateZ(0);
		opacity: 0;
	}
	to {
		transform: translateY(0) translateZ(0);
		opacity: 1;
	}
}

/* Closing Animation */
.mmnb-notification-bar.mmnb-closing {
	animation: mmNBSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
	will-change: transform, opacity;
}

@keyframes mmNBSlideUp {
	from {
		transform: translateY(0) translateZ(0);
		opacity: 1;
	}
	to {
		transform: translateY(-100%) translateZ(0);
		opacity: 0;
	}
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
	/* Fixed position at bottom on mobile */
	.mmnb-notification-bar {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		top: auto;
		
		/* Glass effect with transparency */
		background: rgba(142, 29, 54, 0.6);
		backdrop-filter: blur(10px);
		-webkit-backdrop-filter: blur(10px);
	}
	
	/* Slide up animation for mobile (from bottom) */
	.mmnb-animation-slide-down {
		animation: mmNBSlideUpMobile 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.15s backwards;
		will-change: transform, opacity;
	}
	
	@keyframes mmNBSlideUpMobile {
		from {
			transform: translateY(100%) translateZ(0);
			opacity: 0;
		}
		to {
			transform: translateY(0) translateZ(0);
			opacity: 1;
		}
	}
	
	/* Closing animation for mobile */
	.mmnb-notification-bar.mmnb-closing {
		animation: mmNBSlideDownMobile 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
		will-change: transform, opacity;
	}
	
	@keyframes mmNBSlideDownMobile {
		from {
			transform: translateY(0) translateZ(0);
			opacity: 1;
		}
		to {
			transform: translateY(100%) translateZ(0);
			opacity: 0;
		}
	}
	
	.mmnb-container {
		padding: 12px 50px 12px 16px;
	}
	
	.mmnb-content {
		font-size: 13px;
	}
	
	.mmnb-link {
		margin-left: 6px;
		font-size: 12px;
	}
	
	.mmnb-close {
		right: 10px;
		font-size: 24px;
		width: 24px;
		height: 24px;
	}
}

@media (max-width: 480px) {
	.mmnb-container {
		padding-right: 40px;
	}
	
	.mmnb-link {
		display: block;
		margin-left: 0;
		margin-top: 6px;
	}
}
