/**
 * Hinta-arvio.
 *
 * Everything is scoped under .thi-arvio — the theme styles .thi-hinnasto per
 * context, and a stray unscoped rule here would override those the way an
 * earlier global stylesheet did.
 */

.thi-arvio {
	--thi-arvio-green: #507F41;
	--thi-arvio-dark: #2C2C2C;
	--thi-arvio-muted: #6B6B6B;
	--thi-arvio-line: #DCD8CF;
	--thi-arvio-card: #fff;
	--thi-arvio-bg: #fff;
	--thi-arvio-radius: 20px;

	box-sizing: border-box;
	padding: clamp(24px, 4vw, 56px);
	border-radius: 32px;
	background: var(--thi-arvio-bg);
	color: var(--thi-arvio-dark);
	text-align: left;
}

.thi-arvio *,
.thi-arvio *::before,
.thi-arvio *::after {
	box-sizing: border-box;
}

/* Header */

.thi-arvio__eyebrow {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 12px;
	color: var(--thi-arvio-green);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
}

.thi-arvio__eyebrow::before {
	content: "";
	width: 64px;
	height: 1px;
	background: currentColor;
	flex: 0 0 64px;
}

.thi-arvio__title {
	margin: 0 0 clamp(24px, 3vw, 48px);
	font-size: clamp(30px, 4vw, 52px);
	font-weight: 400;
	line-height: 1.1;
}

/* Layout */

/* Three stacked full-width rows: valmiusaste, tyylisuunta, then alue + hinta. */
.thi-arvio__row + .thi-arvio__row {
	margin-top: clamp(28px, 3.5vw, 48px);
}

.thi-arvio__group {
	margin: 0;
	padding: 0;
	border: 0;
}

.thi-arvio__legend {
	display: block;
	margin: 0 0 12px;
	padding: 0;
	color: var(--thi-arvio-green);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
}

/* Row 3: alue on the left, price on the right */

.thi-arvio__summary {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
}

.thi-arvio__region-wrap {
	flex: 1 1 260px;
	min-width: 0;
}

.thi-arvio__region {
	width: 100%;
	max-width: 340px;
	padding: 11px 14px;
	border: 1px solid var(--thi-arvio-line);
	border-radius: 16px;
	background: #fff;
	color: inherit;
	font: inherit;
	line-height: 1.4;
	cursor: pointer;
}

.thi-arvio__region:focus-visible,
.thi-arvio__card:focus-within,
.thi-arvio__style:focus-within {
	outline: 2px solid var(--thi-arvio-green);
	outline-offset: 2px;
}

/* Package cards */

.thi-arvio__cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

@media (max-width: 900px) {
	.thi-arvio__cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.thi-arvio__cards {
		grid-template-columns: 1fr;
	}
}

.thi-arvio__card {
	display: block;
	position: relative;
	padding: 20px 20px 20px 46px;
	border: 1px solid var(--thi-arvio-line);
	border-radius: var(--thi-arvio-radius);
	background: var(--thi-arvio-card);
	cursor: pointer;
	transition: border-color 150ms ease;
}

.thi-arvio__card:has(:checked) {
	border-color: var(--thi-arvio-green);
}

/* The native control is replaced by a drawn dot, but stays focusable and
   in the tab order rather than being display:none. */
.thi-arvio__card input,
.thi-arvio__style input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.thi-arvio__card::before {
	content: "";
	position: absolute;
	top: 22px;
	left: 20px;
	width: 14px;
	height: 14px;
	border: 1px solid #A9A9A9;
	border-radius: 50%;
	background: #fff;
}

.thi-arvio__card:has(:checked)::before {
	border-color: var(--thi-arvio-green);
	background: var(--thi-arvio-green);
	box-shadow: inset 0 0 0 2px #fff;
}

.thi-arvio__card-name {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
}

.thi-arvio__card-desc {
	display: block;
	color: var(--thi-arvio-muted);
	font-size: 14px;
	line-height: 1.5;
}

/* Tyylisuunnat */

.thi-arvio__styles {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 12px;
}

@media (max-width: 700px) {
	.thi-arvio__styles {
		grid-template-columns: repeat(2, 1fr);
	}
}

