/* The Pines Post: styles theme.json can't express. */

/* Skip link and focus */
:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* Sponsor slots (top banner and advertiser tiles) */
.pp-sponsor-slot {
	border: 1px dashed #9a9a94;
	min-height: 90px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}
.pp-sponsor-slot img {
	display: block;
	max-width: 100%;
	height: auto;
}
.pp-sponsor-slot:has(img) {
	border: 0;
	min-height: 0;
}
.pp-ad-tile {
	aspect-ratio: 4 / 3;
	min-height: 0;
}

/* Masthead */
.pp-masthead {
	border-bottom: 3px double var(--wp--preset--color--ink);
}

/* Category bar */
.pp-category-bar {
	border-bottom: 1px solid var(--wp--preset--color--rule);
}
.pp-category-bar .wp-block-navigation {
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.8125rem;
	font-weight: 700;
}

/* Top nav row */
.pp-top-nav {
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

/* Eyebrow labels (category above a headline) */
.pp-eyebrow,
.pp-eyebrow a {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}
.pp-eyebrow .wp-block-post-terms__separator {
	color: var(--wp--preset--color--muted);
}

/* Byline row */
.pp-byline {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.pp-byline .wp-block-post-author-name {
	color: var(--wp--preset--color--ink);
}

/* Section headers with a heavy rule on top */
.pp-section-rule {
	border-top: 3px solid var(--wp--preset--color--ink);
}
.pp-thin-rule {
	border-bottom: 1px solid var(--wp--preset--color--rule);
}

/* Lead story and grid */
.pp-lead .wp-block-post-featured-image img,
.pp-grid .wp-block-post-featured-image img {
	object-fit: cover;
	width: 100%;
	height: 100%;
}
.pp-grid .wp-block-post-template {
	row-gap: 2rem;
}

/* Story lists (sports section, related) */
.pp-story-list .wp-block-post-template > li + li {
	border-top: 1px solid var(--wp--preset--color--rule);
	padding-top: 1rem;
}

/* Section heading links read as headings, not links */
.pp-section-rule h2 a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.pp-section-rule h2 a:hover {
	color: var(--wp--preset--color--accent);
}
.pp-story-list .wp-block-post-featured-image {
	flex-shrink: 0;
}

/* Weekend picks rows */
.pp-pick-row {
	border-bottom: 1px solid var(--wp--preset--color--rule);
	padding-bottom: 0.75rem;
}
.pp-pick-day {
	min-width: 2.5rem;
	flex-shrink: 0;
}

/* Outline buttons used in the sports section */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 1px solid var(--wp--preset--color--ink);
	color: var(--wp--preset--color--ink);
	background: transparent;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
}

/* Footer links */
.pp-footer a {
	color: var(--wp--preset--color--paper);
}
.pp-footer a:hover {
	color: var(--wp--preset--color--mint-border);
}

/* Post navigation */
.wp-block-post-navigation-link a {
	color: var(--wp--preset--color--ink);
	font-weight: 600;
	text-decoration: none;
}
.wp-block-post-navigation-link a:hover {
	color: var(--wp--preset--color--accent);
	text-decoration: underline;
}

/* On phones, story-grid items become compact rows with a thumbnail */
@media (max-width: 600px) {
	.pp-grid .wp-block-post-template > li > .wp-block-group {
		display: grid;
		grid-template-columns: 112px 1fr;
		column-gap: 0.875rem;
		row-gap: 0.25rem;
		align-content: start;
	}
	.pp-grid .wp-block-post-template > li > .wp-block-group > * {
		margin-block-start: 0;
		grid-column: 2;
	}
	.pp-grid .wp-block-post-template > li > .wp-block-group > .wp-block-post-featured-image {
		grid-column: 1;
		grid-row: 1 / span 4;
		aspect-ratio: 1 / 1 !important;
	}
	.pp-grid .wp-block-post-template > li > .wp-block-group > .wp-block-post-featured-image img {
		aspect-ratio: 1 / 1 !important;
	}
	.pp-grid .wp-block-post-title {
		font-size: 1.125rem !important;
	}
	.pp-grid .wp-block-post-excerpt {
		display: none;
	}
}

/* Sidebar stacks under the stories on phones and tablets */
@media (max-width: 781px) {
	.pp-masthead .wp-block-site-title {
		font-size: clamp(2.5rem, 12vw, 3.5rem) !important;
	}
	.pp-top-nav .wp-block-buttons {
		width: 100%;
	}
}

/* Sidebar heading with a rule under it */
.pp-heading-rule {
	border-bottom: 2px solid var(--wp--preset--color--ink);
	padding-bottom: 0.5rem;
}

/* Footer navigation */
.pp-footer .wp-block-navigation a {
	color: var(--wp--preset--color--paper);
}

/* Article body niceties */
.wp-block-post-content a {
	text-underline-offset: 2px;
}
.wp-block-post-content img {
	height: auto;
}
