/**
 * Apeko – lomakkeet (WPForms). Ladataan vain sivuilla, joilla on teeman lomake (inc/lomakkeet.php),
 * ikkunassa sivun mukana. WPFormsin omat tyylit ovat pois päältä.
 *
 * Rakenne: osiot ovat WPFormsin Layout-kenttiä (.wpforms-field-layout, numero CSS-laskurilla; tunnistus kenttätyypistä, koska
 * WPFormsin builder ei tallenna Layout-kentän CSS-luokkaa, vaihe 13), valinnat laattoja
 * (.apeko-laatat; .apeko-laatat--58 = mobiilissa sarakkeet 58 % / 42 %), liitealue .apeko-liitteet.
 */

/* ---------- Sivu ja johdanto ---------- */

.apeko-lomakesivu > * + * {
	margin-block-start: 0;
}

.apeko-lomake-johdanto {
	margin: 0 0 14px;
	color: var(--wp--preset--color--teksti-2);
	font-size: var(--apeko-fs-ui);
	line-height: 1.5;
}

/* Lähetyksen jälkeen johdantoa ei tarvita. */
.apeko-lomakesivu:has(.wpforms-confirmation-container) .apeko-lomake-johdanto {
	display: none;
}

/* Mobiilissa lomake leveämpänä (hahmotelman mukaan 12 px reunat). */
@media (max-width: 1099px) {

	.apeko-ikkuna .apeko-ikkuna__sisalto:has(.apeko-lomake) {
		padding: 14px 12px 28px;
	}

	.apeko-sivu .apeko-sisalto:has(.apeko-lomake) {
		padding-inline: 12px;
	}

	.apeko-sivu .apeko-sisalto:has(.apeko-lomake) > .wp-block-post-title {
		margin-inline: 8px;
	}
}

@media (min-width: 1100px) {

	.apeko-sisalto:has(.apeko-lomake) > .wp-block-post-title {
		max-width: none;
	}

	.apeko-lomake-johdanto {
		font-size: var(--apeko-fs-m);
	}
}

/* ---------- Perusrakenne ---------- */

.apeko-lomake form,
.apeko-lomake fieldset,
.apeko-lomake ul {
	margin: 0;
	padding: 0;
	border: 0;
}

.apeko-lomake ul {
	list-style: none;
}

.apeko-lomake .wpforms-field-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.apeko-lomake form {
	counter-reset: apeko-osio;
}

.apeko-lomake .wpforms-field-label,
.apeko-lomake legend.wpforms-field-label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	color: var(--wp--preset--color--teksti);
	font-size: var(--apeko-fs-s);
	font-weight: 800;
	line-height: 1.3;
}

.apeko-lomake .wpforms-required-label {
	color: var(--wp--preset--color--teksti-2);
	font-weight: 600;
}

.apeko-lomake .wpforms-label-hide,
.apeko-lomake .wpforms-screen-reader-element {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.apeko-lomake .wpforms-field-description {
	margin-top: 6px;
	color: var(--wp--preset--color--teksti-2);
	font-size: var(--apeko-fs-xs);
	line-height: 1.45;
}

.apeko-lomake .wpforms-hidden,
.apeko-lomake [hidden] {
	display: none;
}

/* ---------- Osiot (Layout-kentät) ---------- */

.apeko-lomake .wpforms-field-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	padding: 14px 12px 16px;
	background: var(--wp--preset--color--harmaa);
	counter-increment: apeko-osio;
}

.apeko-lomake .wpforms-field-layout > h2.wpforms-field-label {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 14px;
	font-size: var(--apeko-fs-l);
	font-weight: 800;
	line-height: 1.2;
}

.apeko-lomake .wpforms-field-layout > h2.wpforms-field-label::before {
	content: counter(apeko-osio);
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	background: var(--wp--preset--color--petrooli);
	color: var(--wp--preset--color--valkoinen);
	font-size: var(--apeko-fs-s);
	font-weight: 800;
}

