/* CST Park – privat/pro-läge. Fylls på i senare uppgifter. */

.cst-hanvisning {
	margin: 0;
	/* Texten linjerar med headerns innehåll (1 240 px, 24 px inre marginal) – minus kantens 4 px. */
	padding: 0.9em max(20px, calc(50% - 600px));
	border-left: 4px solid #c1ff72;
	background: #11362f;
	color: #fff;
	font-size: 0.95em;
}

.cst-hanvisning a {
	color: #c1ff72;
	font-weight: 600;
}

.cst-hanvisning a:focus-visible {
	outline: 2px solid #c1ff72;
	outline-offset: 2px;
}

.cst-vaxel {
	display: inline-flex;
	gap: 4px;
	padding: 3px;
	border: 1px solid rgba(193, 255, 114, 0.5);
	border-radius: 999px;
}

.cst-vaxel__val {
	padding: 6px 14px;
	border-radius: 999px;
	color: inherit;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.cst-vaxel__val[aria-current="true"] {
	background: #c1ff72;
	color: #11362f;
}

.cst-vaxel__val:focus-visible {
	outline: 2px solid #c1ff72;
	outline-offset: 2px;
}

.cst-formular .cst-falt label {
	display: block;
	margin-bottom: 4px;
	font-weight: 600;
}

.cst-formular .cst-falt--samtycke label,
.cst-formular .cst-falt--kryss label {
	display: inline;
	font-weight: 400;
}

.cst-formular input[type="text"],
.cst-formular input[type="email"],
.cst-formular input[type="tel"],
.cst-formular select,
.cst-formular textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cfd8cf;
	border-radius: 6px;
	font: inherit;
}

.cst-formular [aria-invalid="true"] {
	border-color: #a3200f;
}

.cst-fel {
	display: block;
	margin-top: 4px;
	color: #a3200f;
	font-size: 0.9em;
}

.cst-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.cst-knapp {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 22px;
	border: 1.5px solid #11362f;
	border-radius: 999px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.cst-knapp--primar {
	background: #11362f;
	color: #fff;
}

.cst-knapp--sekundar {
	background: transparent;
	color: #11362f;
}

.cst-knapp:focus-visible {
	outline: 2px solid #11362f;
	outline-offset: 3px;
}

.cst-produkt-knappar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 1em 0;
}

.cst-foretagsrad {
	flex-basis: 100%;
	margin: 0.5em 0 0;
	font-size: 0.95em;
}

.cst-foretagsrad__lank {
	color: #11362f;
	font-weight: 600;
}

/* Panelen med leadformuläret (produktsidan) --------------------------------
   Glider in från höger. Mörkgrönt huvud med produkten, formuläret under. */
