/**
 * NISM Banners — front-end styles.
 * Positioning (top offset for admin bar + fixed nav) and body padding are
 * applied by public/js/banner.js; this file handles appearance + responsiveness.
 */

.nism-banner {
	position: fixed;
	left: 0;
	right: 0;
	top: 0;
	z-index: 9990; /* under the WP admin bar (99999), over the fixed header (z-50) */
	background: var(--nb-bg, #009fc6);
	color: var(--nb-text, #ffffff);
	transform: translateY(-100%);
	transition: transform 0.35s ease;
	will-change: transform;
	box-shadow: 0 2px 10px rgba(16, 24, 40, 0.12);
}
.nism-banner.is-visible {
	transform: translateY(0);
}

.nism-banner-inner {
	position: relative;
	max-width: 1280px;
	margin: 0 auto;
	padding: 12px 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
}

.nism-banner-content {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px 18px;
	text-align: center;
}

.nism-banner-msg {
	font-family: inherit;
	font-weight: 600;
	font-size: var(--nb-font, 16px);
	line-height: 1.35;
}
.nism-banner-msg a {
	color: inherit;
	text-decoration: underline;
}

.nism-banner-btn {
	display: inline-block;
	background: var(--nb-btn-bg, #e69b3e);
	color: var(--nb-btn-text, #ffffff);
	font-weight: 700;
	font-size: var(--nb-btn-font, 15px);
	line-height: 1;
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none;
	white-space: nowrap;
	transition: filter 0.15s ease;
}
.nism-banner-btn:hover {
	filter: brightness(0.93);
}

/* Countdown — compact segmented unit chips */
.nism-banner-countdown {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: var(--nb-font, 16px);
}
.nism-banner-cd-clock {
	display: inline-flex;
	align-items: stretch;
	gap: 5px;
}
.nism-banner-cd-seg {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	min-width: 2.35em;
	padding: 3px 6px;
	border-radius: 7px;
	line-height: 1;
	background: rgba(255, 255, 255, 0.18); /* fallback */
	background: color-mix(in srgb, currentColor 16%, transparent);
}
.nism-banner-cd-num {
	font-weight: 800;
	font-size: 1em;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}
.nism-banner-cd-unit {
	font-size: 0.6em;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	opacity: 0.75;
}

/* Close */
.nism-banner-close {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 8px;
	color: var(--nb-text, #ffffff);
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.15s ease, background-color 0.15s ease;
}
.nism-banner-close:hover {
	opacity: 1;
	background: rgba(255, 255, 255, 0.15);
}

/* Mobile */
@media (max-width: 768px) {
	.nism-banner-inner {
		padding: 10px 46px;
	}
	.nism-banner-msg,
	.nism-banner-countdown {
		font-size: calc(var(--nb-font, 16px) * 0.9);
	}
	.nism-banner-btn {
		font-size: calc(var(--nb-btn-font, 15px) * 0.95);
		padding: 9px 16px;
	}
	.nism-banner-cd-seg {
		min-width: 2.1em;
		padding: 2px 5px;
	}
	.nism-banner-close {
		right: 8px;
		width: 30px;
		height: 30px;
	}
}
