/*
 * Rowes Retreats: how WordPress's own blocks take on the site's styles.
 */

/* Hero: the Cover block */

.wp-block-cover.rr-page-hero,
.wp-block-cover.rr-hero {
	min-height: 0;
	color: inherit;
}

.wp-block-cover.rr-page-hero--image { padding: 132px 0; }

/* The date picker needs to open past the bottom edge */
.wp-block-cover.rr-hero {
	min-height: 720px;
	padding: 0;
	overflow: visible;
}

.rr-page-hero > .wp-block-cover__background,
.rr-hero > .wp-block-cover__background { display: none; }

.rr-page-hero::before,
.rr-hero::before { z-index: 1; }

.wp-block-cover.rr-page-hero > .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	min-width: 0;
	max-width: 900px;
	margin: 0 auto;
	padding: 0 24px;
	color: inherit;
	text-align: center;
}

.wp-block-cover.rr-hero > .wp-block-cover__inner-container {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 32px;
	width: 100%;
	min-width: 0;
	max-width: 1020px;
	margin-inline: auto;
	padding: 0 24px 64px;
	color: inherit;
}

@media (max-width: 700px) {
	.wp-block-cover.rr-page-hero--image { padding: 88px 0; }
}

/* Buttons */

.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.wp-block-button { margin: 0; }

.wp-block-button__link {
	display: inline-block;
	padding: 15px 34px;
	border: 2px solid var(--rr-accent);
	border-radius: 999px;
	background-color: var(--rr-accent);
	color: #fff;
	font-family: var(--rr-sans);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.2s, background-color 0.2s, color 0.2s;
}

.wp-block-button .wp-block-button__link,
.wp-block-button .wp-block-button__link:hover { color: #fff; }

.wp-block-button__link:hover { filter: brightness(1.1); }

.wp-block-button.is-style-outline > .wp-block-button__link {
	padding: 15px 34px;
	border: 2px solid var(--rr-accent);
	background-color: transparent;
	color: var(--rr-accent);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--rr-accent);
	color: #fff;
	filter: none;
}

.rr-split--accent .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: var(--rr-gold);
	color: var(--rr-ink);
}

.rr-split--accent .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background-color: var(--rr-gold);
	color: #fff;
}

/* Images */

.wp-block-image.rr-img { margin: 0; }

.wp-block-image.rr-img.rr-body-figure { margin: 44px 0; }

.wp-block-image.rr-body-figure img { max-height: none; width: auto; max-width: 100%; border-radius: 0; }

.rr-photos-inner .rr-img:nth-child(-n + 2) img { grid-column: span 3; aspect-ratio: 4 / 3; }

.rr-photos-inner .rr-img:nth-child(n + 3) img { grid-column: span 2; aspect-ratio: 1 / 1; }

/* Exactly three make one row */
@media (min-width: 901px) {
	.rr-photos-inner:has(> .rr-img:nth-child(3):last-child) .rr-img:nth-child(n) img { grid-column: span 2; aspect-ratio: 4 / 5; }
}

@media (max-width: 900px) {
	.rr-photos-inner .rr-img:nth-child(n) img { grid-column: span 1; aspect-ratio: 4 / 3; }
}

/* Long-form text */

/* Margins don't collapse in a column, so only one of each pair is kept */
:is(.rr-prose-body, .rr-two-body) > p:has(+ :is(ul, ol, h3:not(.rr-hd))) { margin-bottom: 0; }

.rr-blk.rr-two-body > .rr-label + h3 { margin-top: 0; }

.rr-prose-body > .wp-block-buttons { margin: 0 0 18px; }

.rr-prose-body > .wp-block-image:not(.rr-img) { margin: 44px 0; }

.rr-prose-body :is(ul, ol) {
	font-size: 17px;
	line-height: 1.75;
	color: var(--rr-muted);
}

/* A page that is still just text gets the standard column */

.rr-prose-body :is(.alignwide, .alignfull) { margin-inline: 0; }
