/**
 * Editor "gss-rte" (mismo estilo que las landing pages): toolbar + colores.
 * Los colores son clases controladas por el plugin; no hay CSS libre en el contenido.
 */

.gss-color {
	color: inherit;
}

.gss-color--teal {
	color: #0f5c5e;
}

.gss-color--indigo {
	color: #3c4e9a;
}

.gss-color--plum {
	color: #713e66;
}

.gss-color--terracotta {
	color: #984333;
}

.gss-color--maroon {
	color: #8a2124;
}

.gss-color--forest {
	color: #3f6b4a;
}

.gss-marker {
	--gss-marker-rgb: 244 185 66;
	padding: 0.02em 0.14em 0.06em;
	margin-inline: -0.03em;
	border-radius: 0.12em 0.28em 0.16em 0.22em;
	color: inherit;
	background:
		radial-gradient(ellipse at 18% 62%, rgb(var(--gss-marker-rgb) / 0.22) 0 18%, transparent 43%),
		linear-gradient(177deg, transparent 7%, rgb(var(--gss-marker-rgb) / 0.18) 9%, rgb(var(--gss-marker-rgb) / 0.56) 25%, rgb(var(--gss-marker-rgb) / 0.48) 76%, transparent 81%);
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.gss-marker--saffron {
	--gss-marker-rgb: 244 185 66;
}

.gss-marker--sage {
	--gss-marker-rgb: 141 188 154;
}

.gss-marker--lavender {
	--gss-marker-rgb: 174 157 222;
}

.gss-marker--coral {
	--gss-marker-rgb: 235 139 121;
}

.gss-marker--aqua {
	--gss-marker-rgb: 103 199 193;
}

.gss-marker--gold {
	--gss-marker-rgb: 253 186 73;
}

.gss-marker--rose {
	--gss-marker-rgb: 214 122 150;
}

html[data-gpm-theme="dark"] .gss-color--teal {
	color: #65d2cc;
}

html[data-gpm-theme="dark"] .gss-color--indigo {
	color: #afc1ff;
}

html[data-gpm-theme="dark"] .gss-color--plum {
	color: #e9add7;
}

html[data-gpm-theme="dark"] .gss-color--terracotta {
	color: #ffb09b;
}

html[data-gpm-theme="dark"] .gss-color--maroon {
	color: #ff9d9d;
}

html[data-gpm-theme="dark"] .gss-color--forest {
	color: #93d3a6;
}

@media (forced-colors: active) {
	.gss-marker {
		padding-inline: 0.08em;
		background: transparent;
		outline: 2px solid currentColor;
		text-decoration: underline;
		text-decoration-thickness: 0.14em;
		text-underline-offset: 0.12em;
	}
}

@media print {
	.gss-marker {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}

/* ── Toolbar (solo wp-admin) ──────────────────────────────────────────── */

.gss-rte {
	position: relative;
	max-width: 100%;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.gss-rte:focus-within {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.gss-rte__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	padding: 6px;
	border-bottom: 1px solid #dcdcde;
	border-radius: 8px 8px 0 0;
	background: #f6f7f7;
}

.gss-rte__group {
	display: flex;
	align-items: center;
	gap: 3px;
	padding-right: 6px;
	margin-right: 2px;
	border-right: 1px solid #dcdcde;
}

.gss-rte__group:last-child {
	padding-right: 0;
	margin-right: 0;
	border-right: 0;
}

.gss-rte__button,
.gss-rte__swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	min-height: 36px;
	padding: 5px 9px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	color: #1d2327;
	cursor: pointer;
}

.gss-rte__button:hover,
.gss-rte__button:focus-visible,
.gss-rte__button[aria-expanded="true"],
.gss-rte__button[aria-pressed="true"],
.gss-rte__swatch:hover,
.gss-rte__swatch:focus-visible {
	border-color: #8c8f94;
	background: #fff;
	outline: 2px solid transparent;
}

.gss-rte__button[aria-pressed="true"] {
	border-color: #2271b1;
	color: #135e96;
	box-shadow: inset 0 0 0 1px #2271b1;
}

.gss-rte__button:focus-visible,
.gss-rte__swatch:focus-visible,
.gss-rte__surface:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

.gss-rte__button strong,
.gss-rte__button em,
.gss-rte__button u {
	font-size: 15px;
}

.gss-rte__surface {
	min-height: 82px;
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.6;
	color: #1d2327;
	overflow-wrap: anywhere;
}

.gss-rte--title .gss-rte__surface {
	min-height: 24px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
}

.gss-rte__palette {
	position: absolute;
	z-index: 1000;
	top: 47px;
	left: 82px;
	display: grid;
	grid-template-columns: repeat(2, minmax(150px, 1fr));
	gap: 4px;
	width: min(360px, calc(100% - 24px));
	padding: 8px;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 8px 24px rgb(0 0 0 / 0.16);
}

.gss-rte__palette[hidden] {
	display: none;
}

.gss-rte__swatch {
	justify-content: flex-start;
	gap: 8px;
	min-width: 0;
	font-size: 12px;
	text-align: left;
}

.gss-rte__swatch-dot {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border: 1px solid rgb(0 0 0 / 0.18);
	border-radius: 50%;
	background: var(--gss-swatch, transparent);
}

html[data-gpm-theme="dark"] .gss-rte {
	border-color: rgba(253,186,73,.18);
	background: #14202f;
}

html[data-gpm-theme="dark"] .gss-rte:focus-within {
	border-color: #fdba49;
	box-shadow: 0 0 0 1px #fdba49;
}

html[data-gpm-theme="dark"] .gss-rte__toolbar {
	border-bottom-color: rgba(253,186,73,.18);
	background: #1f2b3a;
}

html[data-gpm-theme="dark"] .gss-rte__group {
	border-right-color: rgba(253,186,73,.18);
}

html[data-gpm-theme="dark"] .gss-rte__button,
html[data-gpm-theme="dark"] .gss-rte__swatch {
	color: #d7e3f8;
}

html[data-gpm-theme="dark"] .gss-rte__button:hover,
html[data-gpm-theme="dark"] .gss-rte__button:focus-visible,
html[data-gpm-theme="dark"] .gss-rte__button[aria-expanded="true"],
html[data-gpm-theme="dark"] .gss-rte__button[aria-pressed="true"],
html[data-gpm-theme="dark"] .gss-rte__swatch:hover,
html[data-gpm-theme="dark"] .gss-rte__swatch:focus-visible {
	border-color: rgba(253,186,73,.4);
	background: #263447;
}

html[data-gpm-theme="dark"] .gss-rte__button[aria-pressed="true"] {
	border-color: #fdba49;
	color: #fdba49;
	box-shadow: inset 0 0 0 1px #fdba49;
}

html[data-gpm-theme="dark"] .gss-rte__surface {
	color: #d7e3f8;
}

html[data-gpm-theme="dark"] .gss-rte__palette {
	border-color: rgba(253,186,73,.18);
	background: #14202f;
}

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

.gss-rte__status {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 782px) {
	.gss-rte__button,
	.gss-rte__swatch {
		min-width: 44px;
		min-height: 44px;
	}

	.gss-rte__palette {
		position: static;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: auto;
		margin: 6px 8px 8px;
	}
}

@media (max-width: 360px) {
	.gss-rte__palette {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gss-rte *,
	.gss-rte *::before,
	.gss-rte *::after {
		transition-duration: 0.01ms !important;
	}
}
