/*
 * Cookie Consent & GDPR — visitor banner, preferences panel and re-open button.
 * Everything is scoped under #ccg-root (ID specificity beats theme rules such
 * as button:hover). Colors and sizes come from CSS
 * variables printed on the root from the Banner Design settings.
 * The same file styles the live preview in WP Admin (#ccg-root.ccg-root--preview).
 */

#ccg-root {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	box-sizing: border-box;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	pointer-events: none;
	color: var(--ccg-text);
	font-family: inherit;
	font-size: var(--ccg-fs, 13px);
	font-weight: 400;
	line-height: 1.5;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

/* Font: theme font by default (inherit), or a fixed stack. */
#ccg-root.ccg-font-system {
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#ccg-root.ccg-font-serif {
	font-family: Georgia, "Times New Roman", Times, serif;
}

#ccg-root[hidden],
#ccg-root [hidden] {
	display: none !important;
}

#ccg-root *,
#ccg-root *::before,
#ccg-root *::after {
	box-sizing: border-box;
}

#ccg-root.ccg-root--preview {
	position: absolute;
	inset: 30px 0 0 0;
	z-index: 1;
}

#ccg-root .ccg-ic {
	display: block;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

#ccg-root .ccg-ic path {
	fill: none;
	stroke: currentColor;
}

/*
 * Isolation from theme CSS: the three containers start from initial values
 * (theme rules for button, div, p … no longer reach them), then the rules
 * below re-apply everything the plugin needs.
 */
#ccg-root .ccg-banner,
#ccg-root .ccg-panel,
#ccg-root .ccg-reopen {
	all: initial;
	box-sizing: border-box;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	text-align: left;
	-webkit-font-smoothing: antialiased;
}

/* Their content: neutralise common theme rules (div, p, ul, button …); the rules below re-apply what's needed. */
#ccg-root .ccg-banner *,
#ccg-root .ccg-panel * {
	float: none;
	max-width: none;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	text-shadow: none;
	text-transform: none;
	letter-spacing: normal;
}

#ccg-root .ccg-scrim {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(24, 24, 27, 0.32);
	pointer-events: auto;
}

/* ---------- Banner (first layer) ---------- */

#ccg-root .ccg-banner {
	position: absolute;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	width: min(var(--ccg-max-w), calc(100% - 2 * var(--ccg-off-x)));
	min-width: min(var(--ccg-min-w), calc(100% - 2 * var(--ccg-off-x)));
	max-height: calc(100% - 2 * var(--ccg-off-y));
	overflow-y: auto;
	margin: 0;
	background: var(--ccg-bg);
	color: var(--ccg-text);
	border-radius: var(--ccg-radius);
	min-height: var(--ccg-min-h, 0px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
	pointer-events: auto;
	outline: none;
	/* Narrow banners (< 420px) switch to the stacked button layout. */
	container-type: inline-size;
	container-name: ccg;
}

#ccg-root.ccg-pos-bottom-bar .ccg-banner,
#ccg-root.ccg-pos-top-bar .ccg-banner {
	left: 0;
	right: 0;
	margin: 0 auto;
	padding: var(--ccg-pad, 16px) calc(var(--ccg-pad, 16px) * 1.25);
}

#ccg-root.ccg-pos-bottom-bar .ccg-banner {
	bottom: var(--ccg-off-y);
}

#ccg-root.ccg-pos-top-bar .ccg-banner {
	top: var(--ccg-off-y);
}

#ccg-root.ccg-pos-center .ccg-banner {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(var(--ccg-max-w), calc(100% - 32px));
	min-width: min(var(--ccg-min-w), calc(100% - 32px));
	max-height: calc(100% - 32px);
	padding: var(--ccg-pad, 18px);
}

#ccg-root.ccg-pos-bottom-left .ccg-banner {
	left: var(--ccg-off-x);
	bottom: var(--ccg-off-y);
	padding: var(--ccg-pad, 18px);
}

#ccg-root.ccg-pos-bottom-right .ccg-banner {
	right: var(--ccg-off-x);
	bottom: var(--ccg-off-y);
	padding: var(--ccg-pad, 18px);
}

#ccg-root .ccg-logo {
	display: flex;
	align-items: center;
}

/* Logo: its own row above the message, left-aligned, in every position. */
#ccg-root .ccg-banner > .ccg-logo {
	flex: 0 0 100%;
	width: 100%;
	justify-content: flex-start;
}

