/* Shared content styles. Design tokens and block defaults live in theme.json. */
.wp-site-blocks,
.editor-styles-wrapper {
	color-scheme: dark;
}

.wp-site-blocks {
	min-height: 100vh;
}

.wp-site-blocks > * {
	margin-block-start: 0;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 4px;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(p, li, h1, h2, h3, h4, h5, h6) {
	overflow-wrap: anywhere;
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), textarea, select) {
	background-color: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	border: 1px solid var(--line);
	border-radius: 0;
	padding: 0.65rem;
	font: inherit;
	max-width: 100%;
}

.ts-header {
	padding-block: var(--wp--preset--spacing--30);
	border-block-end: 1px solid var(--line);
}

.ts-header .wp-block-site-logo img {
	max-width: min(240px, 65vw);
	height: auto;
}

.ts-main {
	min-height: 50vh;
	padding-block: var(--wp--preset--spacing--50);
}

.ts-footer {
	padding-block: var(--wp--preset--spacing--50);
	border-block-start: 1px solid var(--line);
}

.ts-query-item {
	padding-block-end: var(--wp--preset--spacing--50);
	margin-block-end: var(--wp--preset--spacing--50);
	border-block-end: 1px solid var(--line);
}

:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-navigation .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	border-color: var(--line);
}

:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-navigation a:hover {
	text-decoration: underline;
}

:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-table {
	overflow-x: auto;
}

:where(.wp-site-blocks, .editor-styles-wrapper) .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: var(--wp--preset--color--surface);
}

:where(.wp-site-blocks, .editor-styles-wrapper) :where(pre, .wp-block-code) {
	overflow-x: auto;
}

.ts-content-section {
	padding: var(--wp--preset--spacing--40);
	border-radius: 0.25rem;
}

/* Existing classic HTML inside Post Content still uses WordPress alignment classes. */
.wp-block-post-content .alignleft {
	float: left;
	margin-inline-end: 1rem;
	margin-block-end: 1rem;
}

.wp-block-post-content .alignright {
	float: right;
	margin-inline-start: 1rem;
	margin-block-end: 1rem;
}

.wp-block-post-content .aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-block-post-content::after {
	content: "";
	display: block;
	clear: both;
}

/* Keep the button supplied by the existing Code Snippets integration usable. */
.ts-back-to-top {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	z-index: 100;
	width: 44px;
	height: 44px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	font-size: 1.25rem;
	visibility: hidden;
}

.ts-back-to-top.is-visible {
	visibility: visible;
}
