/*
Theme Name:   Shelter from the Wind
Theme URI:    https://shelterfromthewind.com
Description:  Child theme of Twenty Twenty-Five for Shelter from the Wind. Colours and fonts live in theme.json; templates and parts are files in this theme and can be edited in the Site Editor.
Author:       cannedSunlight
Author URI:   https://cannedsunlight.com
Template:     twentytwentyfive
Version:      1.0.0
Requires at least: 7.1
Requires PHP: 8.2
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  shelterfromthewind
*/

/*
 * Only CSS that Global Styles and theme.json cannot handle goes here.
 * Mobile first: general rules first, media queries together at the end in ascending min-width order.
 */

/* Header */

.sftw-header {
	border-bottom: 1px solid var(--wp--preset--color--accent-2);
}

/*
 * No white strip between the coloured page sections and the footer. The template's Main group
 * has its top margin set to 0 in the template files; the footer part has no spacing setting.
 */
.wp-site-blocks > footer.wp-block-template-part {
	margin-block-start: 0;
}

/* Full circular logo: smaller on phones so the header stays compact. */
.sftw-header .wp-block-site-logo img {
	width: 64px;
	height: auto;
}

.sftw-header .wp-block-site-tagline {
	margin: 0;
	line-height: 1.3;
}

/* Facebook icon at the end of the menu. */
.sftw-header-social .wp-social-link a:hover,
.sftw-header-social .wp-social-link a:focus-visible {
	color: var(--wp--preset--color--accent-3);
}

/* Front page hero: the logo's light sky to sky blue (navy text on both passes AA). */

.sftw-hero {
	background: linear-gradient(135deg, var(--wp--preset--color--accent-2), var(--wp--preset--color--accent-1));
}

/*
 * Hero dog image: the edges fade out so the photo merges into the background.
 * A cut-out PNG or WebP with a transparent background works too; the fade just softens its edges.
 */
.sftw-hero__image {
	max-width: 320px;
	margin: 0 auto;
}

.sftw-hero__image img {
	display: block;
	width: 100%;
	height: auto;
	-webkit-mask-image: radial-gradient(ellipse at center, black 55%, transparent 72%);
	mask-image: radial-gradient(ellipse at center, black 55%, transparent 72%);
}

/* Dog cards */

.sftw-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--accent-2);
	border-radius: 12px;
	background: var(--wp--preset--color--base);
}

.sftw-card .wp-block-post-featured-image {
	margin: 0;
}

.sftw-card .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	object-fit: cover;
}

.sftw-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.sftw-card__body .wp-block-post-title a {
	text-decoration: none;
}

.sftw-card__body .wp-block-sftw-meet-dog {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--20);
}

/* Match the core Button block's pill shape (core: border-radius 9999px). */
.wp-block-sftw-meet-dog .wp-element-button {
	border-radius: 9999px;
}

/* Smaller button on dog cards so it doesn't overwhelm the card. */
.sftw-card .wp-block-sftw-meet-dog .wp-element-button {
	padding: 0.6rem 1.25rem;
	font-size: var(--wp--preset--font-size--small);
}

/* What we do and team */

.sftw-commitment,
.sftw-person {
	padding: var(--wp--preset--spacing--30);
	border-radius: 12px;
	background: var(--wp--preset--color--base);
}

/*
 * A lighter version of the hero gradient: pale to halfway between light sky and sky blue.
 * Navy text is 7.4:1 at the darkest point.
 */
.sftw-commitment {
	border: 1px solid var(--wp--preset--color--accent-2);
	background: linear-gradient(135deg, var(--wp--preset--color--accent-5), color-mix(in srgb, var(--wp--preset--color--accent-1) 50%, var(--wp--preset--color--accent-2)));
}

.sftw-commitment h3,
.sftw-person h3 {
	margin-top: 0;
}

.sftw-person p {
	margin-bottom: 0;
	color: var(--wp--preset--color--accent-4);
}

/* Footer: white links on navy, spaced out by the group's block gap. */

.sftw-footer-links p {
	margin: 0;
}

.sftw-footer a {
	color: var(--wp--preset--color--base);
}

