/**
 * Theme Forge front-end styles.
 *
 * Accessibility-first defaults (WCAG 2.2 AA): visible focus rings,
 * sufficient color contrast, and no color-only affordances. Layout tokens
 * (--tf-container-width, --tf-primary-color) are printed inline by
 * ThemeForge\Modules\General\General_Module so they stay in sync with the
 * admin panel without a build step.
 */

:root {
	--tf-container-width: 1200px;
	--tf-primary-color: #2563eb;
	--tf-text-color: #1d2327;
	--tf-muted-color: #50575e;
	--tf-border-color: #dcdcde;
	--tf-focus-color: #2563eb;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	color: var( --tf-text-color );
	background: #ffffff;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	color: var( --tf-primary-color );
}

:focus-visible {
	outline: 3px solid var( --tf-focus-color );
	outline-offset: 2px;
}

.tf-container {
	max-width: var( --tf-container-width );
	margin-inline: auto;
	padding-inline: 20px;
}

/* Header */
.site-header {
	border-bottom: 1px solid var( --tf-border-color );
}

.tf-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	padding-block: 16px;
}

.site-title,
.site-title a {
	font-size: 1.5rem;
	font-weight: 700;
	text-decoration: none;
	color: var( --tf-text-color );
}

.site-description {
	margin: 0;
	color: var( --tf-muted-color );
	font-size: 0.9rem;
}

.main-navigation ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
}

.main-navigation a {
	display: inline-block;
	padding: 10px 12px;
	text-decoration: none;
	color: var( --tf-text-color );
}

.main-navigation a:hover,
.main-navigation a:focus {
	color: var( --tf-primary-color );
}

.menu-toggle {
	display: none;
	background: none;
	border: 1px solid var( --tf-border-color );
	border-radius: 4px;
	padding: 8px 12px;
	cursor: pointer;
}

@media ( max-width: 782px ) {
	.menu-toggle {
		display: inline-flex;
		align-items: center;
	}

	.main-navigation ul {
		display: none;
		flex-direction: column;
		width: 100%;
	}

	.main-navigation.is-open ul {
		display: flex;
	}
}

/* Layout */
.tf-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
	padding-block: 40px;
}

.tf-layout:has( .tf-sidebar ) {
	grid-template-columns: minmax( 0, 1fr ) 300px;
}

.tf-sidebar--left {
	order: -1;
}

.widget {
	margin-bottom: 32px;
}

.widget-title {
	font-size: 1.1rem;
	margin-block: 0 12px;
}

/* Entries */
.tf-entry {
	margin-bottom: 48px;
}

.entry-title,
.entry-title a {
	text-decoration: none;
	color: var( --tf-text-color );
}

.entry-meta {
	color: var( --tf-muted-color );
	font-size: 0.9rem;
	margin-bottom: 12px;
}

.entry-meta span:not( :last-child )::after {
	content: '\2022';
	margin-inline: 6px;
}

.entry-thumbnail img {
	border-radius: 6px;
	margin-bottom: 16px;
}

.tf-button {
	display: inline-block;
	padding: 10px 18px;
	background: var( --tf-primary-color );
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
}

.tf-button:hover,
.tf-button:focus {
	filter: brightness( 0.9 );
	color: #ffffff;
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid var( --tf-border-color );
	border-radius: 4px;
	font: inherit;
}

/* Back to top */
.tf-back-to-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: var( --tf-primary-color );
	color: #ffffff;
	font-size: 1.2rem;
	cursor: pointer;
	display: none;
}

.tf-back-to-top.is-visible {
	display: block;
}

/* Comments */
.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* Classic-editor conventions: [caption] shortcode, image alignment, sticky
   posts, and multi-author attribution. */
.wp-caption {
	max-width: 100%;
	margin-bottom: 24px;
}

.wp-caption img {
	display: block;
}

.wp-caption-text {
	color: var( --tf-muted-color );
	font-size: 0.85rem;
	margin-top: 8px;
}

.alignleft {
	float: left;
	margin: 0 24px 12px 0;
}

.alignright {
	float: right;
	margin: 0 0 12px 24px;
}

.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.gallery-caption {
	color: var( --tf-muted-color );
	font-size: 0.85rem;
}

.sticky {
	border-left: 3px solid var( --tf-primary-color );
	padding-left: 16px;
}

.bypostauthor {
	/* Intentionally no visual distinction beyond what post author byline already shows. */
}
