/**
 * Wartegg Promo — toast + inline card.
 * Colour comes from --wgpromo-color. Two inline layouts (vertical / horizontal)
 * and two skins (filled / plain).
 */

.wgpromo {
	--wgpromo-color: #0B806A;

	position: relative;
	box-sizing: border-box;
	font-family: "Gotham SSm A", "Gotham SSm B", Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.wgpromo *,
.wgpromo *::before,
.wgpromo *::after {
	box-sizing: border-box;
}

/* Filled skin — coloured background, white text (default). */
.wgpromo--filled {
	background: var(--wgpromo-color);
	color: #fff;
}

/* Plain skin — no background, coloured accents on the page. */
.wgpromo--plain {
	background: transparent;
	color: #3a3a39;
	border: 1px solid #dcdcdb;
	border-color: color-mix(in srgb, var(--wgpromo-color) 32%, #fff);
}

.wgpromo__body {
	padding: 26px 28px 28px;
}

/* ---------------------------------------------------------------- Toast */

.wgpromo--toast {
	position: fixed;
	z-index: 2147483647; /* above the Complianz cookie banner */
	right: 0;
	bottom: 0;
	width: 380px;
	max-width: 100vw;
	box-shadow: 0 -1px 40px -12px rgba(0, 0, 0, 0.45);

	opacity: 0;
	transform: translateY(100%);
	transition: opacity .45s ease, transform .55s cubic-bezier(.22, 1, .36, 1);
	will-change: opacity, transform;
}

.wgpromo--toast[hidden] {
	display: none;
}

.wgpromo--toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.wgpromo--toast.is-leaving {
	opacity: 0;
	transform: translateY(100%);
}

.wgpromo--toast .wgpromo__body {
	padding: 30px 32px 30px;
}

/* ------------------------------------------------------------- Elements */

.wgpromo__icon {
	display: block;
	margin: 0 0 14px;
	line-height: 0;
	color: rgba(255, 255, 255, 0.9);
}

.wgpromo--plain .wgpromo__icon {
	color: var(--wgpromo-color);
}

.wgpromo__icon svg {
	width: 28px;
	height: 28px;
}

.wgpromo__eyebrow {
	margin: 0 0 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

.wgpromo--plain .wgpromo__eyebrow {
	color: var(--wgpromo-color);
}

.wgpromo__text {
	margin: 0 0 16px;
	font-family: "Mercury SSm A", "Mercury SSm B", Georgia, "Times New Roman", serif;
	font-size: 21px;
	line-height: 1.32;
	font-weight: 400;
}

.wgpromo--plain .wgpromo__text {
	color: #2b2b2a;
}

/* Promo code — monospaced, click to copy */
.wgpromo__code {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 10px 14px;
	border: 0;
	background: rgba(0, 0, 0, 0.16);
	color: #fff;
	font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Courier New", monospace;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .05em;
	cursor: pointer;
	position: relative;
	transition: background .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.wgpromo__code:hover {
	background: rgba(0, 0, 0, 0.26);
}

.wgpromo--plain .wgpromo__code {
	background: #f3f3f2;
	background: color-mix(in srgb, var(--wgpromo-color) 9%, #fff);
	color: var(--wgpromo-color);
}

.wgpromo--plain .wgpromo__code:hover {
	background: #ececeb;
	background: color-mix(in srgb, var(--wgpromo-color) 15%, #fff);
}

.wgpromo__code:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.wgpromo__code-value {
	white-space: nowrap;
}

.wgpromo__code-icon {
	display: inline-flex;
	opacity: .6;
}

.wgpromo__code-feedback {
	display: none;
	position: absolute;
	inset: 0;
	align-items: center;
	justify-content: center;
	background: #fff;
	color: var(--wgpromo-color);
	font-family: "Gotham SSm A", "Gotham SSm B", Helvetica, Arial, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.wgpromo--plain .wgpromo__code-feedback {
	background: var(--wgpromo-color);
	color: #fff;
}

.wgpromo__code.is-copied .wgpromo__code-feedback {
	display: flex;
}

.wgpromo__duration {
	margin: 8px 0 0;
	font-size: 12px;
	letter-spacing: .02em;
	color: rgba(255, 255, 255, 0.72);
}

.wgpromo--plain .wgpromo__duration {
	color: #6f6e6d;
}

/* CTA */
.wgpromo__cta {
	display: inline-block;
	margin: 18px 0 0;
	padding: 12px 24px;
	background: #fff;
	color: var(--wgpromo-color) !important;
	text-decoration: none !important;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	line-height: 1.2;
	transition: opacity .18s ease, transform .12s ease;
}

.wgpromo__cta:hover,
.wgpromo__cta:focus {
	opacity: .88;
	color: var(--wgpromo-color) !important;
}

.wgpromo__cta:active {
	transform: translateY(1px);
}

/* In the plain skin the button becomes the coloured element. */
.wgpromo--plain .wgpromo__cta {
	background: var(--wgpromo-color);
	color: #fff !important;
}

.wgpromo--plain .wgpromo__cta:hover,
.wgpromo--plain .wgpromo__cta:focus {
	opacity: .9;
	color: #fff !important;
}

.wgpromo__conditions {
	margin: 18px 0 0;
	padding-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	font-size: 11px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.66);
}

.wgpromo--plain .wgpromo__conditions {
	border-top-color: rgba(0, 0, 0, 0.12);
	color: #6f6e6d;
}

/* Close button (toast only) */
.wgpromo__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
	transition: color .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.wgpromo__close:hover {
	color: #fff;
}

.wgpromo__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ------------------------------------------------------------- Inline */

.wgpromo--inline {
	width: 100%;
	margin: 1.5em 0;
}

.wgpromo--inline.wgpromo--filled {
	box-shadow: 0 12px 34px -20px rgba(0, 0, 0, 0.5);
}

.wgpromo--inline.wgpromo--vertical {
	max-width: 340px;
}

.wgpromo--inline.wgpromo--horizontal {
	max-width: 720px;
}

/* Horizontal layout: text + CTA side by side, conditions on its own line. */
.wgpromo--horizontal .wgpromo__body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 30px;
}

.wgpromo--horizontal .wgpromo__icon {
	margin: 0;
	flex: 0 0 auto;
}

.wgpromo--horizontal .wgpromo__main {
	flex: 1 1 260px;
}

.wgpromo--horizontal .wgpromo__text {
	margin-bottom: 12px;
}

.wgpromo--horizontal .wgpromo__main > *:last-child {
	margin-bottom: 0;
}

.wgpromo--horizontal .wgpromo__cta {
	margin: 0;
	flex: 0 0 auto;
}

.wgpromo--horizontal .wgpromo__conditions {
	flex-basis: 100%;
	margin-top: 6px;
}

/* ---------------------------------------------------------- Responsive */

@media (max-width: 600px) {
	.wgpromo--toast {
		width: 100%;
	}

	.wgpromo--toast .wgpromo__body {
		padding: 26px 22px;
	}

	.wgpromo__text {
		font-size: 19px;
	}

	/* Horizontal collapses to a stack on small screens. */
	.wgpromo--horizontal .wgpromo__body {
		display: block;
	}

	.wgpromo--horizontal .wgpromo__icon {
		margin-bottom: 14px;
	}

	.wgpromo--horizontal .wgpromo__cta {
		margin-top: 18px;
	}
}

/* --------------------------------------------------- Reduced motion */

@media (prefers-reduced-motion: reduce) {
	.wgpromo--toast {
		transition: opacity .2s ease;
		transform: none;
	}
	.wgpromo--toast.is-visible,
	.wgpromo--toast.is-leaving {
		transform: none;
	}
}
