.tg-event {
	position: fixed;
	z-index: 1;
	inset-inline: var(--site-gutter);
	inset-block-end: max(1rem, env(safe-area-inset-bottom));
	margin-inline: auto;
	color: var(--color-gray-500);
}

.tg-navigation-open .tg-event {
	visibility: hidden;
}

.tg-event__inner {
	position: relative;
	overflow: hidden;
	padding: 0.75rem;
	border: 1px solid var(--border-muted);
	border-radius: 0.75rem;
	background: linear-gradient(90deg, #0a236e, #470e70) padding-box;
}

.tg-event__content {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: center;
	gap: 0.75rem clamp(0.5rem, 5.5vw, 1.375rem);
	text-align: center;
}

.tg-event__description {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.32;
	overflow-wrap: anywhere;
}

.tg-event__brand {
	display: grid;
	gap: 0.5rem;
	align-self: stretch;
	align-content: center;
}

.tg-event__brand:only-of-type {
	grid-column: 1 / -1;
	justify-self: center;
	inline-size: min(100%, 14.4375rem);
}

.tg-event__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	block-size: 1.75rem;
	min-inline-size: 0;
	font-weight: 700;
}

.tg-event__logo img {
	display: block;
	inline-size: auto;
	block-size: 100%;
	max-inline-size: 100%;
	object-fit: contain;
}

.tg-event__brand .tg-button {
	gap: 0.25rem;
	padding: 0.625rem 0.25rem;
	font-size: 0.875rem;
	line-height: 1.44;
}

.tg-event .tg-icon--gift {
	--icon-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath fill='%2308142b' d='M15 5.25h-1.3a4 4 0 0 0 1.3-3 .75.75 0 1 0-1.5 0c0 1.97-1.78 2.65-3.13 2.88a7 7 0 0 0 .88-2.88 2.25 2.25 0 0 0-4.5 0 7 7 0 0 0 .88 2.88C6.28 4.9 4.5 4.22 4.5 2.25a.75.75 0 0 0-1.5 0 4 4 0 0 0 1.3 3H3a3 3 0 0 0-3 3V9a1.5 1.5 0 0 0 1.5 1.5v3.75A3.75 3.75 0 0 0 5.25 18h7.5a3.75 3.75 0 0 0 3.75-3.75V10.5A1.5 1.5 0 0 0 18 9v-.75a3 3 0 0 0-3-3M9 1.5a.75.75 0 0 1 .75.75Q9.6 3.46 9 4.51q-.6-1.06-.75-2.26A.75.75 0 0 1 9 1.5M1.5 8.25A1.5 1.5 0 0 1 3 6.75h5.25V9H1.5zm1.5 6V10.5h5.25v6h-3A2.25 2.25 0 0 1 3 14.25m12 0a2.25 2.25 0 0 1-2.25 2.25h-3v-6H15zM9.75 9V6.75H15a1.5 1.5 0 0 1 1.5 1.5V9z'/%3E%3C/svg%3E");
	inline-size: 1rem;
	block-size: 1rem;
}

.tg-event__art {
	display: none;
}

.tg-event__close {
	position: absolute;
	inset-block-start: -0.5rem;
	inset-inline-end: 0;
	inline-size: 1.25rem;
	block-size: 1.25rem;
	padding: 0;
	border: 1px solid var(--border-muted);
	border-radius: 50%;
	background: var(--color-black-600);
	cursor: pointer;
}

.tg-event__close::before {
	position: absolute;
	inset: -0.375rem;
	content: "";
}

.tg-event__close::after {
	position: absolute;
	inset: 0;
	inline-size: 0.4375rem;
	block-size: 0.4375rem;
	margin: auto;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9.66668 9.66667'%3E%3Cpath fill='none' stroke='%23e6ecf5' stroke-width='1.5' stroke-linecap='round' d='M0.75 0.75L4.83335 4.83333M4.83335 4.83333L8.91667 8.91667M4.83335 4.83333L0.750016 8.91667M4.83335 4.83333L8.91668 0.75'/%3E%3C/svg%3E") center / contain no-repeat;
	content: "";
}

.tg-event__close:hover {
	background-color: var(--color-blue-500);
}

@media (min-width: 47.5em) {
	.tg-event__inner {
		padding: 1rem 1.5rem;
	}

	.tg-event__content {
		grid-template-columns: minmax(0, 10.75rem) minmax(0, 1fr) minmax(0, 10.75rem);
		min-block-size: 5.25rem;
		gap: 1.5rem;
	}

	.tg-event__description {
		grid-area: 1 / 2;
		font-size: 1.5rem;
		line-height: 1.2;
	}

	.tg-event__brand--1 {
		grid-area: 1 / 1;
	}

	.tg-event__brand--2 {
		grid-area: 1 / 3;
	}

	.tg-event__description:only-child,
	.tg-event__content:not(:has(.tg-event__description)) .tg-event__brand:only-child {
		grid-column: 1 / -1;
	}

	.tg-event__description + .tg-event__brand:only-of-type {
		grid-column: 3;
	}

	.tg-event__brand {
		gap: 0.75rem;
	}

	.tg-event__logo {
		block-size: 2rem;
	}

	.tg-event__brand .tg-button {
		gap: 0.375rem;
		padding-block: 0.625rem;
		font-size: 1rem;
		line-height: 1.58;
	}

	.tg-event .tg-icon--gift {
		inline-size: 1.125rem;
		block-size: 1.125rem;
	}

	.tg-event__close {
		inline-size: 1.75rem;
		block-size: 1.75rem;
	}

	.tg-event__close::after {
		inline-size: 0.625rem;
		block-size: 0.625rem;
	}
}

@media (min-width: 75em) {
	.tg-event__logo {
		block-size: 2.5rem;
	}

	.tg-event {
		max-inline-size: var(--site-width);
	}

	.tg-event__inner {
		padding-inline: 10.5% 13.75%;
	}

	.tg-event__content {
		grid-template-columns: minmax(0, 14.4375rem) minmax(0, 1fr) minmax(0, 14.4375rem);
		gap: 1.5rem;
	}

	.tg-event__description {
		font-size: 1.75rem;
	}

	.tg-event__art {
		position: absolute;
		inset-block-end: 0;
		display: block;
		inline-size: 9.5rem;
		block-size: 7.375rem;
		pointer-events: none;
	}

	.tg-event__art--left {
		inset-inline-start: 0;
	}

	.tg-event__art--right {
		inset-inline-end: 0;
		inline-size: 10.5rem;
	}

	.tg-event__art img {
		display: block;
		inline-size: 100%;
		block-size: 100%;
		object-fit: cover;
		object-position: center top;
	}
}
