/**
 * Design tokens del tema fill (front). Carregar després del pare i abans dels altres CSS del child.
 *
 * Colors: accent i textos editorial.
 * Espaiat fluid (--pe-child-space-*): reutilitzats al Gutenberg de l’informe i coherents entre plantilles.
 */ 
body:not(.wp-admin) {
	/* Colors */
	--pe-child-accent: #347bbf;
	--pe-child-accent-dark: #2a6399;
	--pe-child-text: #191919;
	--pe-child-text-muted: #5c5c5c;
	--pe-child-text-subtle: #444444;
	--pe-child-text-soft: #666666;
	--pe-child-bg: #ffffff;
	--pe-child-on-accent: #ffffff;
	--pe-child-border: rgba(0, 0, 0, 0.08);
	--pe-child-border-subtle: rgba(0, 0, 0, 0.06);
	--pe-child-sidebar-bg: #f5f5f5;
	--pe-child-stripe-a: #e8ebef;
	--pe-child-stripe-b: #f4f6f8;
	--pe-child-row-hover: #d6ebff;
	--pe-child-download-border: #c5ccd4;
	--pe-child-card-fallback-bg: #4a5568;
	--pe-child-tab-inactive: #888888;
	--pe-child-focus-ring: #347bbf;
	--pe-child-focus-ring-alt: #2563eb;
	--pe-child-accent-line-soft: rgba(52, 123, 191, 0.25);
	--pe-child-accent-fill-soft: rgba(52, 123, 191, 0.08);

	/* Vores cites (global + informe) */ 
	--pe-child-quote-border-width: 2px;
	--pe-child-quote-font-size: clamp(0.84rem, 1.9vw, 1.18rem); 

	/* Gutter horitzontal pàgines amb contenidor (historial, tipologia) */ 
	--pe-child-page-gutter: 1.25rem;

	/* Espaiat vertical fluid (Gutenberg informe + referència) */
	--pe-child-space-section: clamp(1.5rem, 3.2vw, 2.75rem);
	--pe-child-space-flow: clamp(0.65rem, 1.75vw, 1.05rem);
	--pe-child-space-media: clamp(1.75rem, 2.5vw, 2rem);
	--pe-child-space-quote: clamp(1.0rem, 2.5vw, 2rem);
	--pe-child-space-quote-pad: clamp(0.55rem, 1.4vw, 0.95rem);

	/* Titulars de pàgina (historial / tipologia) */
	--pe-child-space-page-heading-margin: 2.25rem 0 1rem;
	--pe-child-space-gutenberg-block-end: 1.5rem;
	--pe-child-space-subsection-gap: 1.25rem;

	/* Embeds / iframes Gutenberg (single informe): 70% del contenidor; màxima única en px.  
	 * Dins .wp-block-column es sobreescriu l’ample a 100% (informe-socioeconomi-single.css); el cap es manté. */
	--pe-child-gutenberg-embed-width: 70%;
	--pe-child-gutenberg-embed-max-width: 700px;
}

/* Parche anti-desborde horizontal (prueba rápida) */   
html,
body {
	width: 100%;
	margin: 0;
	padding: 0;
	overflow-x: hidden;
}

img,
svg {
	max-width: 100%;
	height: auto;
}

/* Caixeta informativa al hover ([data-pe-tooltip] + fill .pe-child-tooltip) */    
body:not(.wp-admin) [data-pe-tooltip] {
	position: relative;
	overflow: visible;
}

body:not(.wp-admin) [data-pe-tooltip] > .pe-child-tooltip {
	position: absolute;
	bottom: calc(100% + 0.45rem);
	left: 50%;
	z-index: 20;
	display: block;
	margin: 0;
	padding: 0;
	border: 1px solid transparent;
	font-size: 0;
	line-height: 0;
	font-weight: 600;
	letter-spacing: 0.01em;
	white-space: nowrap;
	color: var(--pe-child-accent) !important;
	background: transparent;
	border-radius: 3px;
	box-shadow: none;
	opacity: 0;
	visibility: hidden;
	overflow: hidden;
	max-width: 0;
	max-height: 0;
	transform: translateX(-50%) translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease, max-width 0s 0.15s, max-height 0s 0.15s, padding 0s 0.15s, font-size 0s 0.15s, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	pointer-events: none;
}

body:not(.wp-admin) [data-pe-tooltip]:hover {
	z-index: 21;
}

body:not(.wp-admin) [data-pe-tooltip]:hover > .pe-child-tooltip {
	padding: 0.35rem 0.6rem;
	border-color: var(--pe-child-accent-line-soft);
	font-size: 0.7rem;
	line-height: 1.25;
	background: var(--pe-child-bg);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	opacity: 1;
	visibility: visible;
	overflow: visible;
	max-width: 20rem;
	max-height: 4rem;
	transform: translateX(-50%) translateY(0);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease, max-width 0s, max-height 0s, padding 0s, font-size 0s, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

/*.container, 
.wp-block-group {
	max-width: 100% !important;
	box-sizing: border-box;
}*/
