/**
 * GrowthMed Consent Gate — consent UI (two-step opt-out: banner + modal).
 * All selectors scoped to .gm-cc-* so nothing leaks into client themes.
 * Self-contained: no external fonts/images, pure CSS toggle.
 */

.gm-cc-banner,
.gm-cc-banner *,
.gm-cc-overlay,
.gm-cc-overlay *,
.gm-cc-dns-link {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- Banner */
.gm-cc-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483645;
	display: none; /* shown by JS only when a decision is needed */
	background: #ffffff;
	border-top: 1px solid #d8d8d8;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.12);
	color: #1f1f1f;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

.gm-cc-banner-inner {
	padding: 18px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.gm-cc-banner-text {
	margin: 0;
	flex: 0 1 900px; /* readable left column; doesn't grow, so space-between spreads text · button · X */
}

/* Block mode: narrower text column so the centered button group lands center-right (not jammed at the edge). */
.gm-cc-mode-block .gm-cc-banner-text {
	flex: 0 1 620px;
}

.gm-cc-banner-text a {
	color: #0b63c4;
	text-decoration: underline;
}

.gm-cc-banner-actions {
	flex: 1 1 auto; /* grow into the space after the text… */
	display: flex;
	align-items: center;
	justify-content: center; /* …and center the button group there (center-right, off the far edge) */
	gap: 20px;
	white-space: nowrap;
}

/* ---------------------------------------------------------------- Buttons */
.gm-cc-btn {
	display: inline-block;
	background: #1a1a1a;
	color: #ffffff;
	border: 0;
	border-radius: 4px;
	padding: 11px 22px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-align: center;
}

.gm-cc-btn:hover {
	background: #000000;
}

/* Banner "Cookie settings" — subtle/outlined (Redfin-style) so it doesn't pull
   the eye away from the easy dismiss (X). The modal's red "Save Preferences"
   keeps .gm-cc-btn's prominent fill. */
.gm-cc-settings {
	background: transparent;
	color: #1f1f1f;
	border: 1px solid #b5b5b5;
}

.gm-cc-settings:hover {
	background: #f1f1f1;
}

.gm-cc-x,
.gm-cc-modal-x {
	background: transparent;
	border: 0;
	color: #6b6b6b;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.gm-cc-x:hover,
.gm-cc-modal-x:hover {
	color: #1f1f1f;
}

/* Banner close (X) — larger + darker so the easy "dismiss" is the obvious target */
.gm-cc-x {
	font-size: 30px;
	color: #1f1f1f;
}

/* ---------------------------------------------------------------- Modal */
.gm-cc-overlay {
	position: fixed;
	inset: 0;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2147483646;
	display: none; /* flex when open (set inline by JS) */
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	padding: 20px;
}

.gm-cc-modal {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	color: #1f1f1f;
	width: 100%;
	max-width: 600px;
	max-height: 90vh;
	overflow: hidden;
	border-radius: 6px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.55;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Fixed header — stays put while the body scrolls */
.gm-cc-modal-header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 24px;
	background: #ffffff;
	border-bottom: 1px solid #e4e4e4;
}

/* Scrollable body */
.gm-cc-modal-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 20px 24px 24px;
}

.gm-cc-modal-x {
	flex: 0 0 auto;
}

.gm-cc-modal h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
}

.gm-cc-modal h3 {
	margin: 22px 0 6px;
	font-size: 16px;
	font-weight: 700;
}

.gm-cc-modal p {
	margin: 0 0 14px;
}

.gm-cc-modal a {
	color: #0b63c4;
	text-decoration: underline;
}

/* ---------------------------------------------------------------- Preference rows */
.gm-cc-row {
	padding: 16px 0;
	border-top: 1px solid #e4e4e4;
}

.gm-cc-row:last-of-type {
	border-bottom: 1px solid #e4e4e4;
}

.gm-cc-row-main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.gm-cc-row-label {
	font-weight: 600;
}

.gm-cc-row-desc {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #555555;
}

.gm-cc-always {
	color: #0b63c4;
	font-weight: 600;
	white-space: nowrap;
}

.gm-cc-modal-actions {
	margin-top: 20px;
	text-align: right;
}

/* ---------------------------------------------------------------- Toggle switch */
.gm-cc-switch {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 28px;
	flex: 0 0 auto;
}

.gm-cc-switch input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.gm-cc-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #c4c4c4;
	border-radius: 28px;
	transition: background 0.2s;
}

.gm-cc-slider::before {
	content: "";
	position: absolute;
	height: 22px;
	width: 22px;
	left: 3px;
	bottom: 3px;
	background: #ffffff;
	border-radius: 50%;
	transition: transform 0.2s;
}

.gm-cc-switch input:checked + .gm-cc-slider {
	background: #1a8754;
}

.gm-cc-switch input:checked + .gm-cc-slider::before {
	transform: translateX(22px);
}

.gm-cc-switch input:focus-visible + .gm-cc-slider {
	outline: 2px solid #0b63c4;
	outline-offset: 2px;
}

/* ---------------------------------------------------------------- Do Not Sell link (lives inside the site footer) */
.gm-cc-dns-bar {
	box-sizing: border-box;
	width: 100%;
	padding: 14px 0; /* horizontal spacing comes from the theme container (or JS fallback) */
	text-align: right; /* change to left / center to taste */
	font-size: 12px;
	line-height: 1.4;
	/* No background, border, color, or font set — it inherits the footer's own
	   styling so it blends into whatever theme it lands in. */
}

.gm-cc-dns-link,
.gm-cc-dns-link:hover,
.gm-cc-dns-link:focus,
.gm-cc-dns-link:active {
	color: inherit !important; /* beat the theme's own a:hover so it never goes dark-on-dark */
	text-decoration: underline;
}

.gm-cc-dns-link {
	opacity: 0.85;
}

.gm-cc-dns-link:hover {
	opacity: 1; /* hover feedback via brightness, not a color change */
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 640px) {
	.gm-cc-banner-inner {
		flex-wrap: wrap;
		gap: 12px;
		padding: 14px 16px;
	}

	.gm-cc-banner-text {
		flex: 1 1 100%; /* full-width line; buttons wrap to the next line */
	}

	.gm-cc-settings {
		flex: 1 1 auto;
	}

	/* block-mode 3-button group fills the width and wraps */
	.gm-cc-banner-actions {
		flex: 1 1 100%;
		flex-wrap: wrap;
	}

	.gm-cc-banner-actions .gm-cc-btn {
		flex: 1 1 auto;
	}
}
