/*
Theme Name: Soldera
Theme URI: https://tenfoldthemes.example/soldera
Author: Tenfold Themes
Author URI: https://tenfoldthemes.example
Description: A Swiss-grid engineering theme for electronics manufacturing services, PCBA plants and contract assemblers — 18 precision patterns, four full-page layouts, a Coppernight dark style, local Chakra Petch and Lexend fonts and original circuit-trace artwork, all editable in the Site Editor.
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: soldera
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--primary);
	outline-offset: 2px;
	border-radius: 2px;
}

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

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 — Card / Card (copper edge)
 * ------------------------------------------------------------------------- */

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

.wp-block-group.is-style-card-copper {
	border-top: 3px solid var(--wp--preset--color--accent);
	border-top-left-radius: var(--wp--custom--radius--s);
	border-top-right-radius: var(--wp--custom--radius--s);
}

/* ---------------------------------------------------------------------------
 * Block styles: List — Chip pins (IC-leg markers)
 * ------------------------------------------------------------------------- */

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

ul.is-style-chip-pins > li {
	padding-left: 1.9em;
	position: relative;
	margin-bottom: 0.6em;
}

ul.is-style-chip-pins > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.22em;
	width: 1.1em;
	height: 1.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"><rect x="2" y="3" width="20" height="8" rx="1.5"/><rect x="4" y="13" width="3.5" height="8" rx="1"/><rect x="10.25" y="13" width="3.5" height="8" rx="1"/><rect x="16.5" y="13" width="3.5" height="8" rx="1"/></svg>') center / contain no-repeat;
	mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="8" rx="1.5"/><rect x="4" y="13" width="3.5" height="8" rx="1"/><rect x="10.25" y="13" width="3.5" height="8" rx="1"/><rect x="16.5" y="13" width="3.5" height="8" rx="1"/></svg>') center / contain no-repeat;
}

/* ---------------------------------------------------------------------------
 * Block styles: Separator — Copper rule
 * ------------------------------------------------------------------------- */

hr.is-style-copper-rule {
	border: none;
	height: 2px;
	width: 72px;
	background: linear-gradient(90deg, var(--wp--preset--color--accent) 0%, var(--wp--preset--color--accent) 55%, transparent 100%);
	border-radius: 0;
}

hr.is-style-copper-rule.aligncenter {
	background: linear-gradient(90deg, transparent 0%, var(--wp--preset--color--accent) 25%, var(--wp--preset--color--accent) 75%, transparent 100%);
}

/* ---------------------------------------------------------------------------
 * Accent mark — copper hairline underline (hero key phrase)
 * ------------------------------------------------------------------------- */

mark.has-accent-color {
	background: transparent;
	color: var(--wp--preset--color--accent);
	border-bottom: 2px solid var(--wp--preset--color--accent);
	padding-bottom: 0.04em;
}

/* ---------------------------------------------------------------------------
 * Tables — spec-sheet styling
 * ------------------------------------------------------------------------- */

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

.wp-block-table th {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-align: left;
	color: var(--wp--preset--color--contrast);
	border-bottom: 2px solid var(--wp--preset--color--accent);
	padding: 0.75rem 1rem;
}

.wp-block-table td {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 0.75rem 1rem;
}

.wp-block-table tbody tr:nth-child(even) {
	background: var(--wp--preset--color--tint);
}

/* ---------------------------------------------------------------------------
 * 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.35em;
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--accent);
	transition: transform 0.2s ease;
}

.wp-block-details[open] summary::after {
	content: "−";
}

.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;
}
