/* ============================================================
 * Seven — globalny styl formularzy CF7 (.gw-form)
 * Reużywalny: owiń shortcode CF7 w <div class="gw-form"> … </div>
 * Pola CF7 w szablonie używają .gw-cf__field / .gw-cf__label.
 * Submit: render.php opakowuje <input.wpcf7-submit> w
 *   <span class="gw-cf__submit-wrap"> … <span class="gw-cf__submit-circle">arrow</span></span>
 * Design: Figma 368-23996 / 479-19649.
 * ============================================================ */

.gw-form .wpcf7-form { display: flex; flex-direction: column; gap: 16px; }
.gw-form .wpcf7-form p { margin: 0; }
.gw-form .gw-cf__field p { display: contents; } /* gdyby CF7 autop owinął label+input — nie psuje flex gap */

.gw-form .gw-cf__field { display: flex; flex-direction: column; gap: 8px; }
.gw-form .gw-cf__label { font-family: var(--wp--preset--font-family--articulat); font-size: var(--wp--preset--font-size--footnote); line-height: 16px; color: var(--wp--preset--color--primary); }
.gw-form .wpcf7-form-control-wrap { position: relative; display: block; width: 100%; }

.gw-form input[type="text"],
.gw-form input[type="tel"],
.gw-form input[type="email"] {
	width: 100%; height: 50px;
	padding: 0 24px;
	border: 1px solid var(--wp--preset--color--primary);
	border-radius: 16px;
	background: transparent;
	font-family: var(--wp--preset--font-family--articulat);
	font-size: var(--wp--preset--font-size--body); line-height: 26px;
	color: var(--wp--preset--color--primary);
	-webkit-tap-highlight-color: transparent;
	box-sizing: border-box;
}
.gw-form input::placeholder { color: var(--wp--preset--color--primary); opacity: 0.65; transition: opacity 0.2s ease; }
.gw-form input { transition: border-color 0.2s ease, box-shadow 0.2s ease; }
@media (hover: hover) { .gw-form input:hover:not(:focus) { border-color: var(--wp--preset--color--rust); } }
.gw-form input:focus { outline: none; border-color: var(--wp--preset--color--rust); box-shadow: 0 0 0 3px rgba(180, 102, 76, 0.15); }
.gw-form input:focus::placeholder { opacity: 0.4; }

/* RODO acceptance */
.gw-form .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.gw-form .wpcf7-acceptance label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.gw-form .wpcf7-acceptance input[type="checkbox"] {
	appearance: none; -webkit-appearance: none;
	flex-shrink: 0; width: 28px; height: 28px; margin: 0;
	border: 1px solid var(--wp--preset--color--green-dark);
	border-radius: 8px; background: transparent; cursor: pointer;
	display: inline-block; position: relative;
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
@media (hover: hover) { .gw-form .wpcf7-acceptance input[type="checkbox"]:hover { border-color: var(--wp--preset--color--rust); } }
.gw-form .wpcf7-acceptance input[type="checkbox"]:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(180, 102, 76, 0.25); }
.gw-form .wpcf7-acceptance input[type="checkbox"]:checked {
	background: var(--wp--preset--color--green-dark);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: center;
}
.gw-form .wpcf7-list-item-label,
.gw-form .wpcf7-acceptance label { font-family: var(--wp--preset--font-family--articulat); font-size: var(--wp--preset--font-size--footnote); line-height: 16px; color: var(--wp--preset--color--primary); }
.gw-form .wpcf7-acceptance a { color: var(--wp--preset--color--primary); text-decoration: underline; }

/* Submit pill (rust) + biały okrąg ze strzałką — stany IDENTYCZNE jak globalny .gw-btn
 * (biały fill rozrasta się od okręgu w lewo + tekst ciemnieje; circle/ikona bez zmian) */
