/*
Theme Name: Model2Part
Theme URI: https://model2part.pl
Description: Motyw potomny Twenty Twenty-Five dla Model2Part — druk 3D i obróbka CNC. Paleta i typografia zgodne z identyfikacją marki.
Author: Model2Part
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.1
Text Domain: model2part
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* ---------------------------------------------------------------
   Wszystko, co da się ustawić w theme.json, ustawiamy w theme.json.
   Tutaj lądują tylko rzeczy, których theme.json nie obsługuje.
   --------------------------------------------------------------- */

/* Cyfry o stałej szerokości — wymiary i tolerancje nie "skaczą" w tabelach */
.m2p-spec,
.wp-block-table td,
.wp-block-table th {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
}

/* Etykieta techniczna: "PARAMETR", "MATERIAŁ", "TOLERANCJA" */
.m2p-label,
p.is-style-m2p-label {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast-2);
}

/* Kreska wymiarowa — motyw przewodni marki, wprost z rysunku technicznego */
.m2p-rule,
.wp-block-separator.is-style-m2p-dimension {
	position: relative;
	display: block;
	width: 100%;
	height: 1px;
	border: 0;
	background: var(--wp--preset--color--line);
	margin-block: var(--wp--preset--spacing--30);
}
.m2p-rule::before,
.m2p-rule::after,
.wp-block-separator.is-style-m2p-dimension::before,
.wp-block-separator.is-style-m2p-dimension::after {
	content: "";
	position: absolute;
	top: -4px;
	width: 1px;
	height: 9px;
	background: var(--wp--preset--color--accent);
}
.m2p-rule::before,
.wp-block-separator.is-style-m2p-dimension::before { left: 0; }
.m2p-rule::after,
.wp-block-separator.is-style-m2p-dimension::after  { right: 0; }

/* Sekcje na ciemnym tle — niebieski marki dopiero tutaj osiąga pełny kontrast */
.has-ink-deep-background-color,
.has-contrast-background-color {
	--wp--preset--color--line: #26333F;
}
.has-ink-deep-background-color :is(h1, h2, h3, h4, h5),
.has-contrast-background-color :is(h1, h2, h3, h4, h5) {
	color: var(--wp--preset--color--base);
}
.has-ink-deep-background-color a:where(:not(.wp-element-button)),
.has-contrast-background-color a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--accent);
}

/* Widoczny focus — obowiązkowe dla dostępności, domyślny bywa niewidoczny */
:where(a, button, input, textarea, select, summary, .wp-block-button__link):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Szanujemy ustawienie systemowe "ogranicz animacje" */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Płynne przejścia na przyciskach i linkach */
.wp-element-button,
.wp-block-button__link,
a {
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

/* Logo w nagłówku nie może się rozjeżdżać na telefonie */
.wp-block-site-logo img {
	height: auto;
	max-width: 100%;
}
