/**
 * OnlineGuides Consent — banner + preferences styles.
 * Uses the shared --og design tokens (with fallbacks) so it matches the theme.
 */
.og-consent,
.og-consent-prefs {
	--_p: var(--og-color-primary, #059669);
	--_ph: var(--og-color-primary-hover, #047a57);
	--_ink: var(--og-color-ink, #0f172a);
	--_muted: var(--og-color-muted, #64748b);
	--_surface: var(--og-color-surface, #fff);
	--_border: var(--og-color-border, #e2e8f0);
	--_radius: var(--og-radius, 14px);
	--_font: var(--og-font-sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	font-family: var(--_font);
	color: var(--_ink);
	box-sizing: border-box;
}
.og-consent *,
.og-consent-prefs * { box-sizing: border-box; }
.og-consent[hidden],
.og-consent-prefs[hidden] { display: none; }

/* Bottom banner */
.og-consent {
	position: fixed;
	inset: auto 1rem 1rem 1rem;
	z-index: 9999;
	max-width: 62rem;
	margin-inline: auto;
	background: var(--_surface);
	border: 1px solid var(--_border);
	border-radius: var(--_radius);
	box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.35);
	animation: og-consent-in 0.3s ease-out both;
}
@keyframes og-consent-in { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { .og-consent { animation: none; } }

.og-consent__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.5rem;
	padding: 1.1rem 1.25rem;
}
.og-consent__body { flex: 1 1 20rem; min-width: 0; }
.og-consent__title { margin: 0 0 0.25rem; font-size: 0.95rem; font-weight: 700; }
.og-consent__text { margin: 0; font-size: 0.85rem; line-height: 1.55; color: var(--_muted); }
.og-consent__text a { color: var(--_ph); font-weight: 600; margin-left: 0.35rem; }

.og-consent__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.og-consent__btn {
	appearance: none;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 0.6rem 1.1rem;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.og-consent__btn--primary { background: var(--_p); color: #fff; }
.og-consent__btn--primary:hover { background: var(--_ph); }
.og-consent__btn--ghost { background: transparent; border-color: var(--_border); color: var(--_ink); }
.og-consent__btn--ghost:hover { border-color: var(--_muted); background: rgba(0, 0, 0, 0.03); }
.og-consent__btn:focus-visible { outline: 2px solid var(--_p); outline-offset: 2px; }

/* Preferences modal */
.og-consent-prefs {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}
.og-consent-prefs__overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.5); }
.og-consent-prefs__panel {
	position: relative;
	width: 100%;
	max-width: 30rem;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--_surface);
	border-radius: var(--_radius);
	box-shadow: 0 20px 60px -15px rgba(15, 23, 42, 0.5);
	padding: 1.5rem;
}
.og-consent-prefs__title { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 700; }

.og-consent-opt {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.85rem 0;
	border-top: 1px solid var(--_border);
	font-size: 0.85rem;
	line-height: 1.5;
}
.og-consent-opt span { color: var(--_muted); }
.og-consent-opt input[type="checkbox"] { width: 1.15rem; height: 1.15rem; accent-color: var(--_p); margin-top: 0.15rem; cursor: pointer; }
.og-consent-opt__fixed { color: var(--_p); font-weight: 600; white-space: nowrap; }

/* Do Not Sell or Share (CCPA/CPRA) */
.og-consent-dns { padding: 0.9rem 0 0.2rem; border-top: 1px solid var(--_border); margin-top: 0.25rem; }
.og-consent-dns__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--_ph);
	text-align: left;
}
.og-consent-dns__link:hover { text-decoration: underline; }
.og-consent-choices-icon { flex: 0 0 auto; border-radius: 4px; }
.og-consent-dns__note { margin: 0.5rem 0 0; font-size: 0.78rem; line-height: 1.45; color: var(--_muted); }
.og-consent-dns__note[hidden] { display: none; }

.og-consent-prefs__actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.25rem; }

/* Confirmation toast — self-contained (rendered outside .og-consent) */
.og-consent-toast {
	position: fixed;
	left: 50%;
	bottom: 1.25rem;
	z-index: 10001;
	transform: translate(-50%, 1rem);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 0.65rem;
	width: calc(100% - 2rem);
	max-width: 26rem;
	padding: 0.9rem 1.15rem;
	background: var(--og-color-ink, #0f172a);
	color: #ffffff;
	border-radius: 12px;
	box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.55);
	font-family: var(--og-font-sans, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
	font-size: 0.85rem;
	font-weight: 500;
	line-height: 1.45;
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.og-consent-toast::before {
	content: "";
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: #22c55e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.og-consent-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.og-consent-toast[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .og-consent-toast { transition: none; } }

@media (max-width: 640px) {
	.og-consent__actions { width: 100%; }
	.og-consent__actions .og-consent__btn { flex: 1 1 auto; }
}
