/* Mine Mirth Cookie Consent. Follows the theme's colours (light and dark); fallbacks for any theme. */
.mmcc {
	--mmcc-surface: var(--mm-surface, #ffffff);
	--mmcc-text: var(--mm-text, #0a1626);
	--mmcc-muted: var(--mm-muted, #506279);
	--mmcc-border: var(--mm-border, #d9e4ef);
	--mmcc-accent: var(--mm-primary, #1e9bf0);
	--mmcc-accent-2: var(--mm-accent, #2563eb);
	--mmcc-grad: var(--mm-grad, linear-gradient(135deg, var(--mmcc-accent), var(--mmcc-accent-2)));
	--mmcc-on-accent: var(--mm-on-primary, #ffffff);
	--mmcc-radius: var(--mm-radius-lg, 20px);
	--mmcc-shadow: 0 30px 80px -24px rgb(6 18 38 / .45), 0 10px 26px -14px rgb(6 18 38 / .3);
	position: fixed;
	z-index: 99998;
	left: 20px;
	bottom: 20px;
	width: min(460px, calc(100vw - 40px));
	font-family: var(--mm-font-body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	color: var(--mmcc-text);
	-webkit-font-smoothing: antialiased;
}
.mmcc[hidden] { display: none !important; }
.mmcc--dark {
	--mmcc-surface: #0b1624;
	--mmcc-text: #e7f0fa;
	--mmcc-muted: #9cb0c6;
	--mmcc-border: #1d324b;
}
.mmcc--light {
	--mmcc-surface: #ffffff;
	--mmcc-text: #0a1626;
	--mmcc-muted: #506279;
	--mmcc-border: #d9e4ef;
}
.mmcc--dark, :root[data-theme="dark"] .mmcc--auto { --mmcc-shadow: 0 30px 80px -20px rgb(0 0 0 / .75), 0 0 0 1px rgb(255 255 255 / .03); }
.mmcc--bottom-center { left: 50%; width: min(720px, calc(100vw - 40px)); transform: translateX(-50%); }
.mmcc--bottom-bar { left: 0; right: 0; bottom: 0; width: auto; }

/* Stay above the ticker when it sits at the bottom of the screen. */
body:has(.mmtk--bottom) .mmcc { bottom: calc(var(--mmtk-h, 42px) + 16px); }
body:has(.mmtk--bottom) .mmcc--bottom-bar { bottom: var(--mmtk-h, 42px); }

.mmcc__card {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 14px 16px;
	padding: 22px 22px 20px;
	border-radius: var(--mmcc-radius);
	background: color-mix(in srgb, var(--mmcc-surface) 92%, transparent);
	-webkit-backdrop-filter: blur(18px) saturate(1.4);
	backdrop-filter: blur(18px) saturate(1.4);
	border: 1px solid color-mix(in srgb, var(--mmcc-border) 80%, transparent);
	box-shadow: var(--mmcc-shadow);
	overflow: hidden;
	isolation: isolate;
}
/* A soft glow and a fine gradient line at the top: the "premium" finish. */
.mmcc__card::before {
	content: "";
	position: absolute;
	inset: -40% -20% auto auto;
	width: 260px;
	height: 260px;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--mmcc-accent) 22%, transparent), transparent 70%);
	z-index: -1;
	pointer-events: none;
}
.mmcc__card::after {
	content: "";
	position: absolute;
	left: 22px;
	right: 22px;
	top: 0;
	height: 2px;
	border-radius: 0 0 2px 2px;
	background: var(--mmcc-grad);
	opacity: .9;
}
.mmcc--bottom-bar .mmcc__card { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; border-radius: 0; border-width: 1px 0 0; padding: 18px max(20px, calc((100vw - 1240px) / 2)); }
.mmcc--bottom-bar .mmcc__card::after { left: 0; right: 0; }
.mmcc--bottom-center .mmcc__card { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }

.mmcc__icon {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	color: var(--mmcc-accent);
	background: color-mix(in srgb, var(--mmcc-accent) 14%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mmcc-accent) 28%, transparent);
}
.mmcc__icon svg { width: 24px; height: 24px; }
.mmcc__title { margin: 2px 0 6px; font-family: var(--mm-font-heading, inherit); font-size: 1.06rem; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; color: var(--mmcc-text); }
.mmcc__text { margin: 0; font-size: .9rem; line-height: 1.6; color: var(--mmcc-muted); }
.mmcc__policy { margin-left: 2px; font-weight: 600; color: var(--mmcc-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--mmcc-accent) 70%, transparent); white-space: nowrap; }
.mmcc__policy:hover { color: var(--mmcc-accent); }

.mmcc__actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.mmcc--bottom-center .mmcc__actions, .mmcc--bottom-bar .mmcc__actions { grid-column: auto; display: flex; margin: 0; }

/* Both buttons the same size and equally easy to press; Accept is the highlighted one. */
.mmcc__btn {
	position: relative;
	min-height: 46px;
	min-width: 120px;
	padding: 0 22px;
	border-radius: 999px;
	font: inherit;
	font-size: .95rem;
	font-weight: 700;
	letter-spacing: .01em;
	cursor: pointer;
	transition: transform .18s ease, box-shadow .25s ease, background .2s ease, border-color .2s ease, color .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.mmcc__btn--accept {
	border: 0;
	color: var(--mmcc-on-accent);
	background: var(--mmcc-grad);
	box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--mmcc-accent) 85%, transparent), inset 0 1px 0 rgb(255 255 255 / .25);
}
.mmcc__btn--accept::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .35) 50%, transparent 70%) -150% 0 / 200% 100% no-repeat;
	animation: mmcc-shine 3.2s ease-in-out 1.2s 2;
	pointer-events: none;
}
@keyframes mmcc-shine { to { background-position: 250% 0; } }
.mmcc__btn--accept:hover { transform: translateY(-1px); box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--mmcc-accent) 95%, transparent), inset 0 1px 0 rgb(255 255 255 / .3); }
.mmcc__btn--deny {
	color: var(--mmcc-text);
	background: transparent;
	border: 1.5px solid color-mix(in srgb, var(--mmcc-text) 22%, transparent);
}
.mmcc__btn--deny:hover { border-color: color-mix(in srgb, var(--mmcc-text) 45%, transparent); background: color-mix(in srgb, var(--mmcc-text) 5%, transparent); }
.mmcc__btn:active { transform: translateY(0) scale(.98); }
.mmcc__btn:focus-visible, .mmcc__policy:focus-visible, .mmcc-reopen:focus-visible { outline: 3px solid color-mix(in srgb, var(--mmcc-accent) 70%, transparent); outline-offset: 3px; }

