/*
 * Notice bar — a slim announcement strip above the header.
 * Part of the 4B design direction (D-068). See includes/notice-bar.php.
 *
 * Values are hard-coded rather than read from CSS variables, because the 4B mockup's
 * tokens live in the mockup and not in the live theme. A missing variable would make
 * the bar fall back to inherited colours, which on a white page would be unreadable.
 *
 * Contrast: #0e1626 against #ffffff is about 17:1, far above the 4.5:1 that WCAG asks.
 */

.irkn-notice {
	background: #0e1626;
	color: #fff;
	font-size: 14.5px;
	line-height: 1.45;
}

.irkn-notice__in {
	max-width: 1280px;
	margin: 0 auto;
	/* Symmetric padding reserves room for the close button at BOTH ends, so the text stays
	   centred instead of being pushed off-centre by the button. */
	padding: 11px 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: center;
	position: relative;
}

.irkn-notice__txt {
	margin: 0;
}

/*
 * The close button.
 * 44x44 because that is this project's minimum tap target. The visible glyph is small, the
 * target is not - a 14px glyph with a 44px target looks identical and is far easier to hit
 * with a thumb.
 */
.irkn-notice__x {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.irkn-notice__x:hover {
	background: rgba(255, 255, 255, 0.3);
}

.irkn-notice__x:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
	background: rgba(255, 255, 255, 0.3);
}

/*
 * Applied to <html> by notice-bar.js BEFORE the browser paints, using a key that contains a
 * fingerprint of the wording. So a dismissal is remembered until the message changes.
 * This rule is what makes the dismissal instant rather than a flicker.
 */
html.irkn-notice-off .irkn-notice {
	display: none;
}

.irkn-notice b,
.irkn-notice strong {
	font-weight: 800;
}

.irkn-notice a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* On a phone the bar must not become a wall of text. */
@media (max-width: 720px) {
	.irkn-notice {
		font-size: 13.5px;
	}

	.irkn-notice__in {
		padding: 10px 46px;
		text-align: left;
	}
}
