/*
 * The Christmas ribbon (inc/christmas.php): a strip across the top of every page but the Christmas page itself, linking
 * to it, shown while that page is published. It comes before the header, so it's seen without scrolling or opening the
 * menu on any screen. Bethel Green (white text on it is 5.1:1), with a thin gold edge, and a bauble hanging from the
 * top either side of the words, drawn as a background so screen readers skip it. The baubles' red and gold are the
 * only colours outside the brand palette beyond the Christmas page.
 */
.bethel-christmas-ribbon {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.9em;
	margin: 0;
	padding: 0.55rem var(--wp--preset--spacing--30);
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	border-bottom: 3px solid #c9a227;
}

.bethel-christmas-ribbon::before,
.bethel-christmas-ribbon::after {
	content: "";
	flex: none;
	align-self: flex-start;
	width: 1.5rem;
	height: 2.25rem;
	margin-top: -0.55rem;
	background: url("../images/christmas/bauble.svg") center top / contain no-repeat;
}

.bethel-christmas-ribbon strong {
	font-family: var(--wp--preset--font-family--figtree);
	font-weight: 800;
}

.bethel-christmas-ribbon__more::after {
	content: "→" / "";
	display: inline-block;
	margin-left: 0.3em;
	transition: transform 0.2s;
}

/* On phones the words take two lines, between the baubles. */
@media (max-width: 600px) {
	.bethel-christmas-ribbon__more {
		display: block;
	}
}

.bethel-christmas-ribbon:hover {
	color: var(--wp--preset--color--base);
}

.bethel-christmas-ribbon:hover :is(strong, .bethel-christmas-ribbon__more) {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

@media (prefers-reduced-motion: no-preference) {
	.bethel-christmas-ribbon:hover .bethel-christmas-ribbon__more::after {
		transform: translateX(4px);
	}
}

/* The site's focus ring would sit outside the strip, off the top of the page; draw it inside instead. */
.bethel-christmas-ribbon:focus-visible {
	outline: 2px solid var(--wp--preset--color--base);
	outline-offset: -5px;
	box-shadow: none;
}

/* The over-hero header sits just under the ribbon, not at the top of the page behind it. */
.bethel-christmas-ribbon + .site-header--overlay {
	top: auto;
}
