/*
Theme Name: Block Magazine
Author: Web Help Agency
Author URI: https://profiles.wordpress.org/webhelpagency/
Description: A fast, block-native magazine theme for news sites and blogs. Bold newspaper masthead, smart post grids, eight editorial styles — no page builder, no bloat.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: block-magazine
Tags: blog, news, entertainment, grid-layout, one-column, two-columns, right-sidebar, custom-colors, custom-logo, editor-style, full-site-editing, block-patterns, rtl-language-support, translation-ready
*/

/*
 * Only what theme.json cannot express lives here.
 * Everything uses logical properties — no rtl.css needed.
 */

/* ---------- Focus visibility (quality floor) ---------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* ---------- Signature: double hairline rule (2px / 3px gap / 1px) ---------- */

.wp-block-separator.is-style-block-magazine-double-rule {
	border: 0;
	border-block-start: 2px solid currentColor;
	padding-block-start: 3px;
	height: auto;
	overflow: visible;
	width: 100%;
	opacity: 1;
}

.wp-block-separator.is-style-block-magazine-double-rule::after {
	content: "";
	display: block;
	border-block-start: 1px solid currentColor;
}

/* ---------- Category badge (post-terms style) ---------- */

.wp-block-post-terms.is-style-block-magazine-badge {
	font-family: var(--wp--preset--font-family--utility);
	font-size: 0.625rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	line-height: 1;
	text-transform: uppercase;
}

.wp-block-post-terms.is-style-block-magazine-badge a {
	display: inline-block;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	padding: 7px 10px 6px;
	margin-inline-end: 4px;
	text-decoration: none;
}

.wp-block-post-terms.is-style-block-magazine-badge a:hover,
.wp-block-post-terms.is-style-block-magazine-badge a:focus {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.wp-block-post-terms.is-style-block-magazine-badge .wp-block-post-terms__separator {
	display: none;
}

/* Badge overlapping the bottom corner of a featured image */

.block-magazine-media-badge {
	position: relative;
}

.block-magazine-media-badge .wp-block-post-terms.is-style-block-magazine-badge {
	position: absolute;
	inset-inline-start: 0;
	inset-block-end: -11px;
	z-index: 2;
	margin: 0;
}

/* ---------- Trending ticker (pure CSS, no marquee) ---------- */

.block-magazine-ticker .wp-block-post-template {
	display: flex;
	flex-wrap: nowrap;
	overflow: hidden;
	margin: 0;
	padding: 0;
	list-style: none;
	gap: 0;
}

.block-magazine-ticker .wp-block-post-template > li {
	margin: 0;
	white-space: nowrap;
}

.block-magazine-ticker .wp-block-post-template > li + li::before {
	content: "/";
	margin-inline: 0.9em;
	opacity: 0.45;
}

.block-magazine-ticker .wp-block-post-title {
	display: inline;
	margin: 0;
}

@media (max-width: 599px) {
	.block-magazine-ticker .wp-block-post-template > li:nth-child(n+2) {
		display: none;
	}
}

/* ---------- Compact list rows ---------- */

.block-magazine-list-row .wp-block-post-featured-image {
	flex-shrink: 0;
}

/* ---------- Card hover lift (optional garnish, reduced-motion safe) ---------- */

@media (prefers-reduced-motion: no-preference) {
	.block-magazine-lift .wp-block-post {
		transition: transform 0.18s ease;
	}

	.block-magazine-lift .wp-block-post:hover {
		transform: translateY(-3px);
	}
}

/* ---------- Navigation: current item in accent ---------- */

.wp-block-navigation .current-menu-item > a,
.wp-block-navigation a[aria-current="page"] {
	color: var(--wp--preset--color--primary);
}

/* ---------- Search block ---------- */

.wp-block-search__input {
	border: 1px solid var(--wp--preset--color--border);
	background: transparent;
	padding: 12px 14px;
	font-family: var(--wp--preset--font-family--utility);
	font-size: var(--wp--preset--font-size--small);
	color: currentColor;
}

/* ---------- Query pagination: current page chip ---------- */

.wp-block-query-pagination-numbers .current {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	padding: 0.55em 0.8em;
}

.wp-block-query-pagination-numbers a {
	padding: 0.55em 0.8em;
	border: 1px solid var(--wp--preset--color--border);
	text-decoration: none;
}

/* ---------- Author card avatar placeholder ---------- */

.block-magazine-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--wp--preset--color--tertiary);
	border: 1px solid var(--wp--preset--color--border);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Post navigation: hide the bordered box when there is no adjacent post ---------- */

.block-magazine-post-nav:not(:has(a)) {
	display: none;
}
