/*
Theme Name: Nickerpost Racing
Theme URI: https://nickerpost.com/
Author: Nicker Post
Author URI: https://nickerpost.com/
Description: A full-site-editing block theme for thoroughbred racing news, handicaps and race analysis. Every template, header, footer, color, font and layout can be edited from Appearance → Editor — no code required. Includes race-card, top-picks, track-conditions and race-analysis patterns.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nickerpost-racing
Tags: news, blog, full-site-editing, block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, style-variations, template-editing, threaded-comments, wide-blocks
*/

/*
 * Most styling lives in theme.json so it can be changed in
 * Appearance → Editor → Styles. Additional CSS can be added there too.
 * The rules below only cover details theme.json cannot express.
 */

/* Skip link / accessibility */
.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	z-index: 100000;
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--wp--preset--color--secondary);
	outline-offset: 2px;
}

/* Sticky site header */
.np-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .np-site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

/* Category "kicker" label above post titles */
.np-kicker a,
.np-kicker {
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
}

/* Post cards */
.np-card {
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	height: 100%;
}
.np-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--wp--preset--shadow--card);
}
.np-card .wp-block-post-featured-image img {
	aspect-ratio: 16 / 10;
	object-fit: cover;
}
.wp-block-post-template.is-layout-grid > li {
	display: flex;
	flex-direction: column;
}

/* Race card / picks table (block style "Race Card" on core/table) */
.wp-block-table.is-style-race-card table {
	border-collapse: collapse;
	width: 100%;
	font-variant-numeric: tabular-nums;
}
.wp-block-table.is-style-race-card thead {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--surface);
	border: 0;
}
.wp-block-table.is-style-race-card th,
.wp-block-table.is-style-race-card td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--muted);
	padding: 0.6em 0.75em;
	text-align: left;
}
.wp-block-table.is-style-race-card th {
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}
.wp-block-table.is-style-race-card tbody tr:nth-child(odd) {
	background: color-mix(in srgb, var(--wp--preset--color--muted) 45%, transparent);
}
.wp-block-table.is-style-race-card tbody tr:first-child td {
	font-weight: 700;
}
.wp-block-table.is-style-race-card td:first-child {
	width: 3.5em;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
}

/* Odds / badge paragraph style */
.is-style-badge {
	display: inline-block;
	padding: 0.15em 0.65em;
	border-radius: 999px;
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
	font-size: var(--wp--preset--font-size--x-small);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* Group style: "Best Bet" callout */
.is-style-best-bet {
	border-left: 6px solid var(--wp--preset--color--secondary);
	background: var(--wp--preset--color--surface);
	box-shadow: var(--wp--preset--shadow--card);
}

/* Group style: "Silks stripe" top border */
.is-style-silks-stripe {
	border-top: 6px solid transparent;
	border-image: linear-gradient(90deg,
		var(--wp--preset--color--primary) 0 33%,
		var(--wp--preset--color--secondary) 33% 66%,
		var(--wp--preset--color--accent) 66% 100%) 1;
}

/* Keep long horse names from overflowing on mobile */
.wp-block-table.is-style-race-card {
	overflow-x: auto;
}
@media (max-width: 600px) {
	.wp-block-table.is-style-race-card th,
	.wp-block-table.is-style-race-card td {
		padding: 0.5em;
		font-size: 0.9em;
	}
}
