/*
Theme Name: Read Together
Theme URI: https://ppelf.org/
Author: Pikes Peak Early Literacy Foundation
Author URI: https://ppelf.org/
Description: A block theme for local Dolly Parton's Imagination Library affiliates, built on the structure of Twenty Twenty-Five. Every template, header, footer, color and pattern is editable in the Site Editor. Includes sponsors with a header sponsor strip, events, a contact form, an optional enrollment interest form, a private Submissions screen, animated SVG blocks with safe SVG uploads, and a block for the Imagination Library's official online registration form.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.4
Version: 2.9.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: read-together
Update URI: https://updates.ppelf.org/read-together/
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, block-styles, style-variations, wide-blocks, accessibility-ready
*/

/* ------------------------------------------------------------------
 * Carried over from Twenty Twenty-Five (style.css, v1.5).
 * ------------------------------------------------------------------ */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}
.more-link {
	display: block;
}
:where(pre) {
	overflow-x: auto;
}

/* ------------------------------------------------------------------
 * Header: stays visible while scrolling on tablets and desktops.
 * On phones it scrolls away so it never covers the content.
 * ------------------------------------------------------------------ */
.rt-site-header {
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}
@media (min-width: 783px) {
	.wp-site-blocks > header.wp-block-template-part {
		position: sticky;
		top: 0;
		z-index: 100;
	}
	.admin-bar .wp-site-blocks > header.wp-block-template-part {
		top: var(--wp-admin--admin-bar--height, 32px);
	}
}
/* Phones: keep the logo, menu button and Enroll button on one row. */
@media (max-width: 600px) {
	.rt-site-header .wp-block-site-title {
		font-size: var(--wp--preset--font-size--medium);
	}
	.rt-site-header .wp-block-site-logo img {
		width: 36px;
		height: auto;
	}
}

.rt-header-cta .wp-block-button__link {
	white-space: nowrap;
}

/*
 * Pages that start or end with ordinary content (text, an
 * image) rather than a full-width section get breathing room from the header
 * and footer. Full-width heroes still sit flush against the header.
 */
.rt-page-main > .wp-block-post-content > :first-child:not(.alignfull) {
	margin-block-start: var(--wp--preset--spacing--60);
}
.rt-page-main > .wp-block-post-content > :last-child:not(.alignfull) {
	margin-block-end: var(--wp--preset--spacing--60);
}

.rt-page-main > .wp-block-post-title {
	margin-block-start: var(--wp--preset--spacing--50);
}

/*
 * Enroll link vs. Enroll button. 600px is where the menu collapses to the
 * menu button. Larger screens: the button shows, a duplicate menu link
 * doesn't. Phones: if the menu has the enroll link, it appears inside the
 * menu as a button and the header button steps aside to make room.
 */
@media (min-width: 600px) {
	.rt-site-header .wp-block-navigation .rt-enroll-link {
		display: none;
	}
}
@media (max-width: 599px) {
	.rt-site-header:has(.rt-enroll-link) .rt-header-cta {
		display: none;
	}
	.rt-site-header .rt-enroll-link > .wp-block-navigation-item__content {
		display: inline-block;
		padding: .6rem 1.2rem !important;
		border-radius: 9999px;
		background: var(--wp--preset--color--coral);
		color: var(--wp--preset--color--contrast) !important;
		font-weight: 700;
		text-decoration: none;
	}
}

/* The header's Donate button gives way to the menu on phones. */
@media (max-width: 599px) {
	.rt-site-header .wp-block-buttons > .rt-header-donate {
		display: none;
	}
}

/* Footer contact details. */
.rt-footer-contact {
	font-size: var(--wp--preset--font-size--small);
	font-style: normal;
}
.rt-footer-contact a {
	color: inherit;
}

/* Footer link lists without bullets. */
.rt-plain-list {
	list-style: none;
	padding-left: 0;
}
.rt-plain-list li + li {
	margin-top: .4em;
}

/* ------------------------------------------------------------------
 * Optional block styles (Block sidebar → Styles). Saved block colors,
 * borders and padding always win over these defaults.
 * ------------------------------------------------------------------ */

/* Details: "Card" and "Tinted card" — for FAQs. */
:where(.wp-block-details.is-style-faq-card, .wp-block-details.is-style-faq-tinted) {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent-6);
	border-radius: 14px;
	padding: 1.1rem 1.4rem;
}
:where(.wp-block-details.is-style-faq-card, .wp-block-details.is-style-faq-tinted) > summary {
	font-weight: 700;
	cursor: pointer;
}
.wp-block-details.is-style-faq-tinted:not(.has-background) {
	background: var(--wp--preset--color--accent-2);
}
.wp-block-details.is-style-faq-tinted:not(.has-border-color) {
	border-color: var(--wp--preset--color--accent-3);
}

/* Image: "Soft corners". */
.wp-block-image.is-style-soft-corners img {
	border-radius: 28px;
}

/*
 * Cover: "Fill" (default) crops the background image or video to fill the
 * block. "Fit" shows the whole image; the focal point sets where it sits and
 * any space around it shows the page background.
 */
.wp-block-cover.is-style-fit .wp-block-cover__image-background,
.wp-block-cover.is-style-fit .wp-block-cover__video-background {
	object-fit: contain;
}
.wp-block-cover.is-style-fit .wp-block-cover__image-background.has-parallax,
.wp-block-cover.is-style-fit.has-parallax {
	background-size: contain;
	background-repeat: no-repeat;
}

/* Column: "Card". */
.wp-block-column.is-style-feature-card {
	border: 1px solid var(--wp--preset--color--accent-6);
	border-top: 6px solid var(--wp--preset--color--accent-1);
	border-radius: 20px;
	padding: clamp(18px, 3vw, 32px);
}
.wp-block-column.is-style-feature-card:not(.has-background) {
	background: var(--wp--preset--color--base);
}

/* Notice pattern: a highlighted message. */
.rt-notice {
	border-left: 6px solid var(--wp--preset--color--accent-1);
	border-radius: 8px;
}

/* Optional scroll-triggered entrance animations on Image, Group and Cover blocks.
 * JS only enables the hidden state when an IntersectionObserver is available.
 * Editors, disabled JavaScript, and reduced-motion users see the final state.
 */
@media (prefers-reduced-motion: no-preference) {
    html.rt-entrance-enabled [data-rt-entrance] {
        opacity: 0;
        transition-property: opacity, transform;
        transition-duration: var(--rt-entrance-duration, 800ms);
        transition-delay: var(--rt-entrance-delay, 0ms);
        transition-timing-function: cubic-bezier(.2, .65, .25, 1);
    }
    html.rt-entrance-enabled [data-rt-entrance="fade-up"] {
        transform: translate3d(0, 24px, 0);
    }
    html.rt-entrance-enabled [data-rt-entrance="zoom"] {
        transform: scale(.96);
    }
    html.rt-entrance-enabled [data-rt-entrance].rt-entrance-visible {
        opacity: 1;
        transform: none;
    }
}
