/*
Theme Name: Toolpath
Theme URI: https://tenfoldthemes.example/toolpath
Author: Tenfold Themes
Author URI: https://tenfoldthemes.example
Description: A technical-drawing block theme for CNC machining shops, mold makers and precision manufacturers — 18 blueprint-styled patterns, four full-page layouts, an inverted Blueprint style, locally hosted IBM Plex fonts and original dimension-line artwork.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: toolpath
Tags: block-theme, full-site-editing, block-patterns, block-styles, custom-colors, editor-style, featured-images, threaded-comments, translation-ready, wide-blocks, one-column, portfolio, blog
*/

/* ---------------------------------------------------------------------------
 * Focus visibility & motion
 * ------------------------------------------------------------------------- */

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

::selection {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
}

a,
.wp-block-button__link,
.wp-element-button {
	transition: var(--wp--custom--transition);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* ---------------------------------------------------------------------------
 * Block styles: Group — Drawing card / Drawing card (hover)
 * Bordered cards with registration ticks in opposite corners.
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-drawing-card,
.wp-block-group.is-style-drawing-card-hover {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--m);
	padding: var(--wp--preset--spacing--40);
	position: relative;
}

.wp-block-group.is-style-drawing-card::before,
.wp-block-group.is-style-drawing-card-hover::before {
	content: "";
	position: absolute;
	top: 8px;
	left: 8px;
	width: 12px;
	height: 12px;
	border-top: 1.5px solid var(--wp--preset--color--border);
	border-left: 1.5px solid var(--wp--preset--color--border);
	pointer-events: none;
}

.wp-block-group.is-style-drawing-card::after,
.wp-block-group.is-style-drawing-card-hover::after {
	content: "";
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 12px;
	height: 12px;
	border-right: 1.5px solid var(--wp--preset--color--border);
	border-bottom: 1.5px solid var(--wp--preset--color--border);
	pointer-events: none;
}

.wp-block-group.is-style-drawing-card-hover {
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-group.is-style-drawing-card-hover:hover {
	border-color: var(--wp--preset--color--primary);
	box-shadow: var(--wp--preset--shadow--card);
}

.wp-block-group.is-style-drawing-card-hover:hover::before,
.wp-block-group.is-style-drawing-card-hover:hover::after {
	border-color: var(--wp--preset--color--accent);
}

/* ---------------------------------------------------------------------------
 * Block styles: Group — Sheet frame (double drafting border)
 * ------------------------------------------------------------------------- */

.wp-block-group.is-style-sheet-frame {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--m);
	outline: 1px solid var(--wp--preset--color--border);
	outline-offset: -7px;
}

/* ---------------------------------------------------------------------------
 * Block styles: List — Spec list (crosshair plus markers)
 * ------------------------------------------------------------------------- */

ul.is-style-spec-list {
	list-style: none;
	padding-left: 0;
}

ul.is-style-spec-list > li {
	padding-left: 1.75em;
	position: relative;
	margin-bottom: 0.5em;
}

ul.is-style-spec-list > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.28em;
	width: 1em;
	height: 1em;
	background-color: var(--wp--preset--color--primary);
	-webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" d="M12 3v18M3 12h18"/><circle cx="12" cy="12" r="6.5" fill="none" stroke="black" stroke-width="2.5"/></svg>') center / 100% no-repeat;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="black" stroke-width="2.5" stroke-linecap="round" d="M12 3v18M3 12h18"/><circle cx="12" cy="12" r="6.5" fill="none" stroke="black" stroke-width="2.5"/></svg>') center / 100% no-repeat;
}

/* ---------------------------------------------------------------------------
 * Block styles: Separator — Redline
 * ------------------------------------------------------------------------- */

hr.is-style-redline {
	border: none;
	height: 2px;
	width: 72px;
	background: var(--wp--preset--color--accent);
	border-radius: 0;
}

/* ---------------------------------------------------------------------------
 * Tables — drafting ruling
 * ------------------------------------------------------------------------- */

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--wp--preset--color--border);
	padding: 0.625rem 0.875rem;
	font-size: 0.9375rem;
	text-align: left;
	vertical-align: top;
}

.wp-block-table thead th {
	background: var(--wp--preset--color--tint);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ---------------------------------------------------------------------------
 * Details / FAQ affordance
 * ------------------------------------------------------------------------- */

.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	position: relative;
	padding-right: 2rem;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: 0.25rem;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.3em;
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--primary);
}

.wp-block-details[open] summary::after {
	content: "−";
	color: var(--wp--preset--color--accent);
}

.wp-block-details > :not(summary) {
	font-weight: 400;
	color: var(--wp--preset--color--contrast-2);
}

/* ---------------------------------------------------------------------------
 * Small refinements
 * ------------------------------------------------------------------------- */

.wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-width: 1.5px;
}

.wp-block-image img {
	height: auto;
	max-width: 100%;
}
/* ---------------------------------------------------------------------------
 * Palette-slug guard: the standard palette includes a slug named "border".
 * When used as a *text* color, WordPress emits `.has-border-color`, which core
 * pairs with `:where(.has-border-color){border-style:solid}`; with the default
 * medium width that paints a stray ~3px box around the text. Zero the width
 * here — genuine borders set an explicit width (inline or via block-style
 * classes) that overrides this 0-specificity rule.
 * ------------------------------------------------------------------------- */
:where(.has-border-color) {
	border-width: 0;
}
