/* Hintalaskurin julkiset tyylit. Korostusväri tulee muuttujasta --hlask-accent.
   Mitat ja fonttikoot vastaavat vanhaa BoldThemes-laskuria (style.css 3.0.4). */

.hlask {
	--hlask-accent-fallback: #54a9ff;
	max-width: 100%;
}

.hlask-kysymys {
	display: grid;
	grid-template-columns: minmax(140px, 220px) 1fr;
	gap: 1rem 1.5rem;
	align-items: start;
	margin-bottom: 1.75rem;
}

.hlask-otsikko {
	font-weight: 500;
	line-height: 1.4;
}

.hlask select {
	width: 100%;
	min-height: 38px;
	line-height: 2;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: 2px;
	background: #fff;
	font-size: inherit;
	color: #000;
}

.hlask-kuvaus {
	margin: 0.4em 0 0;
	font-size: 0.875em;
	color: #666;
}

/* Liukusäädin: 20 px rata ja 38 px arvopallo kuten vanhassa. */

.hlask-liuku {
	position: relative;
}

.hlask-liuku-arvo {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	left: 0;
	min-width: 34px;
	width: 38px;
	height: 38px;
	line-height: 38px;
	padding: 0 2px;
	text-align: center;
	background: transparent;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	pointer-events: none;
	z-index: 1;
	box-sizing: border-box;
}

/* Nollataan myös teeman input-tyylit (tausta, reunus, varjo). */
.hlask input[type="range"] {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	cursor: pointer;
}

.hlask input[type="range"]::-webkit-slider-runnable-track {
	height: 20px;
	border-radius: 14px;
	background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0));
	border: 1px solid #ccc;
	box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
	transition: box-shadow 190ms ease;
}

.hlask input[type="range"]:hover::-webkit-slider-runnable-track {
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.hlask input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: var(--hlask-accent, var(--hlask-accent-fallback));
	box-shadow: 0 0 0 rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(0, 0, 0, 0.2) inset;
	transition: box-shadow 190ms ease;
	margin-top: -9px;
}

.hlask input[type="range"]:hover::-webkit-slider-thumb {
	box-shadow: 0 0 0 rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(0, 0, 0, 0.2) inset;
}

.hlask input[type="range"]:active::-webkit-slider-thumb {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(0, 0, 0, 0.2) inset;
}

.hlask input[type="range"]::-moz-range-track {
	height: 20px;
	border-radius: 14px;
	background: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0));
	border: 1px solid #ccc;
	box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
	transition: box-shadow 190ms ease;
}

.hlask input[type="range"]:hover::-moz-range-track {
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.hlask input[type="range"]::-moz-range-thumb {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: none;
	background: var(--hlask-accent, var(--hlask-accent-fallback));
	box-shadow: 0 0 0 rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(0, 0, 0, 0.2) inset;
	transition: box-shadow 190ms ease;
}

.hlask input[type="range"]:hover::-moz-range-thumb {
	box-shadow: 0 0 0 rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(0, 0, 0, 0.2) inset;
}

.hlask input[type="range"]:active::-moz-range-thumb {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(0, 0, 0, 0.2) inset;
}

/* Summapalkki: hinta 22 px tummemmassa kapselissa kuten vanhassa. */

.hlask-summa {
	display: flex;
	justify-content: flex-end;
	align-items: stretch;
	background: var(--hlask-accent, var(--hlask-accent-fallback));
	color: #fff;
	border-radius: 50px;
	margin: 2rem 0 1rem;
	font-weight: bold;
	line-height: 1.8;
}

.hlask-summa-teksti {
	align-self: center;
	margin-right: 1em;
}

.hlask-summa-arvo {
	font-size: 22px;
	line-height: 1.8;
	background: rgba(0, 0, 0, 0.25);
	border-radius: 50px;
	padding: 5px 20px;
	white-space: nowrap;
}

/* Napit: Eteenpäin ääriviivanappi, Lähetä täytetty, molemmat 20 px. */

.hlask-nappi {
	display: inline-block;
	font-family: inherit;
	border-radius: 50px;
	text-transform: uppercase;
	cursor: pointer;
	transition: all 300ms ease;
	white-space: nowrap;
}

.hlask-eteenpain {
	font-size: 20px;
	font-weight: 900;
	line-height: 2.25;
	padding: 0 10px;
	border: 2px solid var(--hlask-accent, var(--hlask-accent-fallback));
	background: transparent;
	color: var(--hlask-accent, var(--hlask-accent-fallback));
}

.hlask-eteenpain:hover {
	background: var(--hlask-accent, var(--hlask-accent-fallback));
	color: #fff;
}

.hlask-laheta {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.5;
	padding: 10px 50px;
	border: none;
	background: var(--hlask-accent, var(--hlask-accent-fallback));
	color: #fff;
}

.hlask-laheta:hover {
	box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.2) inset;
	opacity: 0.85;
}

.hlask-nappi:disabled {
	opacity: 0.5;
	cursor: default;
	box-shadow: none;
}

.hlask-jatka {
	text-align: right;
}

.hlask-laheta-rivi {
	text-align: center;
	margin-top: 1rem;
}

/* Yhteystiedot */

.hlask-rivi {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin-bottom: 1rem;
}

.hlask-yhteystiedot input,
.hlask-yhteystiedot textarea {
	width: 100%;
	min-height: 38px;
	line-height: 2;
	padding: 0 12px;
	border: 1px solid #ccc;
	border-radius: 2px;
	font-size: inherit;
	color: #000;
	background: #fff;
}

.hlask-yhteystiedot textarea {
	min-height: 160px;
	resize: vertical;
}

/* Honeypot piiloon myös ilman JS:ää */

.hlask-www-kentta {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Tilaviesti */

.hlask-viesti {
	margin-top: 1rem;
	padding: 0.8em 1em;
	border-radius: 3px;
	background: #e6f4e6;
	color: #1e4620;
}

.hlask-viesti-virhe {
	background: #fdeaea;
	color: #7a1f1f;
}

@media (max-width: 600px) {
	.hlask-kysymys,
	.hlask-rivi {
		grid-template-columns: 1fr;
	}
}
