/* Every rule is scoped to .rushby-cookie-consent so the theme's own button and heading styles can't outrank it. */

.rushby-cookie-consent {
	--rushby-cookie-accent: #556b2f;
	--rushby-cookie-accent-dark: #445024;
	--rushby-cookie-panel: #374151;
	--rushby-cookie-ink: #111827;
	--rushby-cookie-text: #374151;
	--rushby-cookie-muted: #6b7280;
	--rushby-cookie-line: #e5e7eb;
	font-family: inherit;
}

.rushby-cookie-consent [hidden] {
	display: none !important;
}

.rushby-cookie-consent .rushby-cookie-banner {
	position: fixed;
	left: 1.5rem;
	bottom: 1.5rem;
	z-index: 100000;
	width: min(26rem, calc(100vw - 3rem));
	padding: 1.25rem 1.5rem 1rem;
	display: grid;
	gap: 0.75rem;
	background: var(--rushby-cookie-panel);
	color: #f9fafb;
	border-radius: 0.75rem;
	box-shadow: 0 20px 40px -12px rgba(17, 24, 39, 0.45);
}

.rushby-cookie-consent .rushby-cookie-title {
	margin: 0;
	font-family: inherit;
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: inherit;
}

.rushby-cookie-consent .rushby-cookie-text {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: inherit;
}

.rushby-cookie-consent .rushby-cookie-banner .rushby-cookie-text {
	color: #e5e7eb;
}

.rushby-cookie-consent .rushby-cookie-banner a {
	color: #ffffff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.rushby-cookie-consent .rushby-cookie-actions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
	gap: 0.5rem;
	margin-top: 0.25rem;
}

/* Reject and accept share one look: regulators require refusing to be as easy and as visible as agreeing. */
.rushby-cookie-consent .rushby-cookie-button {
	margin: 0;
	padding: 0.625rem 1rem;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	white-space: normal;
	color: #ffffff;
	background: var(--rushby-cookie-accent);
	border: 2px solid var(--rushby-cookie-accent);
	border-radius: 9999px;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.rushby-cookie-consent .rushby-cookie-button:hover,
.rushby-cookie-consent .rushby-cookie-button:focus {
	color: #ffffff;
	background: var(--rushby-cookie-accent-dark);
	border-color: var(--rushby-cookie-accent-dark);
}

.rushby-cookie-consent .rushby-cookie-banner .rushby-cookie-actions .rushby-cookie-text-button {
	grid-column: 1 / -1;
}

.rushby-cookie-consent .rushby-cookie-text-button {
	margin: 0;
	padding: 0.375rem;
	font-family: inherit;
	font-size: 0.9375rem;
	color: #e5e7eb;
	background: none;
	border: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.rushby-cookie-consent .rushby-cookie-text-button:hover,
.rushby-cookie-consent .rushby-cookie-text-button:focus {
	color: #ffffff;
	background: none;
}

.rushby-cookie-consent button:focus-visible,
.rushby-cookie-consent a:focus-visible,
.rushby-cookie-consent .rushby-cookie-switch:focus-visible {
	outline: 2px solid var(--rushby-cookie-accent);
	outline-offset: 2px;
}

/* The olive focus ring disappears against the dark banner, so it lightens there. */
.rushby-cookie-consent .rushby-cookie-banner button:focus-visible,
.rushby-cookie-consent .rushby-cookie-banner a:focus-visible,
.rushby-cookie-consent .rushby-cookie-reopen:focus-visible {
	outline-color: #cad89b;
}

.rushby-cookie-consent .rushby-cookie-preferences {
	width: min(34rem, calc(100vw - 2rem));
	max-height: calc(100dvh - 2rem);
	padding: 1.5rem;
	color: var(--rushby-cookie-text);
	background: #ffffff;
	border: 0;
	border-radius: 0.75rem;
	box-shadow: 0 24px 48px -12px rgba(17, 24, 39, 0.35);
	overflow-y: auto;
}

.rushby-cookie-consent .rushby-cookie-preferences::backdrop {
	background: rgba(17, 24, 39, 0.55);
}

.rushby-cookie-consent .rushby-cookie-preferences .rushby-cookie-title {
	color: var(--rushby-cookie-ink);
}

.rushby-cookie-consent .rushby-cookie-preferences > .rushby-cookie-text {
	margin-bottom: 1rem;
}

.rushby-cookie-consent .rushby-cookie-preferences .rushby-cookie-privacy-signal {
	padding: 0.625rem 0.875rem;
	color: var(--rushby-cookie-ink);
	background: #e4ecd1;
	border-radius: 0.5rem;
}

.rushby-cookie-consent .rushby-cookie-preferences-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.rushby-cookie-consent .rushby-cookie-close {
	width: 2.25rem;
	height: 2.25rem;
	margin: 0;
	padding: 0;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--rushby-cookie-muted);
	background: none;
	border: 0;
	border-radius: 9999px;
	cursor: pointer;
}

.rushby-cookie-consent .rushby-cookie-close:hover,
.rushby-cookie-consent .rushby-cookie-close:focus {
	color: var(--rushby-cookie-ink);
	background: var(--rushby-cookie-line);
}

.rushby-cookie-consent .rushby-cookie-category {
	display: grid;
	gap: 0.375rem;
	padding: 0.875rem 0;
	border-top: 1px solid var(--rushby-cookie-line);
}

.rushby-cookie-consent .rushby-cookie-category .rushby-cookie-text {
	color: var(--rushby-cookie-muted);
}

.rushby-cookie-consent .rushby-cookie-category-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.rushby-cookie-consent .rushby-cookie-category-title {
	margin: 0;
	font-family: inherit;
	font-size: 1.0625rem;
	font-weight: 500;
	line-height: 1.3;
	color: var(--rushby-cookie-ink);
	cursor: default;
}

.rushby-cookie-consent label.rushby-cookie-category-title {
	cursor: pointer;
}

.rushby-cookie-consent .rushby-cookie-always-on {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--rushby-cookie-accent);
}