/* Osion kuvaus pillerinä otsikon oikealla puolella ("Useita voi valita"). */
.apeko-lomake .wpforms-field-layout > .wpforms-field-description {
	margin: 0 0 14px 8px;
	padding: 3px 8px;
	border: 1px solid var(--wp--preset--color--viiva);
	background: var(--wp--preset--color--valkoinen);
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
}

.apeko-lomake .wpforms-field-layout-rows,
.apeko-lomake .wpforms-field-layout-columns {
	display: flex;
	grid-column: 1 / -1;
	flex-direction: column;
	gap: 14px;
}

.apeko-lomake .wpforms-layout-row {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.apeko-lomake .wpforms-layout-column {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

/* Tyhjä rivi (piilotettu ehtokenttä) ei vie väliä. */
.apeko-lomake .wpforms-layout-row:not(:has(.wpforms-field:not([style*="display: none"]):not([style*="display:none"]))) {
	display: none;
}

/* ---------- Tekstikentät ---------- */

.apeko-lomake input[type="text"],
.apeko-lomake input[type="email"],
.apeko-lomake input[type="tel"],
.apeko-lomake input[type="number"],
.apeko-lomake input[type="url"],
.apeko-lomake select,
.apeko-lomake textarea {
	display: block;
	width: 100%;
	min-height: var(--apeko-kosketus);
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--apeko-lomake-reuna);
	border-radius: 0;
	background: var(--wp--preset--color--valkoinen);
	color: var(--wp--preset--color--teksti);
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
}

.apeko-lomake textarea {
	min-height: 104px;
	resize: vertical;
}

.apeko-lomake ::placeholder {
	color: var(--wp--preset--color--teksti-2);
	opacity: 1;
}

/* ---------- Valintalaatat ---------- */

.apeko-lomake .apeko-laatat ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.apeko-lomake .apeko-laatat--58 ul {
	grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
}

.apeko-lomake .apeko-laatat li {
	position: relative;
	display: flex;
	min-width: 0;
}

/* Oikea valintaruutu on laatan päällä näkymättömänä: toimii hiirellä, sormella ja näppäimistöllä. */
.apeko-lomake .apeko-laatat input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.apeko-lomake .apeko-laatat label {
	display: flex;
	flex-grow: 1;
	align-items: center;
	gap: 10px;
	min-width: 0;
	min-height: var(--apeko-kosketus);
	padding: 6px 10px;
	border: 1px solid var(--apeko-kahva);
	background: var(--wp--preset--color--valkoinen);
	color: var(--wp--preset--color--teksti);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.2;
	overflow-wrap: break-word;
	hyphens: manual;
}

.apeko-lomake .apeko-laatat label::before {
	content: "";
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border: 2px solid var(--apeko-lomake-reuna);
	background: var(--wp--preset--color--valkoinen);
}

.apeko-lomake .wpforms-field-radio.apeko-laatat label::before {
	border-radius: 50%;
}

.apeko-lomake .apeko-laatat input:checked + label {
	border-color: var(--wp--preset--color--petrooli);
	background: var(--wp--preset--color--petrooli);
	color: var(--wp--preset--color--valkoinen);
}

.apeko-lomake .wpforms-field-checkbox.apeko-laatat input:checked + label::before {
	border-color: var(--wp--preset--color--valkoinen);
	background: var(--wp--preset--color--valkoinen) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b3c4d' stroke-width='3.2' stroke-linecap='square'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.apeko-lomake .wpforms-field-radio.apeko-laatat input:checked + label::before {
	border-color: var(--wp--preset--color--valkoinen);
	background: radial-gradient(circle, var(--wp--preset--color--valkoinen) 0 4px, var(--wp--preset--color--petrooli) 5px);
}

.apeko-lomake .apeko-laatat input:focus-visible + label {
	outline: 3px solid var(--apeko-fokus);
	outline-offset: 2px;
}

@media (hover: hover) {

	.apeko-lomake .apeko-laatat input:not(:checked):hover + label {
		border-color: var(--apeko-kortti-hover);
		background: var(--apeko-rivi-hover);
	}
}

/* Rekrytointi: tehtävän laatat isompina; haussa olevan kulmassa merkintä "Haussa nyt" korostussinisellä
   (erottuu valitusta petroolista laatasta; Jaakko 1.10.2026). Mobiilissa hieman tiiviimpi kuin muut laatat,
   jotta "Sähköasentaja" mahtuu riville 360 px:stä alkaen. */
.apeko-lomake .apeko-tehtava label {
	gap: 8px;
	min-height: 52px;
	padding-inline: 8px;
	font-weight: 800;
}

.apeko-lomake .apeko-haussa {
	position: absolute;
	top: -9px;
	right: 8px;
	padding: 1px 7px;
	border: 1px solid var(--wp--preset--color--valkoinen);
	background: var(--wp--preset--color--korostus);
	color: var(--wp--preset--color--valkoinen);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1.4;
	text-transform: uppercase;
}

/* Kohteen koko ennen tyypin valintaa: ohje katkoviivalaatikossa. */
.apeko-lomake .apeko-odottaa > div {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: var(--apeko-kosketus);
	padding: 0 14px;
	border: 1px dashed var(--apeko-kortti-hover);
	background: rgb(255 255 255 / 0.5);
	color: var(--wp--preset--color--teksti-2);
	font-size: var(--apeko-fs-s);
}

.apeko-lomake .apeko-odottaa > div::before {
	content: "";
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	background: currentcolor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%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='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M12 19V5M5 12l7-7 7 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Liitteet (WPFormsin moderni liitekenttä; otsikko ja ohje siirretään laatikkoon, lomake.js) ---------- */

.apeko-lomake .apeko-liitteet {
	position: relative;
}

.apeko-lomake .wpforms-uploader {
	padding: 14px;
	border: 1.5px dashed var(--apeko-kortti-hover);
	background: var(--wp--preset--color--valkoinen);
	cursor: pointer;
}

.apeko-lomake .wpforms-uploader.dz-drag-hover {
	border-color: var(--wp--preset--color--petrooli);
	background: var(--apeko-rivi-hover);
}

.apeko-lomake .dz-message {
	display: grid;
	grid-template-columns: 26px minmax(0, 1fr);
	gap: 12px;
	align-items: center;
}

.apeko-lomake .dz-message.hide {
	display: none;
}

.apeko-lomake .dz-message::before {
	content: "";
	width: 26px;
	height: 26px;
	background: var(--wp--preset--color--petrooli);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M4 16v4h16v-4'/%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='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M4 16v4h16v-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.apeko-lomake .dz-message > svg,
.apeko-lomake .dz-message .modern-hint {
	display: none;
}

.apeko-lomake .apeko-liitteet__teksti .wpforms-field-label {
	margin: 0;
	font-size: var(--apeko-fs-ui);
	cursor: pointer;
}

.apeko-lomake .apeko-liitteet__teksti .wpforms-field-description {
	margin: 0;
}

/* "Valitse tiedostot" näyttää painikkeelta (koko laatikko on napautettava alue). */
.apeko-lomake .dz-message .modern-title {
	display: flex;
	grid-column: 1 / -1;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--apeko-kosketus);
	padding: 0 14px;
	border: 1px solid var(--wp--preset--color--petrooli);
	color: var(--wp--preset--color--petrooli);
	font-size: var(--apeko-fs-s);
	font-weight: 800;
	white-space: nowrap;
}

.apeko-lomake .dz-message .modern-title::before {
	content: "";
	width: 16px;
	height: 16px;
	background: currentcolor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='square'%3E%3Cpath d='M12 5v14M5 12h14'/%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='%23000' stroke-width='2.4' stroke-linecap='square'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (hover: hover) {

	.apeko-lomake .wpforms-uploader:hover .modern-title {
		background: var(--wp--preset--color--harmaa);
	}
}

/* Lisätyt tiedostot riveinä. */
.apeko-lomake .dz-preview {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 46px;
	margin-top: 8px;
	padding: 6px 48px 6px 12px;
	border: 1px solid var(--wp--preset--color--viiva);
	background: var(--wp--preset--color--valkoinen);
	font-size: var(--apeko-fs-s);
	cursor: default;
}

.apeko-lomake .dz-message:not(.hide) ~ .dz-preview:first-of-type {
	margin-top: 14px;
}

.apeko-lomake .dz-image,
.apeko-lomake .dz-success-mark,
.apeko-lomake .dz-error-mark {
	display: none;
}

.apeko-lomake .dz-details {
	display: flex;
	flex-grow: 1;
	align-items: baseline;
	gap: 8px;
	min-width: 0;
}

.apeko-lomake .dz-filename {
	overflow: hidden;
	color: var(--wp--preset--color--teksti);
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.apeko-lomake .dz-size {
	flex-shrink: 0;
	order: 2;
	color: var(--wp--preset--color--teksti-2);
	font-size: var(--apeko-fs-xs);
}

.apeko-lomake .dz-progress {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 3px;
	background: var(--wp--preset--color--viiva);
}

.apeko-lomake .dz-upload {
	display: block;
	height: 100%;
	background: var(--wp--preset--color--korostus);
}

.apeko-lomake .dz-success .dz-progress,
.apeko-lomake .dz-error .dz-progress {
	display: none;
}

.apeko-lomake .dz-error-message {
	position: absolute;
	top: 100%;
	left: -1px;
	right: -1px;
	padding: 4px 12px 6px;
	color: var(--wp--preset--color--teksti);
	font-size: var(--apeko-fs-xs);
	font-weight: 700;
}

/* Virhe näkyy myös, kun palvelin hylkää tiedoston (WPForms lisää viestin, mutta ei dz-error-luokkaa). */
.apeko-lomake .dz-error,
.apeko-lomake .dz-preview:has([data-dz-errormessage]:not(:empty)) {
	margin-bottom: 26px;
	border-color: var(--wp--preset--color--teksti);
}

.apeko-lomake .dz-preview:not(.dz-error):not(:has([data-dz-errormessage]:not(:empty))) .dz-error-message {
	display: none;
}

.apeko-lomake .dz-remove {
	position: absolute;
	top: 50%;
	right: 1px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	overflow: hidden;
	color: var(--wp--preset--color--teksti);
	font-size: 0;
}

.apeko-lomake .dz-remove::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentcolor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%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='%23000' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Tietosuojakuittaus ja lähetys ---------- */

.apeko-lomake .apeko-tietosuoja {
	margin-top: 2px;
	padding-top: 14px;
	border-top: 1px solid var(--wp--preset--color--viiva);
}

.apeko-lomake .apeko-tietosuoja li {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--apeko-kosketus);
}

.apeko-lomake .apeko-tietosuoja input {
	flex-shrink: 0;
	width: 22px;
	height: 22px;
	margin: 0;
	border: 2px solid var(--apeko-lomake-reuna);
	border-radius: 0;
	background: var(--wp--preset--color--valkoinen);
	cursor: pointer;
	appearance: none;
}

.apeko-lomake .apeko-tietosuoja input:checked {
	border-color: var(--wp--preset--color--petrooli);
	background: var(--wp--preset--color--petrooli) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='square'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.apeko-lomake .apeko-tietosuoja label {
	font-size: 16px;
	line-height: 1.4;
	cursor: pointer;
}

.apeko-lomake .apeko-tietosuoja a {
	color: var(--wp--preset--color--linkki);
	font-weight: 700;
	text-decoration: underline;
}

.apeko-lomake .wpforms-submit-container {
	margin-top: 14px;
}

.apeko-lomake button[type="submit"] {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: var(--apeko-paatoiminto);
	padding: 0 24px;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--petrooli);
	color: var(--wp--preset--color--valkoinen);
	font: inherit;
	font-size: 16px;
	font-weight: 800;
	cursor: pointer;
}

.apeko-lomake button[type="submit"]::before {
	content: "";
	width: 18px;
	height: 18px;
	background: currentcolor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linejoin='miter'%3E%3Cpath d='M21 3L3 10.5l7.5 3L14 21z'/%3E%3Cpath d='M21 3L10.5 13.5'/%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='%23000' stroke-width='2' stroke-linejoin='miter'%3E%3Cpath d='M21 3L3 10.5l7.5 3L14 21z'/%3E%3Cpath d='M21 3L10.5 13.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.apeko-lomake button[type="submit"]:disabled {
	cursor: wait;
	opacity: 0.8;
}

.apeko-lomake .wpforms-submit-spinner {
	width: 22px;
	height: 22px;
	margin: 12px auto 0;
}

@media (hover: hover) {

	.apeko-lomake button[type="submit"]:hover {
		background: var(--apeko-petrooli-hover);
	}
}

/* Roskapostisuoja (Cloudflare Turnstile), jos se näyttää ruudun. Teema pyytää ruudun vain tarvittaessa
   (inc/lomakkeet.php); kun tarkistus menee läpi näkymättä, WPForms lisää luokan wpforms-is-turnstile-invisible. */
.apeko-lomake .wpforms-recaptcha-container {
	margin-top: 14px;
}

.apeko-lomake .wpforms-is-turnstile-invisible {
	margin-top: 0;
}

/* ---------- Virheet (ei punaista: tumma teksti ja merkki, kentän reuna paksumpi) ---------- */

.apeko-lomake .wpforms-error:not(input, textarea, select) {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	color: var(--wp--preset--color--teksti);
	font-size: var(--apeko-fs-s);
	font-style: normal;
	font-weight: 700;
	line-height: 1.3;
}

.apeko-lomake .wpforms-error:not(input, textarea, select)::before {
	content: "!";
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--wp--preset--color--teksti);
	color: var(--wp--preset--color--valkoinen);
	font-size: 12px;
	font-weight: 900;
}

.apeko-lomake input.wpforms-error,
.apeko-lomake textarea.wpforms-error,
.apeko-lomake .apeko-tietosuoja input.wpforms-error {
	border-width: 2px;
	border-color: var(--wp--preset--color--teksti);
}

.apeko-lomake .wpforms-error-container,
.apeko-lomake .wpforms-error-alert {
	margin: 0 0 14px;
	padding: 12px 14px;
	border-left: 4px solid var(--wp--preset--color--teksti);
	background: var(--wp--preset--color--harmaa);
	font-weight: 700;
}

/* ---------- Vahvistus lähetyksen jälkeen ---------- */

.apeko-lomake .wpforms-confirmation-container {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 24px 0;
}

.apeko-lomake .wpforms-confirmation-container:focus {
	outline: none;
}

.apeko-lomake .wpforms-confirmation-container::before {
	content: "";
	width: 56px;
	height: 56px;
	background: var(--wp--preset--color--petrooli) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 30px no-repeat;
}

.apeko-lomake .wpforms-confirmation-container > * {
	margin: 0;
}

.apeko-lomake .wpforms-confirmation-container h2 {
	font-size: 22px;
	font-weight: 900;
	line-height: 1.2;
}

.apeko-lomake .wpforms-confirmation-container p {
	font-size: var(--apeko-fs-ui);
	line-height: 1.6;
}

.apeko-lomake .apeko-lomake__sulje {
	margin-top: -2px;
}

.apeko-lomake .apeko-lomake__sulje a {
	width: 100%;
	border: 1px solid var(--wp--preset--color--viiva);
	background: var(--wp--preset--color--valkoinen);
	color: var(--wp--preset--color--teksti);
	font-size: 16px;
}

@media (hover: hover) {

	.apeko-lomake .apeko-lomake__sulje a:hover {
		background: var(--wp--preset--color--harmaa);
		color: var(--wp--preset--color--teksti);
	}
}

/* ---------- Työpöytä ---------- */

@media (min-width: 1100px) {

	.apeko-lomake .wpforms-field-container {
		gap: 14px;
	}

	.apeko-lomake .wpforms-field-layout {
		padding: 18px 20px 20px;
	}

	.apeko-lomake .wpforms-layout-row {
		flex-direction: row;
		gap: 14px;
	}

	.apeko-lomake .wpforms-layout-column {
		flex: 1 1 0;
	}

	.apeko-lomake input[type="text"],
	.apeko-lomake input[type="email"],
	.apeko-lomake input[type="tel"],
	.apeko-lomake textarea {
		min-height: var(--apeko-paatoiminto);
	}

	.apeko-lomake textarea {
		min-height: 98px;
	}

	.apeko-lomake .apeko-puolikas input {
		max-width: calc(50% - 7px);
	}

	.apeko-lomake .apeko-laatat ul,
	.apeko-lomake .apeko-laatat--58 ul {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.apeko-lomake .apeko-palvelut ul {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.apeko-lomake .apeko-laatat:not(.apeko-laatat--58, .apeko-palvelut) ul {
		grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
	}

	/* Sivureunat 12 px ja valintaympyrän väli 8 px: "Aluerakentaminen" mahtuu riville myös Firefoxissa
	   (14 px:llä ja 10 px:n välillä tilaa jäi alle 1 px; vaihe 13). */
	.apeko-lomake .apeko-laatat label {
		gap: 8px;
		min-height: var(--apeko-paatoiminto);
		padding: 6px 12px;
		font-size: 16px;
	}

	.apeko-lomake .apeko-tehtava label {
		min-height: 52px;
		padding-inline: 14px;
		font-size: 16px;
	}

	.apeko-lomake .dz-message {
		grid-template-columns: 26px minmax(0, 1fr) auto;
		padding: 2px 2px 2px 4px;
	}

	.apeko-lomake .dz-message .modern-title {
		grid-row: 1;
		grid-column: 3;
	}

	.apeko-lomake .dz-message .modern-hint {
		display: block;
		grid-row: 2;
		grid-column: 2;
		margin-top: -10px;
		color: var(--wp--preset--color--teksti-2);
		font-size: var(--apeko-fs-xs);
	}

	/* Tietosuojakuittaus vasemmalla ja lähetys oikealla samalla rivillä, viiva yläpuolella. Cloudflare Turnstile
	   tulee WPFormsissa niiden väliin: se asettuu kuittauksen alle vasemmalle, ja dense palauttaa lähetyksen
	   kuittauksen riville (vaihe 13). */
	.apeko-lomake form {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		grid-auto-flow: row dense;
	}

	.apeko-lomake form > .wpforms-recaptcha-container {
		grid-column: 1;
	}

	.apeko-lomake form > * {
		grid-column: 1 / -1;
	}

	.apeko-lomake .wpforms-field-container {
		display: contents;
	}

	.apeko-lomake .wpforms-field-container > * {
		grid-column: 1 / -1;
		margin-bottom: 14px;
	}

	.apeko-lomake .wpforms-field-container > .apeko-tietosuoja {
		grid-column: 1;
		margin: 6px 0 0;
		padding-top: 22px;
	}

	.apeko-lomake form > .wpforms-submit-container {
		grid-column: 2;
		margin: 6px 0 0;
		padding-top: 22px;
		border-top: 1px solid var(--wp--preset--color--viiva);
	}

	.apeko-lomake button[type="submit"] {
		width: auto;
	}

	.apeko-lomake .apeko-lomake__sulje a {
		min-height: 56px;
	}

	.apeko-lomake .wpforms-confirmation-container p {
		font-size: var(--apeko-fs-m);
	}
}

/* Liitteiden yhteiskoko ylittyi (lomake.js). */
.apeko-lomake .apeko-liitteet__ilmoitus {
	margin: 8px 0 0;
	color: var(--wp--preset--color--teksti);
	font-size: var(--apeko-fs-s);
	font-weight: 700;
}

.apeko-lomake .apeko-liitteet__ilmoitus:empty {
	display: none;
}

/* Ilman JavaScriptiä: ilmoituslaatikko, lomake piilossa (inc/lomakkeet.php, apeko_lomake_ei_js). */
.apeko-lomake__ei-js {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 16px;
	border: 2px solid var(--wp--preset--color--petrooli);
	background: var(--wp--preset--color--valkoinen);
	color: var(--wp--preset--color--teksti);
	font-size: var(--apeko-fs-m);
	line-height: 1.5;
}

.apeko-lomake__ei-js .apeko-ikoni {
	flex-shrink: 0;
	align-self: flex-start;
	margin-top: 1px;
}

.apeko-lomake__ei-js a {
	color: var(--wp--preset--color--linkki);
	font-weight: 700;
	text-decoration: underline;
}
