/**
 * Cookie consent banner.
 *
 * Lives with the plugin, not the theme, because the legal obligation has to
 * survive a theme change. Brand tokens are referenced with fallbacks so the
 * banner still looks deliberate under a different theme.
 *
 * Logical properties throughout — the banner is used on the RTL /ar/ site.
 */

.basaran-consent {
	position: fixed;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 9999;

	background-color: var(--basaran-forest, #484B3D);
	color: var(--basaran-ivory, #F5F1E8);
	border-block-start: 3px solid var(--basaran-olive, #7F8168);

	/* Sits above content, so a shadow is justified here even though the rest of
	   the design avoids them. */
	box-shadow: 0 -4px 24px rgba(37, 39, 33, 0.28);
}

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

.basaran-consent__inner {
	display: flex;
	align-items: center;
	gap: var(--basaran-space-3, 2rem);
	flex-wrap: wrap;

	max-width: var(--basaran-container, 1280px);
	margin-inline: auto;
	padding: var(--basaran-space-2, 1rem) var(--basaran-space-3, 2rem);
}

.basaran-consent__text {
	flex: 1 1 22rem;
	min-width: 0;
}

.basaran-consent__title {
	margin: 0 0 0.25rem;
	font-family: var(--basaran-font-heading, system-ui, sans-serif);
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--basaran-ivory, #F5F1E8);
}

.basaran-consent__text p {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--basaran-sand, #D8CBB7);
}

.basaran-consent__text a {
	color: var(--basaran-ivory, #F5F1E8);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.basaran-consent__actions {
	display: flex;
	gap: 0.75rem;
	flex: 0 0 auto;
	flex-wrap: wrap;
}

/* The banner sits on Deep Forest, so the theme's ivory-on-olive button needs
   adjusting for contrast against this surface. */
.basaran-consent .basaran-btn--outline {
	color: var(--basaran-ivory, #F5F1E8);
	border-color: var(--basaran-sand, #D8CBB7);
	background: transparent;
}

.basaran-consent .basaran-btn--outline:hover,
.basaran-consent .basaran-btn--outline:focus-visible {
	background-color: rgba(245, 241, 232, 0.12);
	color: var(--basaran-ivory, #F5F1E8);
}

.basaran-consent .basaran-btn:focus-visible {
	outline: 2px solid var(--basaran-sand, #D8CBB7);
	outline-offset: 2px;
}

/* Mobile: stack, and let the buttons fill the row so both are equally easy to
   hit. Equal prominence for reject is a compliance requirement, not a style
   preference. */
@media (max-width: 640px) {
	.basaran-consent__inner {
		flex-direction: column;
		align-items: stretch;
		gap: var(--basaran-space-2, 1rem);
		padding-inline: var(--basaran-space-2, 1rem);
	}

	.basaran-consent__actions {
		flex-direction: row;
	}

	.basaran-consent__actions .basaran-btn {
		flex: 1 1 0;
		justify-content: center;
		text-align: center;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.basaran-consent:not([hidden]) {
		animation: basaran-consent-in 220ms ease-out;
	}

	@keyframes basaran-consent-in {
		from { transform: translateY(100%); }
		to   { transform: translateY(0); }
	}
}
