/**
 * Cookie notice — AO_Cookie_Notice (plugin 2.204.0; appearance vars 2.205.0).
 *
 * Colours, type and radius come from the theme's Brand Kit tokens with plain
 * fallbacks, so the notice matches the site without any per-site CSS. An
 * admin's own choices (Settings → Artsopolis Hub → Cookie Notice) arrive as
 * custom properties on the element itself and take precedence:
 *   --ao-cn-bg        notice background
 *   --ao-cn-text      message text (and --ao-cn-link, set alongside it)
 *   --ao-cn-btn-bg    button background
 *   --ao-cn-btn-text  button label
 *   --ao-cn-radius    corner radius of the card and its button
 *
 * Two layouts, chosen on the same settings card:
 *   .ao-cookie-notice--card  compact panel, bottom-left (default)
 *   .ao-cookie-notice--bar   full-width strip along the bottom
 * Under 768px both render as the bar.
 *
 * While a bar is showing, cookie-notice.js puts `ao-cookie-notice-open--bar`
 * on <html> and sets --ao-cookie-notice-h to the bar's height; the rule at
 * the end lifts TranslatePress's floating language switcher above the bar so
 * the two never overlap. The card never reaches the bottom-right corner, so
 * no adjustment is needed for it.
 */

.ao-cookie-notice {
	position: fixed;
	left: var(--space-4, 1rem);
	bottom: var(--space-4, 1rem);
	z-index: 99998;
	box-sizing: border-box;
	width: calc(100% - 2 * var(--space-4, 1rem));
	max-width: 420px;
	padding: var(--space-4, 1rem) var(--space-5, 1.25rem);
	background: var(--ao-cn-bg, var(--color-paper, #ffffff));
	color: var(--ao-cn-text, var(--color-ink, #252525));
	font-family: var(--font-body, system-ui, sans-serif);
	font-size: 0.9375rem;
	line-height: 1.5;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: var(--ao-cn-radius, var(--radius-md, 10px));
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	animation: ao-cookie-notice-in 0.25s ease-out;
}

.ao-cookie-notice[hidden] {
	display: none;
}

.ao-cookie-notice__inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-3, 0.75rem);
}

.ao-cookie-notice__text {
	margin: 0;
	color: inherit;
}

.ao-cookie-notice__link {
	color: var(--ao-cn-link, var(--color-primary, #1f76b4));
	text-decoration: underline;
	white-space: nowrap;
}

.ao-cookie-notice__link:hover,
.ao-cookie-notice__link:focus-visible {
	text-decoration-thickness: 2px;
}

.ao-cookie-notice__accept {
	flex: none;
	margin: 0;
	padding: 0.625rem 1.25rem;
	border: 0;
	border-radius: var(--ao-cn-radius, var(--radius-md, 10px));
	background: var(--ao-cn-btn-bg, var(--color-primary, #1f76b4));
	color: var(--ao-cn-btn-text, #ffffff);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.ao-cookie-notice__accept:hover {
	filter: brightness(0.9);
}

.ao-cookie-notice__accept:focus-visible {
	outline: 3px solid var(--color-accent, #3cb0e2);
	outline-offset: 2px;
}

/* ── Bar layout ─────────────────────────────────────────────────────── */

.ao-cookie-notice--bar {
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	max-width: none;
	padding: var(--space-4, 1rem) var(--space-6, 1.5rem);
	border-width: 1px 0 0;
	border-radius: 0;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
}

.ao-cookie-notice--bar .ao-cookie-notice__inner {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-6, 1.5rem);
	max-width: 1200px;
	margin: 0 auto;
}

/* TranslatePress floater sits above a visible bar instead of on top of it.
   Top-positioned floaters are left alone (setting bottom too would stretch them). */
.ao-cookie-notice-open--bar .trp-floating-switcher:not(.trp-switcher-position-top) {
	bottom: calc(var(--ao-cookie-notice-h, 0px) + 8px) !important;
}

/* ── Phones: always a bar ───────────────────────────────────────────── */

@media (max-width: 768px) {
	.ao-cookie-notice {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		padding: var(--space-4, 1rem);
		border-width: 1px 0 0;
		border-radius: 0;
		box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
	}

	.ao-cookie-notice__inner,
	.ao-cookie-notice--bar .ao-cookie-notice__inner {
		flex-direction: column;
		align-items: stretch;
		gap: var(--space-3, 0.75rem);
	}

	.ao-cookie-notice__accept {
		width: 100%;
	}

	.ao-cookie-notice-open .trp-floating-switcher:not(.trp-switcher-position-top) {
		bottom: calc(var(--ao-cookie-notice-h, 0px) + 8px) !important;
	}
}

/* ── Motion ─────────────────────────────────────────────────────────── */

@keyframes ao-cookie-notice-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.ao-cookie-notice.is-leaving {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.2s ease-in, transform 0.2s ease-in;
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.ao-cookie-notice {
		animation: none;
	}

	.ao-cookie-notice.is-leaving {
		transition: none;
	}
}
