/*
 * CGM Google Favorites.
 * :where() keeps specificity at zero, so anything set in Bricks' Style tab always wins.
 * Tweak site-wide with the custom properties below.
 */
:root {
	--cgm-gfav-accent: #e5192c;          /* CGM red, used for inline hover */
	--cgm-gfav-ink: #111;
	--cgm-gfav-paper: #fff;
	--cgm-gfav-line: #d9d9d9;
	--cgm-gfav-mono: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Shared base */
:where(.cgm-gfav, .cgm-gfav-callout) { box-sizing: border-box; }
:where(.cgm-gfav) {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--cgm-gfav-ink);
	text-decoration: none;
	cursor: pointer;
	line-height: 1;
}
:where(.cgm-gfav:focus-visible) { outline: 2px solid currentColor; outline-offset: 3px; }
:where(.cgm-gfav__icon) { display: inline-flex; align-items: center; justify-content: center; flex: none; }
:where(.cgm-gfav__icon svg) { display: block; width: 20px; height: 20px; }
:where(.cgm-gfav__label) { white-space: nowrap; }

.cgm-gfav__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Pill: the news article look */
:where(.cgm-gfav--pill) {
	justify-content: center;
	gap: 6px;
	min-height: 28px;
	padding: 4px 11px 4px 9px;
	border: 1px solid var(--cgm-gfav-line);
	border-radius: 999px;
	background: var(--cgm-gfav-paper);
	font-size: 12px;
	font-weight: 500;
	transition: border-color .2s, background-color .2s, box-shadow .2s, transform .2s;
}
:where(.cgm-gfav--pill:hover) {
	border-color: #bdbdbd;
	background: #f7f7f7;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
	transform: translateY(-1px);
}
:where(.cgm-gfav--pill.cgm-gfav--dark) { --cgm-gfav-ink: #f1f1f1; background: #1c1c1c; border-color: #4a4a4a; }
:where(.cgm-gfav--pill.cgm-gfav--dark:hover) { background: #262626; border-color: #6b6b6b; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
:where(.cgm-gfav--pill .cgm-gfav__icon svg) { width: 15px; height: 15px; }

/* Inline: the guide / review share-row look */
:where(.cgm-gfav--inline) {
	gap: 4px;
	padding: 2px 0 0 6px;
	font-family: var(--cgm-gfav-mono);
	font-size: var(--text-2xs, 13px);
	font-weight: 400;
	letter-spacing: -1px;
}
:where(.cgm-gfav--inline.cgm-gfav--divider) { margin-left: 5px; border-left: 1px solid currentColor; }
:where(.cgm-gfav--inline .cgm-gfav__icon) { padding: 2px 2px 0; transition: color .2s; }
:where(.cgm-gfav--inline .cgm-gfav__icon svg) { width: 18px; height: 18px; }
:where(.cgm-gfav--inline:hover .cgm-gfav__icon) { color: var(--cgm-gfav-accent); }
:where(.cgm-gfav--inline.cgm-gfav--dark) { --cgm-gfav-ink: #f1f1f1; }

/* Solid: dark filled button, colour G on a white disc */
:where(.cgm-gfav--solid) {
	justify-content: center;
	gap: 6px;
	min-height: 28px;
	padding: 3px 12px 3px 3px;
	border-radius: 999px;
	background: var(--cgm-gfav-ink);
	color: var(--cgm-gfav-paper);
	font-size: 12px;
	font-weight: 600;
	transition: background-color .2s, transform .2s;
}
:where(.cgm-gfav--solid .cgm-gfav__icon) { width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #111; }
:where(.cgm-gfav--solid .cgm-gfav__icon svg) { width: 14px; height: 14px; }
:where(.cgm-gfav--solid:hover) { background: #2b2b2b; transform: translateY(-1px); }
:where(.cgm-gfav--solid.cgm-gfav--dark) { background: #fff; color: #111; }
:where(.cgm-gfav--solid.cgm-gfav--dark .cgm-gfav__icon) { background: #f1f1f1; }
:where(.cgm-gfav--solid.cgm-gfav--dark:hover) { background: #ececec; }
/* No icon: even padding */
:where(.cgm-gfav--solid:not(:has(.cgm-gfav__icon))) { padding: 5px 14px; }

/* Text link */
:where(.cgm-gfav--link) {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}
:where(.cgm-gfav--link:hover) { text-decoration-thickness: 2px; }
:where(.cgm-gfav--link .cgm-gfav__icon svg) { width: 1em; height: 1em; }

/* Callout box */
:where(.cgm-gfav-callout) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	padding: 16px 20px;
	border: 1px solid var(--cgm-gfav-line);
	border-left: 4px solid var(--cgm-gfav-accent);
	border-radius: 6px;
	background: var(--cgm-gfav-paper);
	color: var(--cgm-gfav-ink);
}
:where(.cgm-gfav-callout__body) { flex: 1 1 260px; min-width: 0; }
:where(.cgm-gfav-callout__title) { margin: 0 0 4px; font-size: 16px; font-weight: 700; line-height: 1.3; }
:where(.cgm-gfav-callout__text) { margin: 0; font-size: 14px; line-height: 1.45; opacity: .8; }
:where(.cgm-gfav-callout--dark) { --cgm-gfav-ink: #f1f1f1; --cgm-gfav-paper: #161616; --cgm-gfav-line: #333; }
:where(.cgm-gfav-callout .cgm-gfav--solid) { flex: none; }

/* Official Google button */
:where(.cgm-gfav-official) { display: inline-block; line-height: 0; }

/* Outline: rounded outline button with an arrow (panel buttons use it too) */
:where(.cgm-gfav--outline) {
	justify-content: center;
	gap: 6px;
	min-height: 34px;
	padding: 6px 12px 6px 16px;
	border: 1px solid currentColor;
	border-radius: 999px;
	background: transparent;
	font-size: 13px;
	font-weight: 700;
	transition: background-color .2s, color .2s;
}
:where(.cgm-gfav--outline:hover) { background: var(--cgm-gfav-ink); color: var(--cgm-gfav-paper); }
:where(.cgm-gfav--outline.cgm-gfav--dark) { --cgm-gfav-ink: #f1f1f1; --cgm-gfav-paper: #111; }
:where(.cgm-gfav__chev) { flex: none; width: 14px; height: 14px; }

/* Favorites + Discover side by side */
:where(.cgm-gfav-group) { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
:where(.cgm-gfav-group--inline) { gap: 0; }

/* Panel: "Add cgmagonline.com on Google" with buttons */
:where(.cgm-gfav-panel) {
	--cgm-gfav-panel-bg: #f1f1f1;
	box-sizing: border-box;
	container-type: inline-size;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 12px 16px;
	border-radius: 12px;
	background: var(--cgm-gfav-panel-bg);
	color: var(--cgm-gfav-ink);
}
:where(.cgm-gfav-panel *) { box-sizing: border-box; }
:where(.cgm-gfav-panel--dark) { --cgm-gfav-ink: #f1f1f1; --cgm-gfav-paper: #111; --cgm-gfav-panel-bg: #1c1c1c; }
:where(.cgm-gfav-panel__logo) {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: #202124;
}
:where(.cgm-gfav-panel__logo svg) { width: 16px; height: 16px; }
:where(.cgm-gfav-panel__title) {
	/* Zero basis keeps the logo and title on one row, even on phones. */
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding-left: 12px;
	border-left: 1px solid currentColor;
	font-size: 15px;
	line-height: 1.3;
}
:where(.cgm-gfav-panel__title strong) { font-weight: 700; }
:where(.cgm-gfav-panel__actions) { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
:where(.cgm-gfav-panel__note) { font-size: 12px; opacity: .7; }
@container (max-width: 560px) {
	.cgm-gfav-panel__actions { flex: 1 1 100%; margin-left: 0; }
	.cgm-gfav-panel__actions .cgm-gfav { flex: 1 1 200px; }
}

/* Callout with two buttons */
:where(.cgm-gfav-callout__actions) { display: flex; flex: none; flex-wrap: wrap; gap: 8px; }
