.olof {
	--olof-edge: clamp(16px, 4vw, 34px);
	--olof-ink: #231b13;
	--olof-extra: min(var(--olof-offset, 0px), 38vh);
	--olof-extra: min(var(--olof-offset, 0px), 38dvh);
	--olof-bottom: calc(var(--olof-edge) + var(--olof-extra) + env(safe-area-inset-bottom, 0px));
	position: fixed;
	right: calc(var(--olof-edge) + env(safe-area-inset-right, 0px));
	bottom: var(--olof-bottom);
	z-index: 9990;
	width: min(var(--olof-width, 280px), 85vw);
	color: var(--olof-ink);
	font: 600 16px/1.25 system-ui, sans-serif;
	pointer-events: none;
}

@media (max-width: 600px) {
	.olof {
		width: var(--olof-mobile-width, 68vw);
	}
}

.olof[data-side="left"] {
	right: auto;
	left: calc(var(--olof-edge) + env(safe-area-inset-left, 0px));
}

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

.olof [hidden], .olof[hidden] {
	display: none !important;
}

.olof__card,
.olof .olof__launcher {
	pointer-events: auto;
}

.olof__card {
	position: relative;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 12px 40px rgb(28 23 32 / 28%);
	animation: olof-enter 400ms cubic-bezier(.2, .8, .2, 1) both;
}

.olof__content {
	max-height: min(76vh, calc(100vh - var(--olof-bottom) - 32px));
	max-height: min(76dvh, calc(100dvh - var(--olof-bottom) - 32px - env(safe-area-inset-top, 0px)));
	overflow: auto;
	border-radius: inherit;
}

#olof-offer .olof__image-link {
	display: block;
	line-height: 0;
}

#olof-offer .olof__image-link:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -5px;
}

.olof .olof__photo {
	display: block;
	width: 100%;
	height: auto;
	max-height: 60vh;
	max-height: 60dvh;
	margin: 0;
	border: 0;
	border-radius: 0;
	object-fit: contain;
	background: #f4efe9;
}

.olof__action {
	padding: clamp(12px, 3.6vw, 20px);
	background: #fff;
}

.olof .olof__buy,
.olof .olof__launcher,
.olof .olof__close {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	margin: 0;
	border: 0;
	color: var(--olof-ink);
	font: inherit;
	letter-spacing: normal;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
}

#olof-offer .olof__buy {
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--olof-buy-bg, #ffbf1a) !important;
	color: var(--olof-buy-text, #000) !important;
	font-weight: 750;
	text-align: center;
	overflow-wrap: anywhere;
}

#olof-offer .olof__buy:hover {
	background: var(--olof-buy-hover-bg, #e4a918) !important;
	color: var(--olof-buy-hover-text, #000) !important;
}

#olof-offer .olof__close {
	appearance: none;
	position: absolute;
	z-index: 1;
	top: -12px;
	right: -9px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0 !important;
	border-radius: 50% !important;
	outline: 0 !important;
	background: #fff !important;
	color: #492c2a !important;
	box-shadow: 0 3px 12px rgb(49 24 22 / 26%) !important;
}

#olof-offer .olof__close:hover {
	background: #fff4ed !important;
}

#olof-offer .olof__close:focus-visible {
	outline: 2px solid #492c2a !important;
	outline-offset: 2px;
	box-shadow: 0 0 0 3px #fff !important;
}

#olof-offer .olof__launcher {
	--olof-launcher-bg: #492c2a;
	appearance: none;
	width: fit-content;
	max-width: 100%;
	min-height: 48px;
	gap: 10px;
	margin: 0 0 0 auto;
	padding: 6px 8px 6px 6px;
	border: 0 !important;
	border-radius: 999px !important;
	outline: 0 !important;
	background: var(--olof-launcher-bg) !important;
	color: #fff8f1 !important;
	box-shadow: 0 4px 16px rgb(49 24 22 / 26%) !important;
	font: 650 14px/1.25 system-ui, sans-serif;
	letter-spacing: normal;
	text-align: left;
	animation: olof-enter 300ms ease-out both;
}

#olof-offer[data-side="left"] .olof__launcher {
	margin: 0 auto 0 0;
}

#olof-offer .olof__launcher:hover {
	--olof-launcher-bg: #5a3632;
}

#olof-offer .olof__launcher:focus-visible {
	outline: 2px solid #492c2a !important;
	outline-offset: 3px;
	box-shadow: 0 0 0 3px #fff8f1 !important;
}

#olof-offer .olof__thumb {
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	margin: 0;
	border: 1px solid #fff8f14d;
	border-radius: 50%;
	object-fit: cover;
}

.olof__label {
	min-width: 0;
	overflow-wrap: anywhere;
}

.olof__expand {
	display: grid;
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	place-items: center;
	border-radius: 50%;
	background: #fff8f120;
	animation: olof-lift 750ms ease-in-out 500ms 2;
}

.olof :is(button, a):focus-visible {
	outline: 2px solid #231b13;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px #fff;
}

@keyframes olof-enter {
	from {
		opacity: 0;
		transform: translateY(14px) scale(.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes olof-lift {
	50% { transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
	.olof .olof__card,
	#olof-offer .olof__launcher,
	.olof__expand {
		animation: none;
	}
}