#ccg-root .ccg-logo img {
	display: block;
	width: auto;
	max-width: calc(240px * var(--ccg-scale, 1));
	height: var(--ccg-logo-h);
	margin: 0;
	border: 0;
	object-fit: contain;
}

#ccg-root .ccg-banner .ccg-head-icon {
	width: calc(22px * var(--ccg-scale, 1));
	height: calc(22px * var(--ccg-scale, 1));
}

#ccg-root .ccg-panel .ccg-head-icon {
	width: calc(20px * var(--ccg-scale, 1));
	height: calc(20px * var(--ccg-scale, 1));
}

#ccg-root .ccg-btn .ccg-ic {
	width: calc(14px * var(--ccg-scale, 1));
	height: calc(14px * var(--ccg-scale, 1));
}

#ccg-root .ccg-banner__body {
	display: flex;
	flex: 1 1 260px;
	gap: 12px;
	align-items: flex-start;
	min-width: 0;
}

#ccg-root .ccg-banner__msg {
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: var(--ccg-fs, 13px);
	line-height: 1.5;
	white-space: pre-line;
}

#ccg-root a {
	color: inherit;
	text-decoration: underline;
}

#ccg-root a:hover,
#ccg-root a:focus {
	color: inherit;
}

/* "Privātuma politika · Sīkdatņu politika" after the message. */
#ccg-root .ccg-links {
	white-space: normal;
}

/* ---------- [ccg_cookie_table] (page content; theme styles the rest) ---------- */

.ccg-cookie-table__cat {
	margin: 0 0 1.75em;
}

.ccg-cookie-table__scroll {
	overflow-x: auto;
}

.ccg-cookie-table__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
}

.ccg-cookie-table__table th,
.ccg-cookie-table__table td {
	padding: 0.5em 0.75em;
	border-bottom: 1px solid rgba(127, 127, 127, 0.3);
	text-align: left;
	vertical-align: top;
}

.ccg-cookie-table__table code {
	overflow-wrap: anywhere;
}

.ccg-cookie-table__btn {
	cursor: pointer;
}

/* Phones: each cookie becomes a block, every value under its column name. */
@media (max-width: 600px) {
	.ccg-cookie-table__table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.ccg-cookie-table__table,
	.ccg-cookie-table__table tbody,
	.ccg-cookie-table__table tr,
	.ccg-cookie-table__table td {
		display: block;
		width: 100%;
	}

	.ccg-cookie-table__table tr {
		padding: 0.5em 0;
		border-bottom: 1px solid rgba(127, 127, 127, 0.3);
	}

	.ccg-cookie-table__table td {
		padding: 0.2em 0;
		border: 0;
		overflow-wrap: anywhere;
	}

	.ccg-cookie-table__table td::before {
		content: attr(data-label);
		display: block;
		font-size: 0.85em;
		font-weight: 600;
	}
}

/* ---------- Buttons ---------- */

/* Desktop: all buttons in one row, never wrapping. */
#ccg-root .ccg-actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
}

/* Bars: message on the left, button group on the right. */
#ccg-root.ccg-pos-bottom-bar .ccg-banner .ccg-actions,
#ccg-root.ccg-pos-top-bar .ccg-banner .ccg-actions {
	flex: 0 0 auto;
}

/* Boxes and the centre modal: the group spans the banner, buttons share it equally. */
#ccg-root.ccg-pos-center .ccg-banner .ccg-actions,
#ccg-root.ccg-pos-bottom-left .ccg-banner .ccg-actions,
#ccg-root.ccg-pos-bottom-right .ccg-banner .ccg-actions {
	flex: 1 1 100%;
	width: 100%;
}

#ccg-root.ccg-pos-center .ccg-banner .ccg-actions .ccg-btn,
#ccg-root.ccg-pos-bottom-left .ccg-banner .ccg-actions .ccg-btn,
#ccg-root.ccg-pos-bottom-right .ccg-banner .ccg-actions .ccg-btn {
	flex: 1 1 0;
	min-width: 0;
}

#ccg-root .ccg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: auto;
	height: var(--ccg-btn-h, 38px);
	min-height: 0;
	margin: 0;
	padding: 0 calc(var(--ccg-btn-h, 38px) * 0.42);
	border: 1px solid transparent;
	border-radius: 9999px;
	box-shadow: none;
	font-family: inherit;
	font-size: var(--ccg-btn-fs, 13px);
	font-weight: 500;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: filter 0.12s ease, transform 0.12s ease;
}

#ccg-root .ccg-btn:hover {
	filter: brightness(0.94);
}