.gw-form .gw-cf__submit-wrap {
	align-self: flex-start; position: relative; display: inline-flex; align-items: center;
	overflow: clip; isolation: isolate; border-radius: 200px;
	background: var(--wp--preset--color--rust);
	transition: transform 0.1s ease;
}
.gw-form .gw-cf__submit-wrap::before {
	content: ""; position: absolute; inset: 2px; z-index: 0;
	background: var(--wp--preset--color--base); border-radius: 200px;
	transform: scaleX(0); transform-origin: right center;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none;
}
.gw-form .wpcf7-submit {
	position: relative; z-index: 1;
	height: 57px; padding: 0 66px 0 24px;
	border: none; border-radius: 200px; background: transparent;
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--articulat); font-size: var(--wp--preset--font-size--body);
	cursor: pointer; -webkit-tap-highlight-color: transparent;
	transition: color 0.35s ease;
}
.gw-form .gw-cf__submit-circle {
	position: absolute; z-index: 1; right: 2px; top: 50%; transform: translateY(-50%);
	width: 53px; height: 53px; border-radius: 60px;
	background: var(--wp--preset--color--base); color: var(--wp--preset--color--rust);
	display: inline-flex; align-items: center; justify-content: center; line-height: 0;
	pointer-events: none;
}
.gw-form .gw-cf__submit-circle svg { display: block; }
@media (hover: hover) {
	.gw-form .gw-cf__submit-wrap:hover::before { transform: scaleX(1); }
	.gw-form .gw-cf__submit-wrap:hover .wpcf7-submit { color: var(--wp--preset--color--primary); }
}
.gw-form .gw-cf__submit-wrap:active { transform: translateY(1px); }
.gw-form .gw-cf__submit-wrap:focus-within { outline: 3px solid rgba(180, 102, 76, 0.55); outline-offset: 3px; }
.gw-form .wpcf7-spinner { position: absolute; right: 64px; margin: 0; }

/* Walidacja — bez layout shift */
.gw-form .wpcf7-not-valid-tip { position: absolute; top: 100%; left: 0; margin-top: 2px; font-size: var(--wp--preset--font-size--footnote); line-height: 14px; color: var(--wp--preset--color--error); }
.gw-form input.wpcf7-not-valid { border-color: var(--wp--preset--color--error); }
.gw-form .wpcf7-response-output { margin: 8px 0 0 !important; padding: 10px 16px !important; border-radius: 12px; font-family: var(--wp--preset--font-family--articulat); font-size: var(--wp--preset--font-size--caption); line-height: 21px; }

/* Mobile ≤640: submit text-only (bez okręgu) */
@media (max-width: 640px) {
	.gw-form .wpcf7-submit { padding: 0 24px; }
	.gw-form .gw-cf__submit-circle { display: none; }
	.gw-form .wpcf7-spinner { right: 16px; }
}

/* ── Wyszukiwarka (blok core/search na stronie wyników) ──────────────────────
   Domyślny blok WordPressa daje białe pole z szarym przyciskiem, co na czarnym
   tle SEVEN-a wygląda jak wklejka z innej strony. Ubieramy go w kolory motywu. */
.wp-block-search__inside-wrapper {
	max-width: 620px;
	border: 1px solid rgba(236, 233, 227, .16);
	border-radius: 8px;
	background: rgba(236, 233, 227, .04);
	overflow: hidden;
	transition: border-color .4s ease, background .4s ease;
}
.wp-block-search__inside-wrapper:focus-within {
	border-color: rgba(199, 178, 153, .55);
	background: rgba(236, 233, 227, .07);
}
.wp-block-search__input {
	padding: 15px 18px;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--porcelain, #ece9e3);
	font-family: var(--wp--preset--font-family--geist);
	font-weight: 300;
	font-size: 16px;
}
.wp-block-search__input::placeholder { color: rgba(236, 233, 227, .38); }
.wp-block-search__input:focus { outline: none; }
.wp-block-search__button {
	margin: 0;
	padding: 0 26px;
	border: 0;
	border-left: 1px solid rgba(236, 233, 227, .14);
	background: transparent;
	color: var(--wp--preset--color--champagne, #c7b299);
	font-family: 'Kode Mono', monospace;
	font-size: 11px;
	letter-spacing: .22em;
	text-transform: uppercase;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background .4s ease, color .4s ease;
}
@media (hover: hover) {
	.wp-block-search__button:hover {
		background: var(--wp--preset--color--champagne, #c7b299);
		color: #121318;
	}
}
