/*
Theme Name: Gather
Theme URI: https://mainstaythemes.com/themes/gather/
Author: Mainstay Themes
Author URI: https://mainstaythemes.com/
Description: A romantic, botanical block theme for couples planning a wedding in the UK, with your story, the schedule, travel and stay, an RSVP section and a countdown.
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: gather
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%;
}

/* Buttons and menu icons are big enough to tap comfortably. */
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
}

.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
}

.wp-block-navigation__responsive-container-open svg {
	width: 2rem;
	height: 2rem;
}

/* When the menu has to wrap below the site name, it stays on the right. */
.mainstay-header-row:not(.is-vertical) > .mainstay-header-actions {
	margin-inline-start: auto;
}

/* Links that stand on their own, such as a phone number, are comfortable to tap. */
.wp-block-site-title a,
footer p > a:only-child,
.is-style-mainstay-card p > a:only-child {
	display: inline-block;
	padding-block: 0.125rem;
}

/* The open phone menu has large, well spaced links. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	padding-block: var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--x-large);
}

/* Phones: the site name and menu icon share the first row, so the page starts sooner. */
@media (max-width: 37.4375rem) {
	.mainstay-header-row {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: center;
		justify-items: start;
		gap: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30);
		width: 100%;
	}

	.mainstay-header-row .wp-block-site-title {
		text-align: start;
	}

	.mainstay-header-actions {
		display: contents !important;
	}

	/* The page's own button is just below, so the header's waits for bigger screens. */
	.mainstay-header-row .wp-block-buttons {
		display: none;
	}

	/* Where the button is the point, such as a phone number, it gets its own full-width row. */
	.mainstay-keep-cta .wp-block-buttons {
		display: flex;
		grid-column: 1 / -1;
		width: 100%;
	}

	.mainstay-keep-cta .wp-block-button,
	.mainstay-keep-cta .wp-block-button__link {
		width: 100%;
	}

	/* Main buttons fill the width, so they are easy to hit with a thumb. */
	main .wp-block-buttons > .wp-block-button {
		flex-grow: 1;
	}

	main .wp-block-buttons > .wp-block-button > .wp-block-button__link {
		width: 100%;
	}
}

/* The welcome is a paper invitation, laid over a photo. */
.gather-card {
	max-width: 36rem;
	margin-inline: auto;
	padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
	outline: var(--wp--custom--line--thin) solid var(--wp--preset--color--accent);
	outline-offset: -0.75rem;
	box-shadow: 0 1rem 3rem color-mix(in srgb, var(--wp--preset--color--contrast) 35%, transparent);
}

/* The botanical divider sits small and centred. */
.gather-sprig {
	max-width: 14rem;
	margin-inline: auto;
}

.gather-small {
	font-size: var(--wp--preset--font-size--small);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.gather-count {
	font-family: var(--wp--preset--font-family--cormorant-garamond);
	font-style: italic;
}

/* An arched photo, like a chapel window. */
.gather-arch img {
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: 50% 50% var(--wp--custom--radius--image) var(--wp--custom--radius--image) / 40% 40% var(--wp--custom--radius--image) var(--wp--custom--radius--image);
}

.gather-wide img {
	width: 100%;
	aspect-ratio: 21 / 9;
	object-fit: cover;
}

/* Schedule rows. */
.gather-times table {
	table-layout: auto;
}

.gather-times td {
	padding-inline: var(--wp--preset--spacing--20);
	padding-block: var(--wp--preset--spacing--20);
	border: 0;
	border-block-end: var(--wp--custom--line--thin) solid var(--wp--preset--color--border);
}

.gather-times td:first-child {
	font-family: var(--wp--preset--font-family--cormorant-garamond);
	font-size: var(--wp--preset--font-size--x-large);
	font-style: italic;
	white-space: nowrap;
}
