/*
 * ABN Core — estilos mínimos de los shortcodes.
 *
 * Solo se cargan cuando **el plugin** es quien resuelve el shortcode. En un sitio con ABN
 * Framework los resuelve el theme, y es su hoja de estilos la que manda: este fichero no se
 * encola. Hace falta justo en el caso contrario —actualidadgadget.com, por ejemplo, que corre
 * GeneratePress—, donde nadie da formato a esta marca y la lista de autores sale como una lista
 * suelta y los enlaces sociales, que no llevan texto, directamente no se ven.
 *
 * Mismo resultado que en un sitio con el theme, con dos diferencias deliberadas:
 *
 * - Los colores salen de las variables del theme **si existen**, con un valor por defecto si no:
 *   `var( --soft-gray, #f2f2f2 )`. Así un sitio con ABN Framework y relevo forzado no cambia de
 *   paleta, y uno sin él no se queda en blanco.
 * - Los iconos son los del theme (Font Awesome Free), copiados a assets/icons/ con su atribución
 *   dentro de cada SVG. Se referencian con plugins_url(), no con una ruta del theme que en estos
 *   sitios no existe.
 *
 * Para quitarlos: add_filter( 'abn_core_shortcode_styles', '__return_false' ).
 */

/* [equipo] */
#authors-list ul {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	padding: 0;
	list-style: none;
}

#authors-list .author-meta {
	display: grid;
	flex: 0 0 100%;
	grid-template-rows: auto auto;
	grid-template-columns: auto 1fr;
	grid-column-gap: 1rem;
	grid-row-gap: 0;
}

#authors-list .author-avatar {
	display: block;
	width: 100px;
	height: 100px;
	grid-area: 1 / 1 / 3 / 2;
}

#authors-list .author-avatar img {
	box-sizing: border-box;
	border: 10px solid var( --soft-gray, #f2f2f2 );
	border-radius: 50%;
}

#authors-list .author-meta--info {
	grid-area: 1 / 2 / 2 / 3;
}

#authors-list .author-bio {
	grid-area: 2 / 2 / 3 / 3;
}

#authors-list ul li h3 {
	margin: 0.5em 0 0;
}

#authors-list a {
	text-decoration: none;
}

/*
 * El sangrado por defecto que los themes dan a cualquier <ul> (GeneratePress: 3em a la
 * izquierda) dejaba los iconos desplazados a la derecha del nombre, en vez de debajo. Quitar el
 * padding no basta: el hueco es margen.
 */
#authors-list .author-meta--social {
	display: flex;
	justify-content: flex-start;
	margin-left: 0;
	padding: 0;
	list-style: none;
}

#authors-list .author-meta--social li {
	margin-right: 0.3rem;
}

/*
 * Los enlaces sociales no llevan texto: sin esto son anclas vacías y no se ven. El icono se pinta
 * como máscara para que herede el color del sitio.
 */
.author-meta--social li a::before {
	display: block;
	width: 16px;
	height: 16px;
	background-color: var( --main-color, currentColor );
	content: "";
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
}

.author-meta--social li a.fa-twitter::before {
	-webkit-mask-image: url( "icons/x-twitter.svg" );
	mask-image: url( "icons/x-twitter.svg" );
}

.author-meta--social li a.fa-facebook::before {
	-webkit-mask-image: url( "icons/facebook.svg" );
	mask-image: url( "icons/facebook.svg" );
}

.author-meta--social li a.fa-linkedin::before {
	-webkit-mask-image: url( "icons/linkedin.svg" );
	mask-image: url( "icons/linkedin.svg" );
}

.author-meta--social li a.fa-rss::before {
	-webkit-mask-image: url( "icons/rss.svg" );
	mask-image: url( "icons/rss.svg" );
}

/* [resaltado] */
.texto-resaltado {
	margin: 2rem 0;
	padding: 1rem 1.5rem;
	border-left: 4px solid var( --main-color, #333 );
	background: var( --soft-gray, #f2f2f2 );
}

/* [relacionado] — las mismas reglas que se sirven a AMP. */
.post-relacionado {
	display: flex;
	max-width: 550px;
	margin: 2rem auto;
	padding: 1rem;
	align-items: center;
	background: #f7f7f7;
	box-shadow: 0 0 7px rgba( 0, 0, 0, 0.2 );
	text-decoration: none;
}

/*
 * The thumbnail is a bare <img class="wp-post-image"> or, once a WebP plugin (Imagify)
 * rewrites it, <picture class="wp-post-image"><img></picture>. A rule on .wp-post-image then
 * sized only the <picture> (120px) and left the <img> to the theme (150px): 30px of image
 * over the title (eloutput, 2026-11-20). :where() keeps the size at zero specificity so the
 * theme's own value wins where it has one; 120px is the fallback for other themes.
 */
:where( .post-relacionado ) picture,
:where( .post-relacionado ) img {
	display: block;
	flex: 0 0 auto;
	max-width: 120px;
	height: auto;
	margin-right: 1.5rem;
}

/* The <img> inside a <picture> never outgrows it, nor repeats its margin. */
.post-relacionado picture img {
	max-width: 100%;
	margin: 0;
}

.post-relacionado div:first-child {
	color: #777;
	font-size: 1rem;
	text-transform: uppercase;
}

.post-relacionado-title {
	display: block;
	font-size: 1rem;
	font-weight: bold;
	text-decoration: none;
}

/* [listado-taxonomia view="abc"] */
.listado-taxonomia.grid.abn-abc {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 12rem, 1fr ) );
	grid-gap: 1.5rem;
}

.listado-taxonomia.grid.abn-abc ul {
	padding: 0;
	list-style: none;
}

.listado-taxonomia.grid.abn-abc .term-letter {
	margin: 0 0 0.5rem;
	border-bottom: 1px solid var( --soft-gray, #f2f2f2 );
}