.thi-arvio__style {
	display: flex;
	position: relative;
	flex-direction: column;
	padding: 10px 10px 12px;
	border: 1px solid var(--thi-arvio-line);
	border-radius: var(--thi-arvio-radius);
	background: var(--thi-arvio-card);
	cursor: pointer;
	transition: border-color 150ms ease;
}

.thi-arvio__style:has(:checked) {
	border-color: var(--thi-arvio-green);
}

.thi-arvio__style-img {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 10px;
	border-radius: 12px;
	height: 100px;
    object-fit: contain;
}

.thi-arvio__style-name {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 15px;
}

.thi-arvio__style-name::before {
	content: "";
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	border: 1px solid #A9A9A9;
	border-radius: 50%;
	background: #fff;
}

.thi-arvio__style:has(:checked) .thi-arvio__style-name::before {
	border-color: var(--thi-arvio-green);
	background: var(--thi-arvio-green);
	box-shadow: inset 0 0 0 2px #fff;
}

.thi-arvio__style-desc {
	margin: 14px 0 0;
	color: var(--thi-arvio-dark);
	font-size: 15px;
	line-height: 1.6;
}

.thi-arvio__style-link {
	color: var(--thi-arvio-green);
	font-weight: 600;
	text-decoration: underline;
}

/* CTA */

.thi-arvio__actions {
	margin-top: clamp(24px, 3vw, 36px);
}

.thi-arvio__cta,
.thi-arvio__submit {
	/*padding: 18px 32px;*/
	padding: 12px 20px;
	border: 1px solid #37592C;
	border-radius: 999px;
	background: var(--thi-arvio-green);
	color: #fff;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 150ms ease;
	font-size: 12px;
    font-weight: 600;
}

.thi-arvio__cta:hover,
.thi-arvio__submit:hover {
	background: #37592C;
	color: #37592C;
	background-color: transparent;
}

.thi-arvio__cta[hidden] {
	display: none;
}

.thi-arvio__submit[disabled] {
	opacity: 0.6;
	cursor: default;
}

.thi-arvio__price {
	margin: 0;
	font-size: clamp(34px, 5vw, 56px);
	font-weight: 400;
	line-height: 1;
	text-align: right;
	white-space: nowrap;
}

@media (max-width: 560px) {
	.thi-arvio__price {
		text-align: left;
	}
}

/* Lead form */

.thi-arvio__lead {
	margin-top: clamp(24px, 3vw, 40px);
	padding-top: clamp(24px, 3vw, 40px);
	border-top: 1px solid var(--thi-arvio-line);
}

.thi-arvio__lead[hidden] {
	display: none;
}

.thi-arvio__lead-title {
	margin: 0 0 6px;
	font-size: 22px;
	font-weight: 400;
}

.thi-arvio__lead-intro {
	margin: 0 0 20px;
	color: var(--thi-arvio-muted);
}

.thi-arvio__fields {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

@media (max-width: 700px) {
	.thi-arvio__fields {
		grid-template-columns: 1fr;
	}
}

.thi-arvio__field span {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
}

.thi-arvio__field input {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--thi-arvio-line);
	border-radius: 16px;
	background: #fff;
	color: inherit;
	font: inherit;
}

.thi-arvio__field input:focus-visible {
	outline: 2px solid var(--thi-arvio-green);
	outline-offset: 2px;
}

.thi-arvio__consent {
	display: flex;
	gap: 10px;
	margin-top: 20px;
	font-size: 14px;
	line-height: 1.5;
}

.thi-arvio__consent a {
	color: var(--thi-arvio-green);
}

.thi-arvio__lead-actions {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 20px;
}

.thi-arvio__status:empty {
	display: none;
}

.thi-arvio__status {
	margin: 0;
	color: var(--thi-arvio-muted);
	font-size: 14px;
}

.thi-arvio__done {
	margin: clamp(24px, 3vw, 40px) 0 0;
	padding-top: clamp(24px, 3vw, 40px);
	border-top: 1px solid var(--thi-arvio-line);
	color: var(--thi-arvio-green);
	font-weight: 600;
}

/* Honeypot: off-screen rather than display:none, which some bots skip. */
.thi-arvio__hp {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.thi-arvio__errata {
	margin: clamp(24px, 3vw, 40px) 0 0;
	color: var(--thi-arvio-muted);
	font-size: 13px;
	line-height: 1.6;
}
