/*
Theme Name: Tromar Polska
Theme URI: https://tromarpolska.pl
Author: Tromar Polska
Description: Motyw blokowy (Full Site Editing) dla Tromar Polska — producenta okien i drzwi. Wszystkie strony, nagłówek i stopka są zbudowane z bloków i w pełni edytowalne w Gutenbergu.
Version: 1.4.2
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tromar-polska
*/

:root {
	--tp-navy: #182B3C;
	--tp-ink: #0F1D2B;
	--tp-red: #B2302A;
	--tp-red-light: #F0776C;
	--tp-tint: #FAE9E7;
	--tp-soft: #F4F5F7;
	--tp-line: #E2E5EA;
	--tp-steel: #5B6673;
	--tp-radius: 10px;
	--tp-gutter: clamp(20px, 4vw, 40px);
}

/* ---------- podstawa ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks > * { margin-block-start: 0; }
.tp-main > *, .tp-main .wp-block-post-content > * { margin-block-start: 0; margin-block-end: 0; }
a { text-underline-offset: 3px; }
:where(.tp-section, .tp-footer, .tp-header, .tp-topbar) a { text-decoration: none; }
:where(.tp-section) p a:hover { text-decoration: underline; }
[id] { scroll-margin-top: 120px; }

/* ---------- sekcje ---------- */
.tp-section { padding: clamp(56px, 8vw, 96px) var(--tp-gutter); }
.tp-section--tight { padding-top: clamp(24px, 4vw, 40px); padding-bottom: clamp(24px, 4vw, 40px); }
.tp-page-hero, .tp-home-hero { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(48px, 7vw, 80px); }
.is-style-tp-soft { background: var(--tp-soft); }
.is-style-tp-navy { background: var(--tp-navy); color: #fff; }
.is-style-tp-ink { background: var(--tp-ink); color: #fff; }
.is-style-tp-line { border-bottom: 1px solid var(--tp-line); }
.is-style-tp-navy p, .is-style-tp-ink p { color: rgba(255, 255, 255, .78); }
.is-style-tp-navy :is(h1, h2, h3), .is-style-tp-ink :is(h1, h2, h3) { color: #fff; }

/* ---------- typografia pomocnicza ---------- */
.tp-eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tp-red); }
.tp-eyebrow::before { content: ""; width: 24px; height: 3px; border-radius: 2px; background: var(--tp-red); flex: none; }
.is-style-tp-navy .tp-eyebrow, .is-style-tp-ink .tp-eyebrow { color: var(--tp-red-light); }
.tp-lead { font-size: 1.125rem; line-height: 1.65; color: var(--tp-steel); max-width: 40em; }
.tp-lead-small, .tp-section p { color: var(--tp-steel); }
.is-style-tp-navy .tp-lead-small, .is-style-tp-navy.tp-section p { color: rgba(255, 255, 255, .78); }
.tp-crumbs { font-size: .8125rem; color: var(--tp-steel); margin-bottom: 18px; }
.tp-crumbs a { color: var(--tp-steel); }
.tp-label { margin: 0; font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--tp-steel) !important; }
.tp-tag { display: inline-block; margin: 0 0 4px; padding: 5px 10px; border-radius: 6px; background: var(--tp-tint); color: var(--tp-red) !important; font-size: .75rem; font-weight: 600; }
.tp-more { margin-top: 6px; font-weight: 600; }
.tp-more a, .tp-section .tp-more a { color: var(--tp-ink); }
.tp-more a:hover { color: var(--tp-red); text-decoration: none; }
.tp-note { padding: 14px 16px; border: 1px dashed #B9C0C9; border-radius: 8px; font-size: .875rem; }
.has-red-color { color: var(--tp-red); }
.tp-center { justify-content: center; margin-top: 32px; }

.tp-head { margin-bottom: clamp(28px, 4vw, 48px); }
.tp-head h2 { margin: 0; }
.tp-head .wp-block-column p { margin: 0; }

/* ---------- przyciski ---------- */
.wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; box-sizing: border-box; transition: background .15s, color .15s, border-color .15s; }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--tp-ink); border: 1px solid rgba(15, 29, 43, .3); padding: 1rem 1.75rem; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: var(--tp-ink); background: transparent; color: var(--tp-ink); }
:is(.is-style-tp-navy, .is-style-tp-ink, .is-style-tp-banner, .tp-footer) .wp-block-button.is-style-outline .wp-block-button__link { color: #fff; border-color: rgba(255, 255, 255, .4); }
:is(.is-style-tp-navy, .is-style-tp-ink, .is-style-tp-banner, .tp-footer) .wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: #fff; color: #fff; }

/* ---------- listy ---------- */
ul.is-style-tp-check, ul.is-style-tp-spec { list-style: none; padding: 0; margin-block: 16px; }
ul.is-style-tp-check li { position: relative; padding-left: 28px; margin: 0 0 10px; font-size: .9375rem; }
ul.is-style-tp-check li::before { content: ""; position: absolute; left: 0; top: .3em; width: 16px; height: 16px; background: var(--tp-red); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / contain no-repeat; }
.is-style-tp-navy ul.is-style-tp-check li { color: #fff; }
.is-style-tp-navy ul.is-style-tp-check li::before { background: var(--tp-red-light); }
ul.tp-inline { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; padding-top: 24px; border-top: 1px solid #D5D9DF; }
ul.tp-inline li { margin: 0; font-weight: 500; font-size: .875rem; }
ul.is-style-tp-spec li { display: flex; gap: 16px; padding: 13px 0; border-top: 1px solid var(--tp-line); font-size: .9375rem; }
ul.is-style-tp-spec li:last-child { border-bottom: 1px solid var(--tp-line); }
ul.is-style-tp-spec strong { flex: 0 0 7.5rem; font-weight: 400; color: var(--tp-steel); }

/* ---------- zdjęcia ---------- */
.tp-photo { margin: 0; }
.tp-photo img { display: block; width: 100%; height: auto; object-fit: cover; border-radius: 12px; }
.tp-photo a { display: block; }
.tp-photo--hero img { aspect-ratio: 5 / 4; }
.tp-photo--row img { aspect-ratio: 4 / 3; }
.tp-photo--tall img { aspect-ratio: 1 / 1; }
.tp-photo--tile { margin: -28px -28px 20px; }
.tp-photo--tile img { aspect-ratio: 16 / 10; border-radius: var(--tp-radius) var(--tp-radius) 0 0; }
.tp-photo--shot { margin-bottom: 14px; }
.tp-photo--shot img { aspect-ratio: 1 / 1; }
.tp-photo--contain img { object-fit: contain; box-sizing: border-box; padding: 4%; background: #fff; }
.tp-photo--thumb img { aspect-ratio: 16 / 10; }
.tp-photo--empty { aspect-ratio: 4 / 3; background: #E2E5EA url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%235B6673' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18v14H3zM3 16l5-5 4 4 3-3 6 6'/%3E%3C/svg%3E") center no-repeat; border-radius: 12px; }
.tp-photo--tile.tp-photo--empty { aspect-ratio: 16 / 10; border-radius: var(--tp-radius) var(--tp-radius) 0 0; }
.tp-photo--shot.tp-photo--empty { aspect-ratio: 1 / 1; }
.tp-photo--empty img { display: none; }
.tp-thumbs { margin-top: 16px; gap: 16px; }
.tp-logo { margin: 0; flex: none; }
.tp-logo img { width: 150px; height: auto; display: block; }

/* ---------- siatki i karty ---------- */
.tp-grid { gap: 24px; }
.tp-grid > * { margin: 0; }
.is-style-tp-card { background: #fff; border: 1px solid var(--tp-line); border-radius: var(--tp-radius); padding: 28px; }
.is-style-tp-card > :first-child { margin-top: 0; }
.is-style-tp-card > :last-child { margin-bottom: 0; }
.is-style-tp-card h3 { margin: 0 0 8px; }
.is-style-tp-card p { margin: 0 0 10px; font-size: .9375rem; }
.tp-tile { display: flex; flex-direction: column; overflow: hidden; }
.tp-tile .tp-more { margin-top: auto; padding-top: 8px; }
.tp-tile--navy { background: var(--tp-navy); border-color: var(--tp-navy); justify-content: space-between; }
.tp-tile--navy h3 { color: #fff; font-size: 1.75rem; }
.tp-tile--navy p { color: rgba(255, 255, 255, .78) !important; }
.tp-shot h3 { margin: 0 0 4px; font-size: 1.125rem; }
.tp-shot p { margin: 0; font-size: .8125rem; }
.is-style-tp-navy .tp-shot p { color: rgba(255, 255, 255, .6); }

/* ---------- produkt / wiersze ---------- */
.tp-product-wrap + .tp-product-wrap, .tp-product + .tp-product { margin-top: clamp(40px, 6vw, 72px); }
.tp-product, .tp-hero, .tp-split { gap: clamp(32px, 5vw, 72px); }
.tp-product h3 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); font-weight: 800; margin: 0 0 12px; }
.tp-hero h1, .tp-page-hero h1 { margin: 0 0 20px; }
.tp-hero .wp-block-buttons, .tp-page-hero .wp-block-buttons { margin-top: 28px; }

/* ---------- liczby / parametry ---------- */
.tp-facts { gap: 0; }
.tp-fact { padding: 20px 28px 20px 0; }
.tp-fact__value { margin: 0 0 6px; font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2.125rem); line-height: 1.15; letter-spacing: -.02em; color: var(--tp-navy) !important; }
.is-style-tp-navy .tp-fact__value { color: #fff !important; }
.tp-fact__label { margin: 0; font-size: .875rem; }
.tp-brands { margin-top: 40px; padding-top: 24px; border-top: 1px solid #D5D9DF; }
.tp-brands p { margin: 0; }
.tp-brand { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.0625rem; color: var(--tp-ink) !important; margin-top: 4px !important; }

/* ---------- proces ---------- */
.tp-step__no { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin: 0 0 16px; border-radius: 50%; background: var(--tp-soft); font-family: var(--wp--preset--font-family--heading); font-weight: 800; color: var(--tp-ink) !important; }
.tp-step:first-child .tp-step__no { background: var(--tp-red); color: #fff !important; }
.tp-step h3 { margin: 0 0 8px; }
.tp-step p { margin: 0; font-size: .9375rem; }

/* ---------- oś czasu, cytat, wyróżnienie ---------- */
.tp-timeline { gap: 24px; padding: 18px 0; margin: 0; border-top: 1px solid var(--tp-line); }
.tp-timeline:first-of-type { border-top: 0; }
.tp-timeline p, .tp-timeline h3 { margin: 0; }
.tp-timeline__title { font-size: 1.125rem; margin-bottom: 4px !important; }
.tp-year { font-family: var(--wp--preset--font-family--heading); font-weight: 800; font-size: 1.125rem; color: var(--tp-red) !important; }
.wp-block-quote { margin: 24px 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--tp-red); }
.wp-block-quote p { font-size: 1.125rem; line-height: 1.65; color: var(--tp-ink) !important; }
.wp-block-quote cite { font-style: normal; font-weight: 600; font-size: .875rem; color: var(--tp-steel); }
.tp-award { position: relative; z-index: 1; max-width: 300px; margin: -76px 0 0 16px; padding: 18px 22px; border-radius: var(--tp-radius); background: var(--tp-navy); box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.tp-award .tp-label { color: var(--tp-red-light) !important; }
.tp-award__text { margin: 4px 0 0; font-family: var(--wp--preset--font-family--heading); font-weight: 700; line-height: 1.35; color: #fff !important; }

/* ---------- baner ---------- */
.is-style-tp-banner { padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 64px); border-radius: 16px; background: var(--tp-red); color: #fff; }
.is-style-tp-banner h2 { margin: 0 0 10px; font-size: clamp(1.625rem, 3vw, 2.25rem); color: #fff; }
.is-style-tp-banner p { margin: 0; font-size: 1.0625rem; color: rgba(255, 255, 255, .9) !important; }
.is-style-tp-banner .wp-block-button:not(.is-style-outline) .wp-block-button__link { background: #fff; color: var(--tp-ink); }
.tp-banner__buttons { justify-content: flex-end; }

/* ---------- kontakt ---------- */
.tp-contact { margin-bottom: 16px; }
.tp-contact p { margin: 0; }
.tp-contact__value { margin: 4px 0 2px !important; font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.1875rem !important; color: var(--tp-ink) !important; }
.tp-contact__value a { color: var(--tp-ink); }
.tp-contact__note { font-size: .875rem !important; }
.tp-form { background: var(--tp-soft); border-color: var(--tp-soft); padding: clamp(24px, 4vw, 40px); }
.is-style-tp-soft .tp-form { background: #fff; border-color: var(--tp-line); }
.tp-map { display: block; border-radius: 12px; }

/* ---------- formularz (Contact Form 7) — wg projektu Figma „Formularz” ---------- */
.tp-form.tp-form { border-radius: 12px; }
.tp-form > h3 { margin: 0 0 20px; font-size: 1.625rem; line-height: 32px; letter-spacing: -.01em; }
.tp-form .wpcf7 { margin: 0; }
.tp-form .wpcf7 form { display: flex; flex-direction: column; gap: 20px; }
.tp-form .wpcf7 form > * { margin: 0; }
.tp-form .wpcf7 form > .hidden-fields-container, .tp-form .wpcf7 form > fieldset.hidden-fields-container { display: none; }
.tp-form .tp-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tp-form .tp-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.tp-form .tp-field p { margin: 0; }
.tp-form .tp-field label, .tp-form .tp-field > legend { display: block; padding: 0; font-size: .8125rem; font-weight: 500; line-height: 16px; color: var(--tp-ink); }
.tp-form .tp-field label > .wpcf7-form-control-wrap { display: block; margin-top: 8px; }
.tp-form :is(input[type="text"], input[type="tel"], input[type="email"], textarea) { display: block; width: 100%; height: 48px; box-sizing: border-box; padding: 14px 16px; border: 1px solid #CBD0D7; border-radius: 8px; background: #fff; font: inherit; font-size: .9375rem; font-weight: 400; line-height: 18px; color: var(--tp-ink); }
.tp-form textarea { height: 110px; min-height: 110px; resize: vertical; }
.tp-form :is(input, textarea)::placeholder { color: rgba(91, 102, 115, .7); opacity: 1; }
.tp-form :is(input[type="text"], input[type="tel"], input[type="email"], textarea):focus { outline: 2px solid var(--tp-navy); outline-offset: 1px; border-color: var(--tp-navy); }

/* opcje „Co Cię interesuje?” jako pigułki */
.tp-form .tp-field--chips > legend { margin-bottom: 10px; }
.tp-form .tp-field--chips .wpcf7-form-control-wrap { display: block; }
.tp-form .tp-field--chips .wpcf7-checkbox { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-form .tp-field--chips .wpcf7-list-item { margin: 0; }
.tp-form .tp-field--chips .wpcf7-list-item label { position: relative; display: block; cursor: pointer; }
.tp-form .tp-field--chips input[type="checkbox"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tp-form .tp-field--chips .wpcf7-list-item-label { display: inline-flex; align-items: center; gap: 6px; height: 36px; box-sizing: border-box; padding: 0 14px; border: 1px solid #CBD0D7; border-radius: 100px; background: #fff; font-size: .875rem; font-weight: 500; color: var(--tp-ink); white-space: nowrap; transition: background .15s, border-color .15s; }
.tp-form .tp-field--chips .wpcf7-list-item-label::before, .tp-form .tp-field--chips .wpcf7-list-item-label::after { content: none; }
.tp-form .tp-field--chips input:hover + .wpcf7-list-item-label { border-color: var(--tp-steel); }
.tp-form .tp-field--chips input:checked + .wpcf7-list-item-label { padding-left: 10px; border-color: var(--tp-red); background: var(--tp-tint); }
.tp-form .tp-field--chips input:checked + .wpcf7-list-item-label::before { content: ""; flex: none; width: 14px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23B2302A' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.9 7.3l2.9 2.6 5.3-5.8'/%3E%3C/svg%3E") center / 14px no-repeat; }
.tp-form .tp-field--chips input:focus-visible + .wpcf7-list-item-label { outline: 2px solid var(--tp-navy); outline-offset: 2px; }

/* zgoda */
.tp-form .tp-field--consent .wpcf7-list-item { margin: 0; }
.tp-form .tp-field--consent label { display: flex; gap: 12px; align-items: flex-start; font-size: .75rem; font-weight: 400; line-height: 18px; color: var(--tp-steel); cursor: pointer; }
.tp-form .tp-field--consent input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border: 1px solid #AEB4BB; border-radius: 4px; background: #fff center / 12px no-repeat; cursor: pointer; }
.tp-form .tp-field--consent input[type="checkbox"]:checked { border-color: var(--tp-red); background-color: var(--tp-red); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.9 7.3l2.9 2.6 5.3-5.8'/%3E%3C/svg%3E"); }
.tp-form .tp-field--consent input[type="checkbox"]:focus-visible { outline: 2px solid var(--tp-navy); outline-offset: 2px; }
.tp-form .tp-field--consent a { color: inherit; text-decoration: underline; }

/* przycisk */
.tp-form .tp-field--submit { position: relative; }
.tp-form .wpcf7-submit { display: block; width: 100%; height: 56px; padding: 0 28px; border: 0; border-radius: 8px; background: var(--tp-red); color: #fff; font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.tp-form .wpcf7-submit:hover { background: #8F251F; }
.tp-form .wpcf7-submit:disabled { cursor: not-allowed; }
.tp-form .wpcf7-spinner { position: absolute; right: 12px; top: 16px; margin: 0; }

/* komunikaty */
.tp-form .wpcf7-not-valid-tip { margin-top: 6px; font-size: .75rem; font-weight: 400; color: var(--tp-red); }
.tp-form .wpcf7 form .wpcf7-response-output { margin: 0; padding: 12px 16px; border-width: 1px; border-radius: 8px; font-size: .875rem; }
.tp-form .wpcf7 form .wpcf7-response-output:empty { display: none; }
@media (max-width: 600px) { .tp-form .tp-field-row { grid-template-columns: 1fr; gap: 20px; } }

.tp-form .tp-field label br, .tp-form .tp-field--chips br { display: none; }

/* ---------- mapa „Gdzie działamy” ---------- */
.tp-mapa { margin: 0; }
.tp-mapa__svg { display: block; width: 100%; height: auto; max-width: 640px; margin-inline: auto; overflow: visible; }
.tp-mapa__woj { fill: #fff; stroke: #C3C9D1; stroke-width: 1; stroke-linejoin: round; cursor: pointer; outline: none; transition: fill .15s, stroke .15s; }
.tp-mapa__woj.is-home { fill: var(--tp-tint); }
.tp-mapa__woj:hover, .tp-mapa__woj:focus-visible, .tp-mapa__woj.is-active { fill: #F3C9C4; stroke: var(--tp-red); stroke-width: 1.5; }
.tp-mapa__rings { pointer-events: none; }
.tp-mapa__ring { fill: none; stroke: var(--tp-steel); stroke-width: 1; stroke-dasharray: 3 5; opacity: .5; }
.tp-mapa__ringlabel { font-family: var(--wp--preset--font-family--body, inherit); font-size: 10px; font-weight: 600; fill: var(--tp-steel); paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; }
.tp-mapa__pin { pointer-events: none; }
.tp-mapa__dot { fill: var(--tp-red); stroke: #fff; stroke-width: 2.5; }
.tp-mapa__pulse { fill: var(--tp-red); opacity: .25; transform-origin: center; transform-box: fill-box; animation: tp-mapa-pulse 2.4s ease-out infinite; }
.tp-mapa__pinlabel { font-family: var(--wp--preset--font-family--heading, inherit); font-size: 15px; font-weight: 800; fill: var(--tp-ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.tp-mapa__readout { min-height: 3em; margin: 16px auto 0; max-width: 640px; font-size: .9375rem; color: var(--tp-steel); text-align: center; }
.tp-mapa__readout strong { color: var(--tp-ink); }
@keyframes tp-mapa-pulse { from { transform: scale(.5); opacity: .45; } to { transform: scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tp-mapa__pulse { animation: none; } }

/* ---------- okienko doradztwa ---------- */
.tp-czat { position: fixed; right: 24px; bottom: 24px; z-index: 9990; width: 340px; max-width: calc(100vw - 32px); opacity: 0; transform: translateY(16px); transition: opacity .25s ease, transform .25s ease; pointer-events: none; }
.tp-czat.is-open { opacity: 1; transform: none; pointer-events: auto; }
.tp-czat.is-expanded { width: 380px; }
.tp-czat[hidden], .tp-czat [hidden] { display: none !important; }
.tp-czat__bubble, .tp-czat__panel { position: relative; padding: 20px 20px 18px; border: 1px solid var(--tp-line); border-radius: 14px 14px 4px 14px; background: #fff; box-shadow: 0 18px 40px rgba(15, 29, 43, .18), 0 2px 6px rgba(15, 29, 43, .08); color: var(--tp-ink); }
.tp-czat__bubble { cursor: pointer; }
.tp-czat__panel { max-height: calc(100vh - 48px); overflow-y: auto; }
.tp-czat__close { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tp-steel); cursor: pointer; }
.tp-czat__close:hover { background: var(--tp-soft); color: var(--tp-ink); }
.tp-czat :is(.tp-czat__close, .tp-czat__cta, .tp-czat__call-btn, input, .wpcf7-submit):focus-visible { outline: 2px solid var(--tp-navy); outline-offset: 2px; }
.tp-czat__head { display: flex; align-items: center; gap: 12px; margin: 0 32px 12px 0; }
.tp-czat__avatar { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tp-red); color: #fff; }
.tp-czat__avatar::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #2DA44E; }
.tp-czat__who { display: flex; flex-direction: column; line-height: 1.25; }
.tp-czat__who strong { font-family: var(--wp--preset--font-family--heading, inherit); font-size: .9375rem; }
.tp-czat__who span { font-size: .75rem; color: var(--tp-steel); }
.tp-czat__text { margin: 0 0 14px; font-size: .9375rem; line-height: 1.5; }
.tp-czat__cta, .tp-czat .wpcf7-submit { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--tp-red); color: #fff; font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; transition: background .15s; }
.tp-czat__cta:hover, .tp-czat .wpcf7-submit:hover { background: #8F251F; }
/* zwinięte okienko: okrągła ikonka */
.tp-czat.is-mini, .tp-czat.is-mini.is-expanded { left: auto; width: auto; }
.tp-czat__launcher { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-left: auto; padding: 0; border: 0; border-radius: 50%; background: var(--tp-red); color: #fff; box-shadow: 0 10px 24px rgba(178, 48, 42, .35), 0 2px 6px rgba(15, 29, 43, .15); cursor: pointer; transition: background .15s, transform .15s; }
.tp-czat__launcher:hover { background: #8F251F; transform: scale(1.05); }
.tp-czat__launcher:focus-visible { outline: 2px solid var(--tp-navy); outline-offset: 3px; }
.tp-czat__launcher::after { content: ""; position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: #2DA44E; }
@media (max-width: 600px) { .tp-czat.is-mini { left: auto; } }
/* formularz w panelu */
.tp-czat .wpcf7 { margin: 0; }
.tp-czat .wpcf7 form { display: flex; flex-direction: column; gap: 12px; }
.tp-czat .wpcf7 form > *, .tp-czat .wpcf7 p { margin: 0; }
.tp-czat .wpcf7 br { display: none; }
.tp-czat .wpcf7 .hidden-fields-container { display: none; }
.tp-czat-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tp-czat-form__row > p { display: contents; }
.tp-czat-form__field > span:first-child { display: block; margin-bottom: 6px; font-size: .75rem; font-weight: 500; color: var(--tp-ink); }
.tp-czat-form__field .wpcf7-form-control-wrap { display: block; }
.tp-czat :is(input[type="text"], input[type="tel"]) { display: block; width: 100%; height: 44px; box-sizing: border-box; padding: 10px 12px; border: 1px solid #CBD0D7; border-radius: 8px; background: #fff; font: inherit; font-size: .9375rem; color: var(--tp-ink); }
.tp-czat input::placeholder { color: rgba(91, 102, 115, .7); opacity: 1; }
.tp-czat-form__consent label { display: flex; gap: 10px; align-items: flex-start; font-size: .6875rem; line-height: 1.45; color: var(--tp-steel); cursor: pointer; }
.tp-czat-form__consent .wpcf7-list-item { margin: 0; }
.tp-czat-form__consent input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 16px; height: 16px; margin: 1px 0 0; border: 1px solid #AEB4BB; border-radius: 4px; background: #fff center / 11px no-repeat; cursor: pointer; }
.tp-czat-form__consent input[type="checkbox"]:checked { border-color: var(--tp-red); background-color: var(--tp-red); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.9 7.3l2.9 2.6 5.3-5.8'/%3E%3C/svg%3E"); }
.tp-czat-form__consent a { color: inherit; text-decoration: underline; }
.tp-czat-form__submit { position: relative; }
.tp-czat .wpcf7-submit:disabled { cursor: not-allowed; opacity: .55; }
.tp-czat .wpcf7-spinner { position: absolute; right: 10px; top: 11px; margin: 0; }
.tp-czat .wpcf7-not-valid-tip { margin-top: 4px; font-size: .6875rem; color: var(--tp-red); }
.tp-czat .wpcf7 form .wpcf7-response-output { margin: 0; padding: 10px 12px; border-width: 1px; border-radius: 8px; font-size: .8125rem; }
.tp-czat .wpcf7 form .wpcf7-response-output:empty { display: none; }
.tp-czat .wpcf7 form.sent .tp-czat-form__row, .tp-czat .wpcf7 form.sent .tp-czat-form__consent, .tp-czat .wpcf7 form.sent .tp-czat-form__submit { display: none; }
/* telefon: przycisk na urządzeniach dotykowych, sam numer na komputerach */
.tp-czat__call { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--tp-line); }
.tp-czat__call-label { margin: 0 0 8px; font-size: .8125rem; font-weight: 600; color: var(--tp-steel); }
.tp-czat__call-btn { display: none; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid var(--tp-ink); border-radius: 8px; color: var(--tp-ink) !important; font-size: .9375rem; font-weight: 600; text-decoration: none !important; }
.tp-czat__call-number { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .9375rem; color: var(--tp-ink); }
.tp-czat__call-number strong { font-family: var(--wp--preset--font-family--heading, inherit); font-size: 1.125rem; letter-spacing: .01em; }
.tp-czat__call-number a { color: inherit !important; text-decoration: none !important; }
.tp-czat__call svg { flex: none; color: var(--tp-red); }
/* telefon: przycisk „Kliknij i zadzwoń" tylko na wąskich ekranach (telefony), na szerszych sam numer */
@media (max-width: 767px) { .tp-czat__call-btn { display: flex; } .tp-czat__call-number { display: none; } }
@media (max-width: 600px) { .tp-czat, .tp-czat.is-expanded { right: 16px; bottom: 16px; left: 16px; width: auto; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .tp-czat { transition: none; transform: none; } }

/* ---------- baner plików cookies ---------- */
.tp-cookies { position: fixed; left: 24px; bottom: 24px; z-index: 9995; width: 440px; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 22px 22px 18px; border: 1px solid var(--tp-line); border-radius: 12px; background: #fff; box-shadow: 0 18px 40px rgba(15, 29, 43, .18), 0 2px 6px rgba(15, 29, 43, .08); color: var(--tp-ink); opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease; }
.tp-cookies.is-open { opacity: 1; transform: none; }
.tp-cookies[hidden], .tp-cookies-modal[hidden] { display: none; }
.tp-cookies__title { margin: 0 0 8px; font-family: var(--wp--preset--font-family--heading, inherit); font-size: 1.0625rem; font-weight: 700; }
.tp-cookies__text { margin: 0 0 16px; font-size: .875rem; line-height: 1.55; color: var(--tp-steel); }
.tp-cookies__text a, .tp-cookies-modal a { color: var(--tp-ink); text-decoration: underline; }
.tp-cookies__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tp-cookies__btn { flex: 1 1 auto; min-height: 44px; padding: 0 16px; border: 1px solid var(--tp-red); border-radius: 8px; background: var(--tp-red); color: #fff; font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.tp-cookies__btn:hover { border-color: #8F251F; background: #8F251F; }
.tp-cookies__btn--ghost { border-color: rgba(15, 29, 43, .3); background: #fff; color: var(--tp-ink); }
.tp-cookies__btn--ghost:hover { border-color: var(--tp-ink); background: #fff; color: var(--tp-ink); }
.tp-cookies__link { margin-right: auto; padding: 8px 4px; border: 0; background: none; color: var(--tp-ink); font: inherit; font-size: .875rem; font-weight: 600; text-decoration: underline; cursor: pointer; }
.tp-cookies :focus-visible, .tp-cookies-modal :focus-visible, .tp-embed :focus-visible { outline: 2px solid var(--tp-navy); outline-offset: 2px; }
/* ikonka ustawień cookies (po podjęciu decyzji) */
.tp-cookies-fab { position: fixed; left: 20px; bottom: 20px; z-index: 9980; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--tp-line); border-radius: 50%; background: #fff; color: var(--tp-ink); box-shadow: 0 6px 18px rgba(15, 29, 43, .16); cursor: pointer; transition: transform .15s, color .15s, border-color .15s; }
.tp-cookies-fab:hover { color: var(--tp-red); border-color: var(--tp-red); transform: scale(1.06); }
.tp-cookies-fab:focus-visible { outline: 2px solid var(--tp-navy); outline-offset: 3px; }
.tp-cookies-fab[hidden] { display: none; }
@media (max-width: 600px) { .tp-cookies-fab { left: 16px; bottom: 16px; } }
/* okno ustawień */
.tp-cookies-lock, .tp-cookies-lock body { overflow: hidden; }
.tp-cookies-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.tp-cookies-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 29, 43, .55); }
.tp-cookies-modal__dialog { position: relative; display: flex; flex-direction: column; width: 640px; max-width: 100%; max-height: min(86vh, 760px); border-radius: 14px; background: #fff; box-shadow: 0 24px 60px rgba(15, 29, 43, .3); color: var(--tp-ink); }
.tp-cookies-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--tp-line); }
.tp-cookies-modal__head h2 { margin: 0; font-size: 1.25rem; }
.tp-cookies-modal__close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--tp-steel); cursor: pointer; }
.tp-cookies-modal__close:hover { background: var(--tp-soft); color: var(--tp-ink); }
.tp-cookies-modal__body { overflow-y: auto; padding: 18px 24px; font-size: .875rem; line-height: 1.55; color: var(--tp-steel); }
.tp-cookies-modal__body > p { margin: 0 0 16px; }
.tp-cookies-cat { padding: 14px 0; border-top: 1px solid var(--tp-line); }
.tp-cookies-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.tp-cookies-cat__head h3 { margin: 0; font-size: 1rem; color: var(--tp-ink); }
.tp-cookies-cat__always { font-size: .75rem; font-weight: 600; color: #2DA44E; white-space: nowrap; }
.tp-cookies-cat__desc { margin: 6px 0 8px; }
.tp-cookies-cat__list summary { display: inline-block; font-weight: 600; color: var(--tp-ink); cursor: pointer; }
.tp-cookies-table { margin-top: 10px; overflow-x: auto; }
.tp-cookies-table table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.tp-cookies-table th, .tp-cookies-table td { padding: 8px 10px; border-bottom: 1px solid var(--tp-line); text-align: left; vertical-align: top; }
.tp-cookies-table th { background: var(--tp-soft); color: var(--tp-ink); font-weight: 600; white-space: nowrap; }
.tp-cookies-table code { font-size: .75rem; white-space: nowrap; }
.tp-cookies-modal__foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--tp-line); }
/* przełącznik */
.tp-switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.tp-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tp-switch__track { position: relative; width: 44px; height: 24px; border-radius: 24px; background: #C3C9D1; transition: background .15s; }
.tp-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 29, 43, .3); transition: transform .15s; }
.tp-switch input:checked + .tp-switch__track { background: var(--tp-red); }
.tp-switch input:checked + .tp-switch__track::after { transform: translateX(20px); }
.tp-switch input:focus-visible + .tp-switch__track { outline: 2px solid var(--tp-navy); outline-offset: 2px; }
/* osadzenia (mapa) przed zgodą */
.tp-embed { position: relative; }
.tp-embed iframe:not([src]) { visibility: hidden; }
.tp-embed__placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 24px; border-radius: 12px; background: var(--tp-soft); text-align: center; font-size: .9375rem; color: var(--tp-steel); }
.tp-embed__placeholder p { max-width: 520px; margin: 0; }
.tp-embed__placeholder strong { color: var(--tp-ink); }
.tp-embed__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin-top: 12px !important; }
.tp-embed__btn { min-height: 44px; padding: 0 20px; border: 0; border-radius: 8px; background: var(--tp-red); color: #fff; font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; }
.tp-embed__btn:hover { background: #8F251F; }
.tp-embed__actions a { color: var(--tp-ink); font-weight: 600; }
.tp-embed.is-loaded .tp-embed__placeholder { display: none; }
@media (max-width: 600px) {
	.tp-cookies { left: 16px; right: 16px; bottom: 16px; width: auto; max-width: none; padding: 18px; }
	.tp-cookies__link { width: 100%; margin: 0 0 2px; text-align: left; }
	.tp-cookies-modal { align-items: flex-end; padding: 0; }
	.tp-cookies-modal__dialog { max-height: 92vh; border-radius: 14px 14px 0 0; }
	.tp-cookies-modal__head, .tp-cookies-modal__body, .tp-cookies-modal__foot { padding-left: 18px; padding-right: 18px; }
	.tp-cookies-modal__foot .tp-cookies__btn { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .tp-cookies { transition: none; transform: none; } }

/* ---------- nagłówek ---------- */
.tp-topbar { background: var(--tp-ink); padding: 0 var(--tp-gutter); }
.tp-topbar__inner { min-height: 40px; gap: 8px 28px; }
.tp-topbar p { margin: 0; font-size: .8125rem; color: rgba(255, 255, 255, .78); }
.tp-topbar__links { gap: 8px 28px; }
.tp-topbar a { color: #fff; font-weight: 500; }
.tp-topbar a:hover { color: var(--tp-red-light); }
.tp-header { background: #fff; padding: 0 var(--tp-gutter); border-bottom: 1px solid var(--tp-line); }
header.wp-block-template-part { position: sticky; top: -40px; z-index: 50; }
.tp-header__inner { min-height: 84px; gap: 24px; }
.tp-nav { flex: 1; justify-content: flex-end; font-size: .9375rem; font-weight: 500; }
.tp-nav .wp-block-navigation__container { gap: 6px 26px; }
.tp-nav a:hover, .tp-nav .current-menu-item > a { color: var(--tp-red); }
.tp-header__cta { flex: none; margin: 0; }
.tp-header__cta .wp-block-button__link { min-height: 48px; padding: .75rem 1.375rem; }
.tp-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 24px 20px; }
.tp-nav .is-menu-open .wp-block-navigation-item__content { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.125rem; padding: 14px 0; }
.tp-nav .is-menu-open :is(.wp-block-navigation__responsive-container-content, .wp-block-navigation__container, .wp-block-navigation-item) { align-items: flex-start !important; justify-content: flex-start !important; text-align: left; }
.tp-nav .is-menu-open .wp-block-navigation__container, .tp-nav .is-menu-open .wp-block-navigation-item { width: 100%; }
.tp-nav .wp-block-navigation__responsive-container:not(.is-menu-open) .tp-nav-cta { display: none !important; }
.tp-nav .is-menu-open :is(.wp-block-navigation__responsive-close, .wp-block-navigation__responsive-dialog) { display: flex; flex-direction: column; height: 100%; }
.tp-nav .is-menu-open .wp-block-navigation__responsive-container-content { flex: 1 1 auto; padding-top: 0 !important; }
.tp-nav .is-menu-open .wp-block-navigation__container { flex: 1 1 auto; }
.tp-nav .is-menu-open .tp-nav-cta { margin-top: auto; padding: 24px 0 8px; }
.tp-nav .is-menu-open .tp-nav-cta .wp-block-navigation-item__content { display: flex; align-items: center; justify-content: center; box-sizing: border-box; width: 100%; min-height: 56px; padding: 0 24px; border-radius: 8px; background: var(--tp-red); color: #fff !important; font-family: inherit; font-size: 1rem; font-weight: 600; }
.tp-nav .is-menu-open .tp-nav-cta .wp-block-navigation-item__content:hover { background: #8F251F; }
/* otwarte menu mobilne: chowamy pływające elementy (nagłówek ma własny kontekst warstw, więc menu nie przykryje ich samo) */
html.has-modal-open :is(.tp-czat, .tp-cookies-fab, .tp-cookies) { display: none !important; }

/* ---------- stopka ---------- */
.tp-footer { background: var(--tp-ink); color: #fff; padding: clamp(48px, 7vw, 80px) var(--tp-gutter) 32px; }
.tp-footer__cols { gap: clamp(28px, 4vw, 64px); margin-bottom: 48px; }
.tp-footer p { margin: 0 0 10px; font-size: .9375rem; color: rgba(255, 255, 255, .8); }
.tp-footer a { color: rgba(255, 255, 255, .8); }
.tp-footer a:hover { color: #fff; }
.tp-footer__about { margin: 20px 0 !important; font-size: .875rem !important; line-height: 1.6; color: rgba(255, 255, 255, .6) !important; }
.tp-footer__title { margin-bottom: 18px !important; font-size: .75rem !important; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tp-red-light) !important; }
.tp-footer .wp-block-button__link { min-height: 40px; padding: .5rem 1rem; font-size: .8125rem; }
.tp-footer__bottom { padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); gap: 8px 28px; }
.tp-footer__copy { margin: 0 !important; font-size: .8125rem !important; color: rgba(255, 255, 255, .5) !important; }
.tp-footer .tp-logo img { width: 160px; }

/* ---------- responsywność ---------- */
@media (max-width: 1100px) {
	.tp-header .tp-header__cta { display: none; }
}
@media (max-width: 781px) {
	.tp-topbar__text { display: none; }
	.tp-topbar__links p:last-child { display: none; }
	.tp-topbar__inner { justify-content: center; }
	.tp-header__inner { min-height: 64px; }
	.tp-logo img { width: 120px; }
	.tp-product--rev .wp-block-column:last-child { order: -1; }
	.tp-banner__buttons { justify-content: flex-start; }
	.wp-block-buttons:not(.tp-header__cta) .wp-block-button, .wp-block-buttons:not(.tp-header__cta) .wp-block-button__link { width: 100%; }
	.tp-fact { padding-right: 12px; }
	.tp-timeline { gap: 4px; }
	.tp-award { margin-left: 12px; }
	ul.is-style-tp-spec strong { flex-basis: 6rem; }
}

/* ---------- edytor ---------- */
.editor-styles-wrapper header.wp-block-template-part { position: static; }
