/*
Theme Name: Federated Mind
Theme URI: https://blog.federatedmind.com
Author: Federated Mind
Author URI: https://federatedmind.com
Description: Editorial block theme for the Federated Mind technical blog. Cream, navy, burgundy — Poppins throughout. No gradients, square buttons, generous reading measure.
Version: 0.7.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: federated-mind
Tags: blog, one-column, block-styles, full-site-editing, editor-style, rtl-language-support
*/

/* ============================================================
   Federated Mind — front-end polish
   theme.json owns palette, type scale, fonts, blocks.
   This file owns everything WP renders as plain HTML5
   that theme.json can't reach: form controls, comments,
   pagination, inline <code>, tables, focus rings, etc.
   ============================================================ */

/* -- Selection ------------------------------------------------ */
::selection {
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--dark-navy);
}

/* -- Focus rings (accessibility, brand-aware) ----------------- */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--coral);
	outline-offset: 2px;
	border-radius: 2px;
}

/* -- Inline code (block <code> handled in theme.json) --------- */
:not(pre) > code,
:not(pre) > kbd,
:not(pre) > samp {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.9em;
	background: var(--wp--preset--color--cream-light);
	color: var(--wp--preset--color--dark-navy);
	padding: 0.1em 0.4em;
	border-radius: 2px;
}

/* -- Horizontal rule ------------------------------------------ */
hr,
hr.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--cream-light);
	margin-block: var(--wp--preset--spacing--60);
	max-width: 4rem;
	opacity: 1;
}

/* -- Tables --------------------------------------------------- */
table:not(.wp-block-table table) {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--wp--preset--font-size--sm);
}
table:not(.wp-block-table table) th,
table:not(.wp-block-table table) td {
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	border-bottom: 1px solid var(--wp--preset--color--cream-light);
	text-align: left;
}
table:not(.wp-block-table table) th {
	font-weight: 600;
	color: var(--wp--preset--color--navy);
}

/* -- figcaption ----------------------------------------------- */
figcaption {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
	margin-top: var(--wp--preset--spacing--20);
	font-style: italic;
}

/* -- Read-more / continue-reading ----------------------------- */
.wp-block-post-excerpt__more-link,
.more-link {
	display: inline-block;
	margin-top: var(--wp--preset--spacing--30);
	font-weight: 600;
	font-size: var(--wp--preset--font-size--sm);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wp--preset--color--burgundy);
	border-bottom: 1px solid var(--wp--preset--color--burgundy);
	padding-bottom: 2px;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.wp-block-post-excerpt__more-link:hover,
.more-link:hover {
	color: var(--wp--preset--color--coral);
	border-bottom-color: var(--wp--preset--color--coral);
	text-decoration: none;
}

/* -- Form controls (inputs, textareas, selects) --------------- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="password"],
textarea,
select {
	font-family: var(--wp--preset--font-family--poppins);
	font-size: var(--wp--preset--font-size--base);
	color: var(--wp--preset--color--dark-navy);
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--cream-light);
	border-radius: 0;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	width: 100%;
	max-width: 100%;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
	border-color: var(--wp--preset--color--navy);
	outline: none;
	box-shadow: 0 0 0 2px rgba(46, 50, 120, 0.12);
}
textarea {
	min-height: 8rem;
	line-height: 1.6;
	resize: vertical;
}

/* -- Search block: input + icon button ------------------------ */
.wp-block-search__input {
	border-radius: 0 !important;
}
.wp-block-search__button {
	background: var(--wp--preset--color--burgundy);
	color: var(--wp--preset--color--cream);
	border: 0;
	border-radius: 0;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	font-weight: 600;
	letter-spacing: 0.02em;
	transition: background-color 0.15s ease;
}
.wp-block-search__button:hover {
	background: var(--wp--preset--color--dark-navy);
}
.wp-block-search__button.has-icon svg {
	fill: var(--wp--preset--color--cream);
}

/* -- Comments ------------------------------------------------- */
.wp-block-comments-title,
.comments-title,
.comment-reply-title {
	font-size: var(--wp--preset--font-size--2xl);
	font-weight: 600;
	color: var(--wp--preset--color--navy);
	margin-block: var(--wp--preset--spacing--70) var(--wp--preset--spacing--50);
}
.comment-list,
.wp-block-comment-template {
	list-style: none;
	padding-left: 0;
}
.comment-body,
.wp-block-comment-template li {
	border-top: 1px solid var(--wp--preset--color--cream-light);
	padding-block: var(--wp--preset--spacing--50);
}
.comment-meta,
.wp-block-comment-author-name {
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
}
.comment-form-cookies-consent {
	display: flex;
	gap: var(--wp--preset--spacing--20);
	align-items: flex-start;
	font-size: var(--wp--preset--font-size--sm);
	color: var(--wp--preset--color--muted);
}
.comment-form label {
	display: block;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 600;
	letter-spacing: 0.02em;
	margin-bottom: var(--wp--preset--spacing--20);
	color: var(--wp--preset--color--navy);
}
.comment-form p {
	margin-block: var(--wp--preset--spacing--40);
}
.comment-form .form-submit input[type="submit"],
input[type="submit"],
button[type="submit"] {
	font-family: var(--wp--preset--font-family--poppins);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 600;
	letter-spacing: 0.02em;
	background: var(--wp--preset--color--burgundy);
	color: var(--wp--preset--color--cream);
	border: 0;
	border-radius: 0;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50);
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.comment-form .form-submit input[type="submit"]:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
	background: var(--wp--preset--color--dark-navy);
}

/* -- Pagination ----------------------------------------------- */
.wp-block-query-pagination,
.nav-links {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	align-items: center;
	margin-top: var(--wp--preset--spacing--60);
	font-size: var(--wp--preset--font-size--sm);
	letter-spacing: 0.02em;
}
.page-numbers,
.wp-block-query-pagination-numbers a,
.wp-block-query-pagination-numbers .page-numbers {
	color: var(--wp--preset--color--burgundy);
	padding: 0.25em 0.5em;
	border-bottom: 1px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.page-numbers:hover,
.wp-block-query-pagination-numbers a:hover {
	color: var(--wp--preset--color--coral);
	border-bottom-color: var(--wp--preset--color--coral);
}
.page-numbers.current,
.wp-block-query-pagination-numbers .current {
	color: var(--wp--preset--color--navy);
	font-weight: 600;
	border-bottom-color: var(--wp--preset--color--navy);
}

/* -- Site nav (header) ---------------------------------------- */
.wp-block-navigation .wp-block-navigation-item__content {
	transition: color 0.15s ease;
}
.wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--coral);
}

/* -- Buttons in dark sections (hero, footer) ------------------ */
.has-dark-navy-background-color .wp-block-button__link:hover,
.has-navy-background-color .wp-block-button__link:hover {
	background: var(--wp--preset--color--cream);
	color: var(--wp--preset--color--dark-navy);
}

/* -- Skip link ------------------------------------------------ */
.skip-link {
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--dark-navy);
	font-weight: 600;
}

/* -- Small screens: tighten reading measure ------------------- */
@media (max-width: 600px) {
	.wp-block-post-content {
		font-size: var(--wp--preset--font-size--base);
	}
}
