/*
Theme Name: Serial
Theme URI: https://themeshaper.com/serial/
Author: Automattic
Author URI: https://automattic.com/
Description: A clean, modern podcast theme that also suits video series, interviews, and any other episodic content. It switches between light and dark modes to match your visitors' system settings, and blog posts get their own simpler layout. Choose from 70 patterns to build a site that looks like your show, and pick one of 8 font options to set the tone.
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 7.2
Version: 1.0.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: serial
Tags: featured-images, full-site-editing, block-patterns, rtl-language-support, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations
*/

/* Crossfade page transition */
@media not (prefers-reduced-motion) {
	@view-transition {
		navigation: auto;
	}
	html {
		scroll-behavior: smooth;
	}
	a {
		transition: color 0.4s, text-decoration-color 0.4s ease;
	}
	a:hover {
		text-decoration-color: transparent;
	}
}

html {
	accent-color: var(--wp--preset--color--theme-7);
}

/* Font smoothing */
body {
	text-rendering: geometricprecision;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, p, blockquote, caption, figcaption, li {
	text-wrap: pretty;
}

/*
 * Tighten margin when a heading follows another heading in post content.
 * The doubled top-margin in theme.json signals a section break above; when
 * two headings are adjacent the subordinate one should sit closer to its
 * parent rather than read as a new section. The class is unwrapped from
 * :where() so we beat the theme.json-generated `:root :where(...)` rule
 * (which is 0,1,0 specificity from :root).
 */
.wp-block-post-content :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) {
	margin-top: var(--wp--style--block-gap);
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-color: var(--wp--custom--text-decoration-color);
	text-decoration-thickness: max(0.025em, 1px) !important;
	text-underline-offset: 0.15em;
}

/*
 * Typography > Decoration control
 * A decoration set with the control is drawn by the block wrapper, not the link, so the link
 * styles above don't reach it. Match it to the theme's link underline.
 * The `text-decoration` shorthand resets colour and thickness, hence !important.
 */
:is(
	.wp-block-post-title,
	.wp-block-site-title,
	.wp-block-post-date,
	.wp-block-post-author-name,
	.wp-block-post-comments-link,
	.wp-block-post-navigation-link,
	.wp-block-loginout,
	.wp-block-post-terms,
	.wp-block-list,
	.wp-block-latest-posts,
	.wp-block-archives,
	.wp-block-categories,
	.wp-block-page-list,
	.wp-block-table-of-contents,
	.wp-block-query-pagination,
	.wp-block-comments-pagination
) {
	text-decoration-color: var(--wp--custom--text-decoration-color) !important;
	text-decoration-thickness: max(0.025em, 1px) !important;
	text-underline-offset: 0.15em;
}

/* Font weight for strong — matches the heading weight so inline emphasis doesn't outweigh section headings. */
strong {
	font-weight: 600;
}

/* Form element styles */
input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=range]),
textarea {
	background-color: var(--wp--preset--color--theme-2);
	border-color: var(--wp--preset--color--theme-3);
	border-radius: 0.25rem;
	color: currentColor;
	font-family: inherit;
	font-size: var(--wp--preset--font-size--custom-2);
	line-height: 1;
	min-height: auto;
	padding: 0.75rem;
}