#ccg-root .ccg-btn:active {
	transform: scale(0.98);
}

#ccg-root .ccg-btn--customize,
#ccg-root .ccg-btn--customize:hover,
#ccg-root .ccg-btn--customize:focus,
#ccg-root .ccg-btn--customize:active,
#ccg-root .ccg-btn--customize:visited {
	box-shadow: none;
	background: transparent;
	color: var(--ccg-customize);
	border-color: var(--ccg-customize);
}

/* Customize (and Save in the panel) filled like the other buttons. */
#ccg-root.ccg-cust-filled .ccg-btn--customize,
#ccg-root.ccg-cust-filled .ccg-btn--customize:hover,
#ccg-root.ccg-cust-filled .ccg-btn--customize:focus,
#ccg-root.ccg-cust-filled .ccg-btn--customize:active,
#ccg-root.ccg-cust-filled .ccg-btn--customize:visited {
	background: var(--ccg-customize-bg, #e5e7eb);
	color: var(--ccg-customize-text, #18181b);
	border-color: var(--ccg-customize-bg, #e5e7eb);
}

#ccg-root .ccg-btn--reject,
#ccg-root .ccg-btn--reject:hover,
#ccg-root .ccg-btn--reject:focus,
#ccg-root .ccg-btn--reject:active,
#ccg-root .ccg-btn--reject:visited {
	box-shadow: none;
	background: var(--ccg-reject-bg);
	color: var(--ccg-reject-text);
	border-color: var(--ccg-reject-bg);
}

#ccg-root .ccg-btn--accept,
#ccg-root .ccg-btn--accept:hover,
#ccg-root .ccg-btn--accept:focus,
#ccg-root .ccg-btn--accept:active,
#ccg-root .ccg-btn--accept:visited {
	box-shadow: none;
	background: var(--ccg-accept-bg);
	color: var(--ccg-accept-text);
	border-color: var(--ccg-accept-bg);
}

#ccg-root .ccg-btn--link,
#ccg-root .ccg-btn--link:hover,
#ccg-root .ccg-btn--link:focus,
#ccg-root .ccg-btn--link:active,
#ccg-root .ccg-btn--link:visited {
	box-shadow: none;
	padding: 0 8px;
	background: transparent;
	color: inherit;
	border-color: transparent;
	text-decoration: underline;
	white-space: normal;
}

#ccg-root .ccg-btn:focus-visible,
#ccg-root .ccg-icon-btn:focus-visible,
#ccg-root .ccg-chev:focus-visible,
#ccg-root .ccg-svc__info:focus-visible,
#ccg-root .ccg-reopen:focus-visible,
#ccg-root input.ccg-toggle:focus-visible,
#ccg-root a:focus-visible {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
}

/* ---------- Preferences panel ---------- */

#ccg-root .ccg-panel {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: calc(100% - 32px);
	max-width: 460px;
	max-height: calc(100% - 32px);
	overflow-y: auto;
	padding: calc(var(--ccg-pad, 18px) + 2px * var(--ccg-scale, 1));
	background: var(--ccg-bg);
	color: var(--ccg-text);
	border-radius: var(--ccg-radius);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	pointer-events: auto;
	outline: none;
	container-type: inline-size;
	container-name: ccg;
}

#ccg-root .ccg-panel__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 12px;
}

#ccg-root .ccg-panel__brand {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

#ccg-root .ccg-panel__brand .ccg-logo {
	align-self: flex-start;
}

#ccg-root .ccg-panel__title-row {
	display: flex;
	gap: 10px;
	align-items: center;
}

#ccg-root .ccg-panel__title {
	font-size: var(--ccg-title-fs, 16px);
	font-weight: 600;
	line-height: 1.3;
}

#ccg-root .ccg-icon-btn,
#ccg-root .ccg-chev,
#ccg-root .ccg-svc__info {
	position: relative;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: transparent;
	color: inherit;
	box-shadow: none;
	cursor: pointer;
}

#ccg-root .ccg-icon-btn {
	margin: -4px -8px 0 0;
}

#ccg-root .ccg-chev {
	width: 32px;
	height: 32px;
}

#ccg-root .ccg-svc__info {
	width: 24px;
	height: 24px;
	opacity: 0.6;
}

/* 44px hit areas without changing the drawn size. */
#ccg-root .ccg-icon-btn::after,
#ccg-root .ccg-chev::after,
#ccg-root .ccg-svc__info::after {
	content: "";
	position: absolute;
	inset: -6px;
}

