/* =========================================================================
 * AMEBA SHIATSU — Tipografía y estilos de bloques
 *
 * Filosofía: el Theme Style de Elementor es la fuente de verdad para
 * tipografía base (font-family de párrafos/listas, color de texto,
 * line-height, tamaños de headings). Este archivo SOLO define:
 *
 *   1. En el editor de bloques: la familia base y de headings, porque el
 *      iframe del editor no carga las variables --e-global-*.
 *
 *   2. En ambos (editor + frontend): los detalles que el Theme Style NO
 *      controla — color verde de H2/H3, bloque Detalles, citas, tablas,
 *      separadores, código, márgenes de listas.
 *
 * Cargado por el child theme en dos contextos vía wp_enqueue_style
 * (frontend) y add_editor_style (iframe Gutenberg).
 * ========================================================================= */

/* =========================================================================
 * 1. SOLO EDITOR DE BLOQUES — base tipográfica (frontend ya la tiene)
 * ========================================================================= */

.editor-styles-wrapper {
	font-family: var(--e-global-typography-text-font-family, "Inter"), sans-serif;
	color: var(--e-global-color-text, #1d1d1b);
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
	font-family: var(--e-global-typography-primary-font-family, "Quicksand"), sans-serif;
	line-height: 1.2;
}

/* =========================================================================
 * 2. COMÚN EDITOR + FRONTEND — overrides selectivos
 * ========================================================================= */

/* ───── H2 y H3 en verde primario (Theme Style los pone en color text) ── */

.editor-styles-wrapper h2,
.elementor-widget-theme-post-content h2,
.entry-content h2,
.editor-styles-wrapper h3,
.elementor-widget-theme-post-content h3,
.entry-content h3 {
	color: var(--e-global-color-primary, #86a54a);
}

/* ───── Listas — padding mínimo para que se vean bullets ─────────────── */

.editor-styles-wrapper ul,
.editor-styles-wrapper ol,
.elementor-widget-theme-post-content ul,
.elementor-widget-theme-post-content ol,
.entry-content ul,
.entry-content ol {
	padding-left: 1.5em;
	margin-block: 0.5em 1em;
}

.editor-styles-wrapper ul,
.elementor-widget-theme-post-content ul,
.entry-content ul {
	list-style: disc;
}

.editor-styles-wrapper ul li,
.editor-styles-wrapper ol li,
.elementor-widget-theme-post-content ul li,
.elementor-widget-theme-post-content ol li,
.entry-content ul li,
.entry-content ol li {
	margin-bottom: 0.4em;
}

/* ───── Citas ───────────────────────────────────────────────────────── */

.editor-styles-wrapper blockquote,
.elementor-widget-theme-post-content blockquote,
.entry-content blockquote {
	font-style: italic;
	border-left: 4px solid var(--e-global-color-secondary, #a4c56d);
	padding-left: 1.2em;
	margin: 1.5em 0;
}

.editor-styles-wrapper blockquote cite,
.elementor-widget-theme-post-content blockquote cite,
.entry-content blockquote cite {
	display: block;
	margin-top: 0.6em;
	font-style: normal;
	font-size: 0.95rem;
	color: var(--e-global-color-primary, #86a54a);
}

/* ───── Separadores ─────────────────────────────────────────────────── */

.editor-styles-wrapper hr,
.elementor-widget-theme-post-content hr,
.entry-content hr {
	border: 0;
	border-top: 1px solid #bfd699;
	margin: 2em auto;
	max-width: 60%;
}

/* ───── Enlaces ─────────────────────────────────────────────────────── */

.editor-styles-wrapper a,
.elementor-widget-theme-post-content a,
.entry-content a {
	color: var(--e-global-color-primary, #86a54a);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.editor-styles-wrapper a:hover,
.elementor-widget-theme-post-content a:hover,
.entry-content a:hover {
	color: var(--e-global-color-secondary, #a4c56d);
}

/* ───── Bloque Detalles (acordeón nativo) ───────────────────────────── */

.editor-styles-wrapper details.wp-block-details,
.elementor-widget-theme-post-content details.wp-block-details,
.entry-content details.wp-block-details {
	border: 1px solid #bfd699;
	border-radius: 10px;
	padding: 1em 1.4em;
	margin: 1em 0;
	background-color: #fff9f2;
	transition: background-color 0.2s ease;
}

.editor-styles-wrapper details.wp-block-details[open],
.elementor-widget-theme-post-content details.wp-block-details[open],
.entry-content details.wp-block-details[open] {
	background-color: #ffffff;
}

.editor-styles-wrapper details.wp-block-details summary,
.elementor-widget-theme-post-content details.wp-block-details summary,
.entry-content details.wp-block-details summary {
	font-family: var(--e-global-typography-primary-font-family, "Quicksand"), sans-serif;
	font-weight: 600;
	color: var(--e-global-color-primary, #86a54a);
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 0.2em 0;
}

.editor-styles-wrapper details.wp-block-details summary::-webkit-details-marker,
.elementor-widget-theme-post-content details.wp-block-details summary::-webkit-details-marker,
.entry-content details.wp-block-details summary::-webkit-details-marker { display: none; }

.editor-styles-wrapper details.wp-block-details summary::marker,
.elementor-widget-theme-post-content details.wp-block-details summary::marker,
.entry-content details.wp-block-details summary::marker { content: ""; }

.editor-styles-wrapper details.wp-block-details summary::after,
.elementor-widget-theme-post-content details.wp-block-details summary::after,
.entry-content details.wp-block-details summary::after {
	content: "+";
	font-family: var(--e-global-typography-primary-font-family, "Quicksand"), sans-serif;
	font-size: 1.6em;
	font-weight: 400;
	color: var(--e-global-color-primary, #86a54a);
	line-height: 1;
}

.editor-styles-wrapper details.wp-block-details[open] summary::after,
.elementor-widget-theme-post-content details.wp-block-details[open] summary::after,
.entry-content details.wp-block-details[open] summary::after {
	content: "−";
}

.editor-styles-wrapper details.wp-block-details > *:not(summary),
.elementor-widget-theme-post-content details.wp-block-details > *:not(summary),
.entry-content details.wp-block-details > *:not(summary) {
	margin-top: 1em;
}

/* ───── Tabla nativa ────────────────────────────────────────────────── */

.editor-styles-wrapper table,
.elementor-widget-theme-post-content table,
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
}

.editor-styles-wrapper table th,
.elementor-widget-theme-post-content table th,
.entry-content table th {
	font-family: var(--e-global-typography-primary-font-family, "Quicksand"), sans-serif;
	font-weight: 600;
	background-color: #bfd699;
	color: var(--e-global-color-text, #1d1d1b);
	padding: 0.6em 0.9em;
	text-align: left;
}

.editor-styles-wrapper table td,
.elementor-widget-theme-post-content table td,
.entry-content table td {
	padding: 0.6em 0.9em;
	border-bottom: 1px solid #bfd699;
}

/* ───── Código ──────────────────────────────────────────────────────── */

.editor-styles-wrapper code,
.editor-styles-wrapper pre,
.elementor-widget-theme-post-content code,
.elementor-widget-theme-post-content pre,
.entry-content code,
.entry-content pre {
	font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
	background-color: #f4f4f1;
	border-radius: 4px;
	padding: 0.1em 0.4em;
	font-size: 0.95em;
}

.editor-styles-wrapper pre,
.elementor-widget-theme-post-content pre,
.entry-content pre {
	padding: 1em 1.4em;
	overflow-x: auto;
}