/* Single-line fields stay compact; a textarea uses the paragraph line height. */
textarea {
	line-height: calc(1em + 0.5rem);
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

/*
 * Make sure footers have no margin.
 * https://github.com/WordPress/gutenberg/issues/47637
 */
footer.wp-block-template-part {
	margin-block-start: 0 !important;
}

/*
 * Fix overflowing image with aspect ratio inside stack block.
 * https://github.com/WordPress/gutenberg/issues/67430
 */
.wp-block-post-featured-image[style*=aspect-ratio] {
	max-width:100%;
}

/* Remove unwanted space at the bottom. */
.wp-block-embed iframe {
	display: block;
}

/* Unset arbitrary minimum height. */
.wp-block-cover .wp-block-embed {
	min-height: unset;
}

/*
 * Opt the Jetpack Like widget iframe out of the page's `color-scheme: light dark`
 * declaration; a scheme mismatch makes the browser paint an opaque backdrop
 * behind the otherwise transparent iframe in dark mode. Lives here rather than
 * a per-block stylesheet because the Likes module injects the classic widget
 * into post content without the jetpack/like block being present.
 */
.jetpack-likes-widget {
	color-scheme: normal;
}

/*
 * Jetpack hardcodes `color: #999` on the "Loading…" placeholder shown before
 * the Like iframe loads, which fails 4.5:1 contrast on white. Inherit the
 * theme's text color so it adapts to whatever background it sits on.
 */
.likes-widget-placeholder .loading {
	color: currentColor;
}

/*
 * Theme the static #dcdcde divider above the sharing/like section titles.
 * The leading `body` outweighs Jetpack's rule, which loads after this file.
 */
body div.sharedaddy h3.sd-title::before {
	border-top-color: var(--wp--preset--color--theme-3);
}

/* Utility class for offsetting the sticky element */
.offset-sticky {
	top: calc(var(--wp--style--block-gap) + var(--wp-admin--admin-bar--position-offset, 0px)) !important;
}

/* Utility class for non wrapping text */
.nowrap * {
	white-space: nowrap;
}

/* Utility class for links without underline */
.no-underline a {
	text-decoration: none;
}

.no-underline a:hover {
	text-decoration: underline;
}

/* Utility classes for custom ordering. */
.order-0 {
	order: 0;
}

.order-1 {
	order: 1;
}

@media (min-width: 780px) {
	.md\:order-0 {
		order: 0;
	}

	.md\:order-1 {
		order: 1;
	}
}

/* Text meant only for screen readers. */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Jetpack form submission message (rendered next to the form, outside the block element) */
.jetpack-contact-form-container .contact-form-submission {
	margin: 0;
	max-width: none;
}
.jetpack-contact-form-container .contact-form-submission .jetpack_forms_contact-form-success-summary:first-of-type,
.jetpack-contact-form-container .contact-form-submission .jetpack_forms_contact-form-success-summary {
	border-width: 0;
}
.jetpack-contact-form-container .contact-form-submission .jetpack_forms_contact-form-success-summary {
	padding: 0;
}
.jetpack-contact-form-container .contact-form-submission .go-back-message .link,
.jetpack-contact-form-container .contact-form-submission .field-name {
	font-size: var(--wp--preset--font-size--custom-1);
}
.jetpack-contact-form-container .contact-form-submission .go-back-message,
.jetpack-contact-form-container .contact-form-submission .field-name {
	line-height: 20px;
}
.jetpack-contact-form-container .contact-form-submission h4 {
	font-size: var(--wp--preset--font-size--custom-3);
	font-weight: inherit;
	line-height: inherit;
	margin: 0 0 var(--wp--preset--spacing--20);
}
.jetpack-contact-form-container .contact-form-submission .field-type-icon,
.jetpack-contact-form-container .contact-form-submission .field-name {
	opacity: 1;
}
.jetpack-contact-form-container .contact-form-submission .field-name-wrapper,
.jetpack-contact-form-container .contact-form-submission .go-back-message {
	margin-bottom: 4px;
	gap: 4px
}
.jetpack-contact-form-container .contact-form-submission .jetpack_forms_contact-form-success-summary>.field-files,
.jetpack-contact-form-container .contact-form-submission .jetpack_forms_contact-form-success-summary>.field-images,
.jetpack-contact-form-container .contact-form-submission .jetpack_forms_contact-form-success-summary>.field-rating,
.jetpack-contact-form-container .contact-form-submission .jetpack_forms_contact-form-success-summary>.field-url,
.jetpack-contact-form-container .contact-form-submission .jetpack_forms_contact-form-success-summary>.field-value {
	margin-inline-start: 0;
}
.jetpack-contact-form-container .contact-form-submission .field-value {
	font-size: var(--wp--preset--font-size--custom-3);
	font-weight: inherit;
}