#ccg-root .ccg-svc__info::after {
	inset: -10px;
}

#ccg-root .ccg-chev .ccg-ic {
	transition: transform 0.2s ease;
}

#ccg-root .ccg-chev.is-open .ccg-ic {
	transform: rotate(180deg);
}

#ccg-root .ccg-icon-btn:hover,
#ccg-root .ccg-chev:hover,
#ccg-root .ccg-svc__info:hover,
#ccg-root .ccg-icon-btn:active,
#ccg-root .ccg-chev:active,
#ccg-root .ccg-svc__info:active {
	border: 0;
	background: rgba(127, 127, 127, 0.12);
	box-shadow: none;
	color: inherit;
}

#ccg-root .ccg-panel__text {
	margin: 0;
	padding: 0;
	/* Message size − 1px, at least 10px (both scaled). */
	font-size: max(calc(10px * var(--ccg-scale, 1)), calc(var(--ccg-fs, 13px) - 1px * var(--ccg-scale, 1)));
	line-height: 1.5;
	opacity: 0.85;
}

#ccg-root .ccg-cats {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

#ccg-root .ccg-cat {
	border: 1px solid rgba(127, 127, 127, 0.3);
	border-radius: 12px;
}

#ccg-root .ccg-cat__row {
	display: flex;
	gap: 10px;
	align-items: center;
	padding: 12px;
}

#ccg-root .ccg-cat__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

#ccg-root .ccg-cat__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
}

#ccg-root .ccg-cat__desc {
	font-size: 11px;
	line-height: 1.4;
	opacity: 0.75;
}

#ccg-root .ccg-svcs {
	display: flex;
	flex-direction: column;
	padding: 6px 12px 8px 40px;
	border-top: 1px solid rgba(127, 127, 127, 0.3);
}

#ccg-root .ccg-svc__row {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 6px 0;
}

#ccg-root .ccg-svc__name {
	flex: 1;
	min-width: 0;
	font-size: 12px;
	line-height: 1.3;
}

#ccg-root .ccg-svc__cookies {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0 0 6px;
	padding: 8px 10px;
	list-style: none;
	border-radius: 8px;
	background: rgba(127, 127, 127, 0.08);
	font-size: 11px;
	line-height: 1.4;
}

#ccg-root .ccg-svc__cookies li {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 8px;
	margin: 0;
	padding: 0;
}

#ccg-root .ccg-svc__cookies code {
	padding: 0;
	background: none;
	color: inherit;
	font-family: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
	font-size: 11px;
	font-weight: 500;
}

#ccg-root .ccg-svc__exp {
	opacity: 0.75;
}

#ccg-root .ccg-svc__desc {
	flex-basis: 100%;
	opacity: 0.75;
}

#ccg-root .ccg-actions--panel {
	width: 100%;
	padding-top: 4px;
}

#ccg-root .ccg-actions--panel .ccg-btn {
	flex: 1 1 0;
	min-width: 0;
	padding: 0 calc(var(--ccg-btn-h, 38px) * 0.37);
}

/* ---------- Toggles (real checkboxes with role="switch") ---------- */

#ccg-root input.ccg-toggle {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	display: inline-block;
	flex-shrink: 0;
	width: 40px;
	min-width: 40px;
	height: 22px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: rgba(127, 127, 127, 0.45);
	box-shadow: none;
	vertical-align: middle;
	cursor: pointer;
	transition: background 0.2s ease;
}

#ccg-root input.ccg-toggle::before,
#ccg-root input.ccg-toggle:checked::before {
	content: "";
	position: absolute;
	top: 2px;
	left: 2px;
	float: none;
	width: 18px;
	height: 18px;
	margin: 0;
	border-radius: 9999px;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease;
}

#ccg-root input.ccg-toggle::after {
	content: none;
}

#ccg-root input.ccg-toggle:checked {
	background: var(--ccg-accept-bg);
}

#ccg-root input.ccg-toggle:checked::before {
	transform: translateX(18px);
}

#ccg-root input.ccg-toggle--sm {
	width: 34px;
	min-width: 34px;
	height: 20px;
}

#ccg-root input.ccg-toggle--sm::before,
#ccg-root input.ccg-toggle--sm:checked::before {
	width: 16px;
	height: 16px;
}

#ccg-root input.ccg-toggle--sm:checked::before {
	transform: translateX(14px);
}

#ccg-root input.ccg-toggle:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

/* ---------- Floating re-open button ---------- */

