/*
Theme Name: Code Builder
Author: Code Builder
Description: Tema base de Code Builder. Solo arma el esqueleto de cada página (páginas, entradas, búsqueda, listas de categorías y etiquetas, página no encontrada); la cabecera, el pie y todo el diseño los pone el plugin Code Builder con sus reskins y páginas. Sus medidas, espacios y colores base parten de Twenty Twenty-Five (GPL), para que WooCommerce se vea bien.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: code-builder-tema
Update URI: false
*/

/* Ajustes pequeños, los mismos de Twenty Twenty-Five (enlaces, foco, cortes de línea), para que todo se vea igual. */

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

/*
 * Búsqueda y listados (categorías, etiquetas): cada resultado con su foto pequeña a la izquierda.
 * Es solo el orden básico; el diseño lo pone un reskin de Code Builder.
 */
:where(body.search, body.archive, body.blog) main .wp-block-post-template > li {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 1.25rem;
	align-items: start;
	margin-bottom: 2rem;
}
:where(body.search, body.archive, body.blog) main .wp-block-post-template > li > * {
	grid-column: 2;
	margin-top: 0;
	margin-bottom: .4rem;
}
:where(body.search, body.archive, body.blog) main .wp-block-post-template > li > .wp-block-post-featured-image {
	grid-column: 1;
	grid-row: 1 / span 4;
	width: 96px;
	margin: 0;
}
:where(body.search, body.archive, body.blog) main .wp-block-post-template > li > .wp-block-post-featured-image img {
	width: 96px;
	height: 96px;
	object-fit: cover;
}