.sftw-footer a:hover,
.sftw-footer a:focus {
	text-decoration: none;
}

/*
 * Footer link list: no underline, a small chevron to the left, sky blue on hover.
 * Sky blue on navy is 4.8:1.
 */
.sftw-footer-links a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
}

.sftw-footer-links a::before {
	content: "";
	flex: none;
	width: 0.4em;
	height: 0.4em;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate(45deg);
}

.sftw-footer-links a:hover,
.sftw-footer-links a:focus-visible {
	color: var(--wp--preset--color--accent-1);
}

.sftw-footer-mark {
	margin-bottom: var(--wp--preset--spacing--20);
}

.sftw-footer a:focus-visible {
	outline: 2px solid var(--wp--preset--color--base);
	outline-offset: 2px;
}

/* Enquiry form (Contact Form 7). Medium text, a little smaller than the body text. */

.wpcf7-form {
	font-size: var(--wp--preset--font-size--medium);
}

.wpcf7-form p {
	margin: 0 0 1rem;
}

.wpcf7-form label {
	display: block;
	font-weight: 600;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
	box-sizing: border-box;
	width: 100%;
	margin-top: 0.25rem;
	padding: 0.5rem 0.75rem;
	border: 1px solid var(--wp--preset--color--accent-4);
	border-radius: 8px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	font: inherit;
	font-weight: 400;
}

.wpcf7-form textarea {
	height: 8rem;
}

.wpcf7-form input:focus-visible,
.wpcf7-form textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-3);
	outline-offset: 2px;
}

.wpcf7-form .sftw-data-notice {
	font-size: var(--wp--preset--font-size--small);
}

.wpcf7-form .wpcf7-acceptance .wpcf7-list-item {
	margin: 0;
}

.wpcf7-form .wpcf7-acceptance label {
	display: inline;
	font-weight: 400;
}

/* Submit: same look as the theme's buttons (navy, white text, pill; core Button radius 9999px). */
.wpcf7-form .wpcf7-submit {
	padding: 1rem 2.25rem;
	border: 0;
	border-radius: 9999px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font: inherit;
	font-size: var(--wp--preset--font-size--medium);
	cursor: pointer;
}

.wpcf7-form .wpcf7-submit:hover,
.wpcf7-form .wpcf7-submit:focus-visible {
	background: color-mix(in srgb, var(--wp--preset--color--contrast) 85%, transparent);
}

.wpcf7-form .wpcf7-submit:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

/* CookieYes banner: pill buttons to match the site (CookieYes has no setting for this). Colours are set in CookieYes. */

.cky-consent-container .cky-btn,
.cky-modal .cky-btn {
	border-radius: 9999px;
}

@media (min-width: 782px) {

	.sftw-header .wp-block-site-logo img {
		width: 120px;
	}

	.sftw-header .wp-block-site-title {
		font-size: var(--wp--preset--font-size--x-large);
	}

	.sftw-hero__image {
		max-width: none;
	}

	/*
	 * Enquiry form, two columns: name, email and phone on the left, message on the right,
	 * then the data notice, consent and Send button across the full width.
	 * Works from the form's own order, so the CF7 form template needs no wrapper markup.
	 */
	.wpcf7-form {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: var(--wp--preset--spacing--40);
	}

	.wpcf7-form > * {
		grid-column: 1 / -1;
	}

	.wpcf7-form > p:nth-of-type(1),
	.wpcf7-form > p:nth-of-type(2),
	.wpcf7-form > p:nth-of-type(3) {
		grid-column: 1;
	}

	.wpcf7-form > p:nth-of-type(4) {
		display: flex;
		grid-column: 2;
		grid-row: 1 / span 3;
		flex-direction: column;
	}

	.wpcf7-form > p:nth-of-type(4) label,
	.wpcf7-form > p:nth-of-type(4) .wpcf7-form-control-wrap {
		display: flex;
		flex: 1;
		flex-direction: column;
	}

	.wpcf7-form > p:nth-of-type(4) textarea {
		flex: 1;
		height: auto;
		min-height: 8rem;
	}
}