#ccg-root .ccg-reopen {
	position: absolute;
	bottom: var(--ccg-reopen-y);
	display: grid;
	place-items: center;
	box-sizing: border-box;
	width: var(--ccg-reopen-size);
	height: var(--ccg-reopen-size);
	min-height: 0;
	margin: 0;
	padding: 0;
	border-radius: 9999px;
	cursor: pointer;
	pointer-events: auto;
}

/* Own colours in every state, so theme button / hover styles can't recolour it. */
#ccg-root .ccg-reopen,
#ccg-root .ccg-reopen:hover,
#ccg-root .ccg-reopen:focus,
#ccg-root .ccg-reopen:active,
#ccg-root .ccg-reopen:visited {
	border: 0;
	background: var(--ccg-reopen-bg, #18181b);
	color: var(--ccg-reopen-fg, #ffffff);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	text-decoration: none;
}

#ccg-root.ccg-reopen-left .ccg-reopen {
	left: var(--ccg-reopen-x);
}

#ccg-root.ccg-reopen-right .ccg-reopen {
	right: var(--ccg-reopen-x);
}

/*
 * ---------- Mobile button layout ----------
 * Same rules for three triggers: the banner / panel itself narrower than
 * 420px, a viewport of 600px or less, and the admin preview's Mobile switch.
 */

@container ccg (max-width: 419px) {
	#ccg-root .ccg-banner .ccg-actions,
	#ccg-root .ccg-panel .ccg-actions {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		width: 100%;
		flex: 1 1 100%;
	}

	#ccg-root .ccg-banner .ccg-btn,
	#ccg-root .ccg-panel .ccg-btn {
		width: 100%;
		min-width: 0;
		justify-content: center;
	}

	/* Row 1: Customize (Save in the panel) on its own, full width; row 2: Accept + Reject. */
	#ccg-root .ccg-actions .ccg-btn--customize,
	#ccg-root .ccg-actions .ccg-btn--save,
	#ccg-root .ccg-actions .ccg-btn--link,
	#ccg-root .ccg-actions > .ccg-btn:only-child {
		grid-column: 1 / -1;
		order: -1;
	}
}

@media (max-width: 600px) {
	#ccg-root:not(.ccg-root--preview) .ccg-banner .ccg-actions,
	#ccg-root:not(.ccg-root--preview) .ccg-panel .ccg-actions {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
		width: 100%;
		flex: 1 1 100%;
	}

	#ccg-root:not(.ccg-root--preview) .ccg-banner .ccg-btn,
	#ccg-root:not(.ccg-root--preview) .ccg-panel .ccg-btn {
		width: 100%;
		min-width: 0;
		justify-content: center;
	}

	/* Row 1: Customize (Save in the panel) on its own, full width; row 2: Accept + Reject. */
	#ccg-root:not(.ccg-root--preview) .ccg-actions .ccg-btn--customize,
	#ccg-root:not(.ccg-root--preview) .ccg-actions .ccg-btn--save,
	#ccg-root:not(.ccg-root--preview) .ccg-actions .ccg-btn--link,
	#ccg-root:not(.ccg-root--preview) .ccg-actions > .ccg-btn:only-child {
		grid-column: 1 / -1;
		order: -1;
	}
}

#ccg-root.ccg-root--mobile .ccg-banner .ccg-actions,
#ccg-root.ccg-root--mobile .ccg-panel .ccg-actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	width: 100%;
	flex: 1 1 100%;
}

#ccg-root.ccg-root--mobile .ccg-banner .ccg-btn,
#ccg-root.ccg-root--mobile .ccg-panel .ccg-btn {
	width: 100%;
	min-width: 0;
	justify-content: center;
}

/* Row 1: Customize (Save in the panel) on its own, full width; row 2: Accept + Reject. */
#ccg-root.ccg-root--mobile .ccg-actions .ccg-btn--customize,
#ccg-root.ccg-root--mobile .ccg-actions .ccg-btn--save,
#ccg-root.ccg-root--mobile .ccg-actions .ccg-btn--link,
#ccg-root.ccg-root--mobile .ccg-actions > .ccg-btn:only-child {
	grid-column: 1 / -1;
	order: -1;
}

@media (prefers-reduced-motion: no-preference) {
	#ccg-root:not(.ccg-root--preview) .ccg-banner:not([hidden]),
	#ccg-root:not(.ccg-root--preview) .ccg-panel:not([hidden]) {
		animation: ccg-fade-in 0.2s ease-out;
	}
}

@keyframes ccg-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media print {
	#ccg-root {
		display: none !important;
	}
}