.rushby-cookie-consent .rushby-cookie-switch {
	position: relative;
	flex-shrink: 0;
	width: 2.75rem;
	height: 1.5rem;
	margin: 0;
	appearance: none;
	background: var(--rushby-cookie-muted);
	border-radius: 9999px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.rushby-cookie-consent .rushby-cookie-switch::before {
	content: "";
	position: absolute;
	top: 0.1875rem;
	left: 0.1875rem;
	width: 1.125rem;
	height: 1.125rem;
	background: #ffffff;
	border-radius: 9999px;
	box-shadow: 0 1px 2px rgba(17, 24, 39, 0.3);
	transition: transform 0.2s ease;
}

.rushby-cookie-consent .rushby-cookie-switch:checked {
	background: var(--rushby-cookie-accent);
}

.rushby-cookie-consent .rushby-cookie-switch:checked::before {
	transform: translateX(1.25rem);
}

.rushby-cookie-consent .rushby-cookie-preferences .rushby-cookie-actions {
	padding-top: 1rem;
	border-top: 1px solid var(--rushby-cookie-line);
}

.rushby-cookie-consent .rushby-cookie-reopen {
	position: fixed;
	left: 1.5rem;
	bottom: 1.5rem;
	z-index: 100000;
	width: 3rem;
	height: 3rem;
	margin: 0;
	padding: 0;
	display: grid;
	place-items: center;
	color: #ffffff;
	background: var(--rushby-cookie-panel);
	border: 0;
	border-radius: 9999px;
	box-shadow: 0 8px 20px -6px rgba(17, 24, 39, 0.45);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.rushby-cookie-consent .rushby-cookie-reopen:hover,
.rushby-cookie-consent .rushby-cookie-reopen:focus {
	color: #ffffff;
	background: var(--rushby-cookie-accent);
}

@media (max-width: 480px) {
	.rushby-cookie-consent .rushby-cookie-banner {
		left: 0.75rem;
		right: 0.75rem;
		bottom: 0.75rem;
		width: auto;
		padding: 1rem 1.125rem 0.75rem;
	}

	.rushby-cookie-consent .rushby-cookie-reopen {
		left: 1rem;
		bottom: 1rem;
		width: 2.75rem;
		height: 2.75rem;
	}

	.rushby-cookie-consent .rushby-cookie-preferences {
		padding: 1.25rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rushby-cookie-consent .rushby-cookie-button,
	.rushby-cookie-consent .rushby-cookie-switch,
	.rushby-cookie-consent .rushby-cookie-switch::before,
	.rushby-cookie-consent .rushby-cookie-reopen {
		transition: none;
	}
}
