/*
Theme Name: Mainstay Base
Theme URI: https://mainstaythemes.com/
Author: Mainstay Themes
Author URI: https://mainstaythemes.com/
Description: The shared foundation for Mainstay block themes: a simple, accessible starting point for UK small businesses, with ready-made full-page patterns and one-click style variations.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mainstay-base
Tags: one-column, custom-colors, custom-menu, editor-style, featured-images, full-site-editing, block-patterns, translation-ready, wide-blocks, block-styles, style-variations
*/

/* Focus ring: two tones, so it shows on both light and dark sections. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.wp-block-button__link:focus-visible {
	outline: var(--wp--custom--focus--width) solid var(--wp--preset--color--contrast);
	outline-offset: var(--wp--custom--focus--width);
	box-shadow: 0 0 0 var(--wp--custom--focus--width) var(--wp--preset--color--base);
}

/* Form fields: a visible edge in every style. */
input:not([type="submit"], [type="button"], [type="checkbox"], [type="radio"]),
select,
textarea {
	border: var(--wp--custom--line--thin) solid var(--wp--preset--color--muted);
	border-radius: var(--wp--custom--radius--button);
}

/* Header, main content, footer and full-width sections sit flush against each other. */
.wp-site-blocks > *,
.wp-block-post-content > .alignfull,
main > .alignfull {
	margin-block: 0;
}

/* Card block style. */
.is-style-mainstay-card {
	height: 100%;
	padding: var(--wp--preset--spacing--40);
	background-color: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--card);
}

.has-surface-background-color .is-style-mainstay-card {
	background-color: var(--wp--preset--color--base);
}

/* FAQ rows. */
.wp-block-details {
	padding-block: var(--wp--preset--spacing--30);
	border-block-end: var(--wp--custom--line--thin) solid var(--wp--preset--color--border);
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
}

/* Left and right aligned content stays inside the text column on full-width pages. */
.wp-block-post-content.alignfull > .alignleft {
	margin-inline-start: max(0%, calc((100% - var(--wp--style--global--content-size)) / 2));
}

.wp-block-post-content.alignfull > .alignright {
	margin-inline-end: max(0%, calc((100% - var(--wp--style--global--content-size)) / 2));
}

/* Long words, big images and code never push the page sideways. */
body {
	overflow-wrap: break-word;
}

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

.wp-caption {
	max-width: 100%;
}

pre {
	white-space: pre-wrap;
}

table {
	max-width: 100%;
}
