/*
Theme Name: Lead Pastors Only
Description: The Lead Pastors Only site design. A child theme of Twenty Twenty-Five: colours, fonts and sizes are in theme.json, page layouts are in templates/ and parts/, and this file holds the few layout rules the block editor has no control for.
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Requires PHP: 7.4
Text Domain: leadpastorsonly
*/

/* Header stays at the top of the window while the page scrolls. */
header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
	border-bottom: 1px solid #e6e6e6;
}

/* Menu: blue for the current page, and a plain magnifier for search. */
header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content.wp-block-navigation-item__content,
header .wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--steel);
}
header .wp-block-search__button {
	margin: 0;
	padding: 4px;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--accent-4);
}
header .wp-block-search__input {
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-family: var(--wp--preset--font-family--raleway);
	font-size: 16px;
	letter-spacing: 0;
}

/* Visitor notice on the home page (class "lpo-gate"): shown as a window over the page.
   The page editor shows it as an ordinary block so it can be edited. */
body:not(.editor-styles-wrapper) .lpo-gate {
	position: fixed;
	inset: 0;
	max-width: none;
	z-index: 1000;
	margin: 0;
	padding: 20px;
	overflow-y: auto;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: flex-start;
	justify-content: center;
}
.lpo-gate > * {
	width: 100%;
	max-width: 550px;
	margin: auto;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Login form (the Login/out block shown as a form). */
.wp-block-loginout form p {
	margin: 0 0 14px;
}
.wp-block-loginout form label {
	display: block;
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 4px;
}
.wp-block-loginout form .login-remember label {
	display: inline;
	font-weight: 400;
}
.wp-block-loginout form input[type="text"],
.wp-block-loginout form input[type="password"],
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
	box-sizing: border-box;
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	background: #fff;
	color: #0a0a0a;
	font: inherit;
	font-size: 16px;
}
.wp-block-loginout form input[type="submit"],
.wpcf7 input[type="submit"] {
	padding: 12px 28px;
	border: 0;
	border-radius: 4px;
	background: var(--wp--preset--color--blue);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	text-transform: uppercase;
	cursor: pointer;
}
.wpcf7 form p {
	margin: 0 0 14px;
}
.wpcf7 form label {
	display: block;
	font-size: 16px;
}

/* Post tiles (class "lpo-tiles" on a Query Loop): each tile is a Cover block
   with the post's featured image, and the whole tile is the link. */
.lpo-tiles .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.lpo-tiles .wp-block-post-template > li {
	margin: 0;
}
.lpo-tiles .wp-block-cover {
	height: 100%;
	min-height: 260px;
	padding: 20px;
}
.lpo-tiles .wp-block-post-title {
	margin: 0;
}
.lpo-tiles .wp-block-post-title a {
	color: inherit;
	text-decoration: none;
}
.lpo-tiles .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.lpo-tiles .wp-block-cover img {
	transition: transform 0.4s ease;
}
.lpo-tiles .wp-block-cover:hover img {
	transform: scale(1.05);
}

/* Home page arrangement (add class "lpo-mosaic" as well): one large tile on the
   left, one wide tile top right, two small tiles bottom right. */
.lpo-mosaic .wp-block-post-template {
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: 300px 300px;
}
.lpo-mosaic .wp-block-post-template > li:nth-child(1) {
	grid-row: 1 / 3;
}
.lpo-mosaic .wp-block-post-template > li:nth-child(2) {
	grid-column: 2 / 4;
}

/* Sideways-scrolling row of posts (class "lpo-carousel" on a Query Loop). */
.lpo-carousel .wp-block-post-template {
	display: flex;
	gap: 30px;
	margin: 0;
	padding: 0 0 16px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
}
.lpo-carousel .wp-block-post-template > li {
	flex: 0 0 100%;
	margin: 0;
	scroll-snap-align: center;
}
.lpo-carousel .wp-block-post-featured-image {
	margin: 0;
}

.lpo-card {
	overflow: hidden;
}
.lpo-card .wp-block-post-featured-image {
	margin: 0;
}
.lpo-carousel .lpo-card {
	display: flex;
	align-items: center;
	height: 100%;
}
.lpo-carousel .lpo-card .wp-block-post-featured-image {
	flex: 0 0 55%;
}
.lpo-carousel .lpo-card .wp-block-post-title {
	margin: 0;
	padding: 20px 30px;
}

/* Extra-wide button (class "lpo-wide-button" on a Button). */
.lpo-wide-button {
	width: min(700px, 100%);
}
.lpo-wide-button .wp-block-button__link {
	display: block;
}

@media (max-width: 781px) {
	.lpo-carousel .lpo-card {
		display: block;
	}
	.lpo-tiles .wp-block-post-template,
	.lpo-mosaic .wp-block-post-template {
		grid-template-columns: 1fr;
		grid-template-rows: none;
	}
	.lpo-mosaic .wp-block-post-template > li:nth-child(1),
	.lpo-mosaic .wp-block-post-template > li:nth-child(2) {
		grid-row: auto;
		grid-column: auto;
	}
}
