/* Notice Bar — frontend + admin preview (#210) */

/* ---- Frontend bar ---- */
.ne-notice-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--ne-space-4);
	padding: 10px var(--ne-space-5);
	font-family: var(--ne-font-body);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.01em;
	width: 100%;
	box-sizing: border-box;
	position: relative;
	z-index: 1;
	animation: ne-notice-slide-in 0.4s var(--ne-ease) both;
}

@keyframes ne-notice-slide-in {
	from {
		opacity: 0;
		transform: translateY(-100%);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ne-notice-bar__text {
	margin: 0;
	flex: 0 1 auto;
	text-align: center;
	color: inherit;
}

/* ---- CTA button ---- */
.ne-notice-bar__cta {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 14px;
	border-radius: var(--ne-radius-pill);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1.5px solid currentColor;
	white-space: nowrap;
	transition: opacity var(--ne-duration) var(--ne-ease),
	            transform var(--ne-duration) var(--ne-ease);
	flex-shrink: 0;
}
.ne-notice-bar__cta:hover {
	opacity: 0.85;
	transform: translateX(2px);
}

/* CTA outline variant — solid colors set inline by PHP/JS */
.ne-notice-bar__cta[data-style="outline"] {
	background: transparent !important;
}

/* ---- Dismiss button ---- */
.ne-notice-bar__dismiss {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: inherit;
	cursor: pointer;
	padding: 4px;
	border-radius: 50%;
	opacity: 0.7;
	transition: opacity var(--ne-duration) var(--ne-ease),
	            background var(--ne-duration) var(--ne-ease);
	flex-shrink: 0;
	position: absolute;
	right: var(--ne-space-4);
}
.ne-notice-bar__dismiss:hover {
	opacity: 1;
	background: rgba(128, 128, 128, 0.2);
}

/* ---- Dismiss animation ---- */
.ne-notice-bar--dismissing {
	animation: ne-notice-slide-out 0.3s var(--ne-ease) forwards;
}
@keyframes ne-notice-slide-out {
	to {
		opacity: 0;
		transform: translateY(-100%);
		height: 0;
		padding-top: 0;
		padding-bottom: 0;
		overflow: hidden;
	}
}

/* ---- Admin preview overrides ---- */
.tab-notice-bar .ne-notice-bar {
	animation: none;
	border-radius: 0;
}

/* ---- Admin-only: color input pair ---- */
.ne-color-input {
	display: flex;
	align-items: center;
	gap: var(--ne-space-2);
}
.ne-color-input input[type="color"] {
	width: 40px;
	height: 36px;
	border: 1px solid var(--ne-border-s);
	border-radius: var(--ne-radius-sm);
	padding: 2px;
	cursor: pointer;
	background: var(--ne-bg);
}
.ne-color-input .ne-input--sm {
	width: 100px;
	font-family: var(--ne-font-mono);
	font-size: 13px;
	text-transform: uppercase;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
	.ne-notice-bar { animation: none; }
	.ne-notice-bar--dismissing { animation-duration: 0.01s; }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
	.ne-notice-bar {
		flex-wrap: wrap;
		padding: 10px var(--ne-space-7) 10px var(--ne-space-4);
		gap: var(--ne-space-2);
		font-size: 13px;
	}
	.ne-notice-bar__text {
		flex: 1 1 100%;
	}
	.ne-notice-bar__cta {
		margin: 0 auto;
	}
}