/* Entrance */
.mmcc.is-in .mmcc__card { animation: mmcc-in .55s cubic-bezier(.16, 1, .3, 1) both; }
.mmcc.is-out .mmcc__card { animation: mmcc-out .3s ease-in both; }
@keyframes mmcc-in { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes mmcc-out { to { opacity: 0; transform: translateY(16px) scale(.98); } }

/* Reopen button (after a choice is made) */
.mmcc-reopen {
	--mmcc-accent: var(--mm-primary, #1e9bf0);
	position: fixed;
	z-index: 99997;
	left: 16px;
	bottom: 16px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--mm-border, #d9e4ef);
	color: var(--mmcc-accent);
	background: var(--mm-surface, #fff);
	box-shadow: 0 10px 24px -10px rgb(6 18 38 / .4);
	cursor: pointer;
	opacity: .8;
	transition: opacity .2s, transform .2s;
}
.mmcc-reopen:hover { opacity: 1; transform: translateY(-2px) rotate(-12deg); }
.mmcc-reopen svg { width: 22px; height: 22px; }
.mmcc-reopen[hidden] { display: none; }
body:has(.mmtk--bottom) .mmcc-reopen { bottom: calc(var(--mmtk-h, 42px) + 12px); }
/* Product pages: clear the theme's sticky "Add to cart" bar. */
body:has(.mm-sticky-atc.is-visible) .mmcc-reopen { bottom: 92px; }

/* Phones: a bottom sheet with two equal buttons. */
@media (max-width: 640px) {
	.mmcc, .mmcc--bottom-center { left: 10px; right: 10px; bottom: 10px; width: auto; transform: none; }
	.mmcc--bottom-bar { left: 0; right: 0; bottom: 0; }
	.mmcc__card, .mmcc--bottom-center .mmcc__card, .mmcc--bottom-bar .mmcc__card { grid-template-columns: auto minmax(0, 1fr); padding: 18px 16px 16px; }
	.mmcc__actions, .mmcc--bottom-center .mmcc__actions, .mmcc--bottom-bar .mmcc__actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
	.mmcc__btn { min-width: 0; padding: 0 12px; }
	.mmcc__icon { width: 40px; height: 40px; border-radius: 12px; }
	.mmcc__text { font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) {
	.mmcc.is-in .mmcc__card, .mmcc.is-out .mmcc__card, .mmcc__btn--accept::after { animation: none; }
}
@media print { .mmcc, .mmcc-reopen { display: none !important; } }
