/**
 * The seasonal offer button - see inc/offer-button.php.
 *
 * From the designer's Winter Offer banner (2026-10-29): a gold block with a passing shine,
 * falling snow and a turning snowflake. Colours are the site's gold and green (the file's
 * #C8AF62 / #14201B were near matches).
 *   --hero  under the Weddings hero's buttons: one line at the page's 15px (the file: 11px);
 *           on phones as wide as the stacked buttons, on two lines beside the snowflake.
 *   --menu  in the header's Weddings dropdown under "Wedding Enquiries": the file's 11px,
 *           on two lines, as wide as that 238px button.
 */

.lc-offer {
	--lc-offer-gold: #cfaf58;
	--lc-offer-ink: #0d1a13;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	overflow: hidden;
	background: var(--lc-offer-gold);
	border: 1px solid var(--lc-offer-gold);
	box-shadow: 0 0 0 3px rgba(207, 175, 88, 0.28);
	color: var(--lc-offer-ink);
	font-family: "Work Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
	font-weight: 600;
	line-height: 1.445;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: box-shadow 0.2s ease;
}

/* The parent theme and Elementor paint links, so every state is claimed back. */
.lc-offer:hover,
.lc-offer:focus,
.lc-offer:focus-visible,
.lc-offer:visited {
	background: var(--lc-offer-gold);
	color: var(--lc-offer-ink);
	text-decoration: none;
}

.lc-offer:hover,
.lc-offer:focus-visible {
	box-shadow: 0 0 0 3px rgba(207, 175, 88, 0.55);
}

.lc-offer:focus-visible {
	outline: 2px solid var(--lc-offer-ink);
	outline-offset: 4px;
}

.lc-offer__shine {
	position: absolute;
	top: -12px;
	left: -60px;
	width: 26px;
	height: 80px;
	background: rgba(255, 255, 255, 0.26);
	transform: skewX(-20deg);
	pointer-events: none;
	animation: lc-offer-shine 3.8s ease-in-out 0.6s infinite;
}

.lc-offer__flake {
	position: absolute;
	top: 0;
	border-radius: 50%;
	background: #fff;
	opacity: 0;
	pointer-events: none;
	animation-name: lc-offer-snow;
	animation-timing-function: linear;
	animation-iteration-count: infinite;
}

.lc-offer__icon {
	position: relative;
	flex: 0 0 auto;
	animation: lc-offer-spin 9s linear infinite;
}

.lc-offer__text {
	position: relative;
}

.lc-offer__rule {
	position: relative;
	flex: 0 0 auto;
	width: 1px;
	height: 16px;
	background: currentColor;
}

/* Across the whole button whatever its width, then a pause before the next pass. */
@keyframes lc-offer-shine {
	0% {
		left: -60px;
	}

	55%,
	100% {
		left: calc(100% + 40px);
	}
}

@keyframes lc-offer-spin {
	to {
		transform: rotate(360deg);
	}
}

@keyframes lc-offer-snow {
	0% {
		transform: translateY(-8px);
		opacity: 0;
	}

	20% {
		opacity: 0.9;
	}

	100% {
		transform: translateY(58px);
		opacity: 0;
	}
}

/* ------------------------------------------------------------ hero */

.lc-offer--hero {
	min-height: 52px;
	padding: 0 24px 0 18px;
	font-size: 15px;
}

.lc-offer--hero:focus-visible {
	outline-color: #fff;
}

/* ------------------------------------------------------------ menu */

/* Two centred lines - the snowflake and the label, then the offer - with the divider turned
   into the line break. A set width: a wrapping box would otherwise size itself to one line. */
.lc-offer--menu {
	flex-wrap: wrap;
	column-gap: 10px;
	row-gap: 2px;
	width: 238px;
	max-width: 100%;
	padding: 6px 16px;
	font-size: 11px;
	line-height: 1.4;
	white-space: normal;
	text-align: center;
}

.lc-offer--menu .lc-offer__icon {
	width: 16px;
	height: 16px;
}

.lc-offer--menu .lc-offer__rule {
	flex-basis: 100%;
	height: 0;
}

@media (max-width: 767px) {
	/* As wide as the hero's stacked buttons, on two centred lines as in the menu (one line at
	   15px is wider than a phone). */
	.lc-offer--hero {
		flex-wrap: wrap;
		column-gap: 10px;
		row-gap: 2px;
		width: 100%;
		max-width: 340px;
		padding: 10px 18px;
		white-space: normal;
		text-align: center;
	}

	.lc-offer--hero .lc-offer__rule {
		flex-basis: 100%;
		height: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lc-offer__icon {
		animation: none;
	}

	.lc-offer__shine,
	.lc-offer__flake {
		display: none;
	}
}