.cst-dialog {
	position: fixed; inset: 0 0 0 auto; width: min(480px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
	margin: 0; padding: 0; border: 0; border-radius: 0; background: #fff; color: #26352f; overflow-y: auto; overscroll-behavior: contain;
}
.cst-dialog[open] { animation: cst-panel-in .28s cubic-bezier(.2, .7, .2, 1); }
.cst-dialog::backdrop { background: rgba(11, 15, 13, .55); }
@keyframes cst-panel-in { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }

.cst-dialog__huvud { position: relative; display: grid; gap: 16px; padding: max(20px, env(safe-area-inset-top, 0px)) 28px 24px; background: #11362f; color: #fff; overflow: hidden; }
.cst-dialog__rad { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cst-dialog__etikett { margin: 0; color: #c1ff72; font-family: "JetBrains Mono", Menlo, Consolas, monospace; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
.cst-dialog__etikett::before { content: ""; display: inline-block; width: 18px; height: 1.5px; margin-right: 10px; background: #c1ff72; vertical-align: middle; }
.cst-dialog .cst-dialog__stang { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(193, 255, 114, .6); border-radius: 999px; background: transparent; color: #c1ff72; font-size: 22px; line-height: 1; cursor: pointer; }
.cst-dialog .cst-dialog__stang:hover { background: #c1ff72; color: #11362f; }
.cst-dialog .cst-dialog__stang:focus-visible { outline: 2px solid #c1ff72; outline-offset: 2px; }

.cst-dialog__produkt { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; }
.cst-dialog__produkt > * { min-width: 0; }
.cst-dialog__bildram { display: block; width: 88px; height: 88px; padding: 6px; background: #fff; }
.cst-dialog__bildram img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.cst-dialog__namn { margin: 0; font-family: var(--cotheme-font-heading, "Bebas Neue", Impact, sans-serif); font-size: 30px; line-height: .95; color: #fff; text-wrap: balance; }
.cst-dialog__pris { margin: 8px 0 0; color: #e2ebe6; font-size: 14px; font-variant-numeric: tabular-nums; }
.cst-dialog__pris .woocommerce-price-suffix { color: #a9c2b6; font-size: 12px; white-space: nowrap; }
.cst-dialog__ingress { margin: 0; max-width: 40ch; color: #e2ebe6; font-size: 14px; }

.cst-dialog__kropp { padding: 24px 28px max(28px, env(safe-area-inset-bottom, 0px)); }
.cst-dialog .cst-formular__produkt { display: none; } /* Produkten står redan i huvudet. */
.cst-dialog .cst-formular form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.cst-dialog .cst-formular form > * { grid-column: 1 / -1; margin: 0; }
.cst-dialog .cst-formular form > .cst-falt:has([name="epost"]),
.cst-dialog .cst-formular form > .cst-falt:has([name="telefon"]) { grid-column: auto; }
.cst-dialog .cst-falt label { margin-bottom: 6px; color: #152621; font-size: 13px; font-weight: 600; }
.cst-dialog .cst-formular input[type="text"],
.cst-dialog .cst-formular input[type="email"],
.cst-dialog .cst-formular input[type="tel"],
.cst-dialog .cst-formular select,
/* Minst 16 px – annars zoomar iOS Safari in när första fältet får fokus när dialogen öppnas. */
.cst-dialog .cst-formular textarea { padding: 12px 14px; border: 1px solid #cfd8cf; border-radius: 0; background: #f3f5ef; color: #152621; font-size: 16px; }
.cst-dialog .cst-formular :is(input, select, textarea):hover { border-color: #4f5f59; }
.cst-dialog .cst-formular :is(input, select, textarea):focus { outline: 2px solid #11362f; outline-offset: -1px; border-color: #11362f; background: #fff; }
.cst-dialog .cst-formular textarea { min-height: 96px; resize: vertical; }
.cst-dialog .cst-falt--samtycke { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; }
.cst-dialog .cst-falt--samtycke input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #11362f; }
.cst-dialog .cst-falt--samtycke label { margin: 0; color: #26352f; font-size: 13px; font-weight: 400; }
.cst-dialog .cst-falt--samtycke .cst-fel { flex-basis: 100%; }
.cst-dialog .cst-formular button[type="submit"] { display: block; width: 100%; padding: 16px 24px; text-align: center; border: 0; border-radius: 999px; background: #c1ff72; color: #11362f; font-size: 15px; font-weight: 600; cursor: pointer; }
.cst-dialog .cst-formular button[type="submit"]:hover { background: #d3ff97; color: #11362f; }
.cst-dialog .cst-formular button[type="submit"]:focus-visible { outline: 2px solid #11362f; outline-offset: 3px; }
.cst-dialog .cst-formular--tack { padding: 24px; border-left: 4px solid #c1ff72; background: #f3f5ef; color: #152621; font-weight: 600; }

/* Utan JavaScript: formuläret visas på plats när adressen pekar på det. */
html:not(.cst-js) .cst-dialog:has(:target) { display: block; position: static; width: auto; height: auto; max-height: none; margin: 20px 0 0; }
html:not(.cst-js) .cst-dialog:has(:target) .cst-dialog__stang { display: none; }

@media (max-width: 560px) {
	.cst-dialog__huvud { padding-inline: 20px; }
	.cst-dialog__kropp { padding-inline: 20px; }
	.cst-dialog .cst-formular form { grid-template-columns: 1fr; }
	.cst-dialog .cst-formular form > .cst-falt:has([name="epost"]),
	.cst-dialog .cst-formular form > .cst-falt:has([name="telefon"]) { grid-column: 1 / -1; }
	.cst-dialog__produkt { grid-template-columns: 64px 1fr; }
	.cst-dialog__bildram { width: 64px; height: 64px; }
	.cst-dialog__namn { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
	.cst-dialog[open] { animation: none; }
}

@media (max-width: 400px) {
	.cst-hanvisning {
		padding-inline: 12px 16px;
	}
}

/* Fält som JS döljer (paketvalet i servicebokningen) – egna display-regler får inte slå ut hidden. */
.cst-formular .cst-falt[hidden] { display: none; }
