/* The consent card (inc/consent.php): a small index card in the bottom left
   corner, with the baby orangutan peeking over its top edge next to the
   title. */
.suaq-consent {
	position: fixed;
	z-index: 100;
	left: 16px;
	bottom: 16px;
	width: min(360px, calc(100vw - 32px));
	padding: 18px 18px 16px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 2px;
	background: var(--wp--preset--color--paper);
	color: var(--wp--preset--color--contrast);
	box-shadow: 0 10px 30px rgb(35 39 31 / 0.18);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9375rem;
	line-height: 1.45;
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.suaq-consent[hidden] {
	display: none;
}

.suaq-consent.is-open {
	opacity: 1;
	transform: none;
}

.suaq-consent__ape {
	position: absolute;
	top: -44px;
	left: 10px;
	width: 80px;
	height: 80px;
	transform: rotate(-8deg);
	filter: drop-shadow(0 3px 4px rgb(35 39 31 / 0.2));
}

.suaq-consent p {
	margin: 0;
}

.suaq-consent__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.1;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--wp--preset--color--primary);
	min-height: 30px;
	padding-left: 82px;
}

.suaq-consent__text {
	margin-top: 6px !important;
}

.suaq-consent__text a {
	color: var(--wp--preset--color--accent);
}

.suaq-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.suaq-consent__actions button {
	padding: 8px 14px;
	border: 2px solid var(--wp--preset--color--primary);
	border-radius: 2px;
	font-family: var(--wp--preset--font-family--display);
	font-size: 0.9375rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	cursor: pointer;
}

.suaq-consent__yes {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--paper);
}

.suaq-consent__no {
	background: transparent;
	color: var(--wp--preset--color--primary);
}

.suaq-consent__actions button:hover,
.suaq-consent__actions button:focus-visible {
	border-color: var(--wp--preset--color--accent);
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--paper);
}

/* The orangutan pops up with the card and tilts its head once, as if
   asking. */
@media (prefers-reduced-motion: no-preference) {
	.suaq-consent.is-open .suaq-consent__ape {
		animation: suaq-ask 1.4s ease-in-out 0.3s;
	}
}

@keyframes suaq-ask {
	0%, 100% { transform: rotate(-8deg); }
	30% { transform: rotate(-16deg) translateY(-4px); }
	60% { transform: rotate(2deg); }
}

@media (max-width: 599px) {
	.suaq-consent {
		left: 16px;
		right: 16px;
		width: auto;
	}
}

/* Click-to-play videos (inc/embeds.php): the still with the play button,
   then the player in the same 16:9 box. */
.suaq-embed__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--wp--preset--color--contrast);
}

.suaq-embed__frame img,
.suaq-embed__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
}

.suaq-embed__frame .suaq-play {
	text-decoration: none;
}

.suaq-embed__note {
	margin: 8px 0 0;
	font-size: 0.8125rem;
	line-height: 1.4;
	color: var(--wp--preset--color--muted);
}

.suaq-embed.is-playing .suaq-embed__note {
	display: none;
}
