/*
Theme Name: Brunacora
Author: Bruna
Description: A simple old-school blog theme, with predictable featured images and a fuller set of design controls. A fork of Bitácora by Automattic.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.0
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brunacora
Tags: two-columns, right-sidebar, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, rtl-language-support, theme-options, threaded-comments, translation-ready, blog, style-variations

Brunacora is a fork of Bitácora 1.0.10.
Bitácora is copyright Automattic, https://automattic.com/, and is distributed
under the GNU General Public License v2 or later. This derivative work is
distributed under the same licence. Original theme:
https://wordpress.org/themes/bitacora/
*/

/*
 * Featured images in a list are locked to one aspect ratio so the page does not
 * reflow as photographs of different shapes load.
 *
 * The block sets width/height/object-fit inline on a real featured image, but
 * not on the image it borrows from the post body when useFirstImageFromPost
 * kicks in. That one inherits the core rule of height:auto, so a 4:3 photo
 * overflows a 16:9 box. These two rules cover both cases.
 */
.wp-block-post-featured-image.has-fixed-ratio {
	overflow: hidden;
}

.wp-block-post-featured-image.has-fixed-ratio :where(img) {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Control the hover stylings of outline block style.
 * Unnecessary once block styles are configurable via theme.json
 * https://github.com/WordPress/gutenberg/issues/42794
 */
.wp-block-button.is-style-outline
	> .wp-block-button__link:not(.has-background):hover {
	background-color: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--background);
	border-color: var(--wp--preset--color--secondary);
}

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

/* Overrides the Gutenberg styles for the outline button */
.wp-block-button.is-style-outline > .wp-block-button__link {
	padding: calc(10px - 1px) calc(15px - 1px);
	border: 1px solid var(--wp--preset--color--foreground);
}

/* Reset the Gutenberg style for the author byline */
.wp-block-post-author__byline {
	font-size: 1em;
}

/* There is no option for border-radius yet, and reset the vertical alignment */
.wp-block-post-author__avatar img {
	border-radius: 999px;
	vertical-align: middle;
}

.wp-block-avatar img {
	vertical-align: middle;
}

/*
 * Needed until https://github.com/WordPress/gutenberg/issues/34196 or something like it.
 */
.wp-block-tag-cloud.is-style-outline a {
	border-radius: 999px;
	padding: 0 1rem;
}

.wp-block-tag-cloud.is-style-outline a:hover {
	color: var(--wp--preset--color--background);
	background-color: var(--wp--preset--color--primary);
}

/*
 * Remove the default margin bottom from term description and post excerpt.
 */
.wp-block-term-description p:first-child {
	margin-top: 0;
}

.wp-block-term-description p:last-child {
	margin-bottom: 0;
}

.wp-block-search__input,
.wp-block-jetpack-subscriptions.wp-block-jetpack-subscriptions__supports-newline
	form
	input[type="email"] {
	border-color: var(--wp--preset--color--tertiary);
}

/*
 * Needed to style Jetpack Form
 */
.wp-block-jetpack-contact-form
	input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-mailchimp input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-revue input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-contact-form select,
.wp-block-jetpack-contact-form textarea {
	background-color: #fff;
	border: 1px solid var(--wp--preset--color--tertiary);
	font-size: 1em;
	padding: 0.75rem;
}

.wp-block-jetpack-contact-form .wp-block-jetpack-button button,
.wp-block-jetpack-mailchimp .wp-block-jetpack-button button,
.wp-block-jetpack-revue .wp-block-jetpack-button button {
	border-width: 0;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: inherit;
	padding: 10px 15px;
}
