/**
 * Paper consumption calculator (inc/paper-calculator.php).
 * Fonts, greys and card radius follow the brand and category cards. Small red
 * text uses the darker #ec2227 (contrast 5.8:1 on white).
 */

.es-calc {
	font-family: Montserrat, sans-serif;
	color: #000;
}

.es-calc-form {
	padding: 32px;
	border-radius: 15px;
	background: #eeeeee;
}

.es-calc-field {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.es-calc-field legend,
.es-calc-field label {
	display: block;
	margin-bottom: 10px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.es-calc-places {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.es-calc .es-calc-place,
.es-calc .es-calc-place:focus {
	min-height: 44px;
	padding: 10px 20px;
	border: 1px solid #ec2227;
	border-radius: 999px;
	background: #fff;
	color: #ec2227;
	font-family: "Krona One", sans-serif;
	font-size: 13px;
	line-height: 18px;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}

.es-calc .es-calc-place:not(.is-active):hover {
	background: #fdecec;
	color: #a8151a;
}

.es-calc .es-calc-place.is-active {
	background: #ec2227;
	color: #fff;
}

.es-calc .es-calc-place:focus-visible,
.es-calc .es-calc-add:focus-visible,
.es-calc .es-calc-btn:focus-visible,
.es-calc a:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}

.es-calc-inputs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 240px));
	gap: 24px;
	margin-top: 28px;
}

.es-calc-field[hidden],
.es-calc-school-note[hidden] {
	display: none;
}

.es-calc-school-note {
	margin: 16px 0 0;
	color: #555;
	font-size: 14px;
}

.es-calc input[type="number"],
.es-calc-offer input {
	width: 100%;
	padding: 8px 0;
	border: 0;
	border-bottom: 1px solid #767676;
	border-radius: 0;
	background: transparent;
	color: #000;
	font-family: Montserrat, sans-serif;
	font-size: 22px;
	font-weight: 600;
	transition: border-color .2s;
}

.es-calc input[type="number"]:hover,
.es-calc-offer input:hover {
	border-bottom-color: #000;
}

.es-calc input[type="number"]:focus,
.es-calc-offer input:focus {
	border-bottom-color: #ec2227;
	box-shadow: 0 1px 0 #ec2227;
	outline: 0;
}

.es-calc input[aria-invalid="true"] {
	border-bottom-color: #ec2227;
}

.es-calc-hint {
	display: block;
	margin-top: 6px;
	color: #a8151a;
	font-size: 13px;
	line-height: 1.5;
}

.es-calc-hint--info {
	color: #555;
}

.es-calc-result {
	margin-top: 48px;
}

.es-calc-result-title,
.es-calc-method h2 {
	margin: 0 0 8px;
	font-family: "Krona One", sans-serif;
	font-size: 24px;
	font-weight: 400;
	line-height: 1.3;
}

.es-calc-basis {
	margin: 0;
	color: #555;
	font-size: 14px;
	line-height: 1.6;
}

.es-calc-empty {
	margin: 16px 0 0;
	color: #555;
}

.es-calc-group {
	margin-top: 28px;
}

.es-calc-group[hidden] {
	display: none;
}

.es-calc-group-title {
	margin: 0 0 14px;
	font-family: Montserrat, sans-serif;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.4;
}

.es-calc-group-title span {
	color: #555;
	font-weight: 400;
}

.es-calc-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

.es-calc-card {
	display: flex;
	gap: 16px;
	padding: 20px 20px 12px;
	border: 1px solid #eeeeee;
	border-radius: 15px;
	background: #fff;
	transition: border-color .2s, box-shadow .2s;
}

.es-calc-card:hover {
	border-color: #dcdcdc;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.es-calc-card-image {
	flex: none;
	width: 80px;
	height: 80px;
	border-radius: 10px;
	background: #f3f3f3;
}

.es-calc-card-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.es-calc-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.es-calc-card-name {
	color: #000;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
}

a.es-calc-card-name:hover {
	color: #ec2227;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.es-calc-card-amount {
	margin: 10px 0 2px;
	font-size: 15px;
	line-height: 1.3;
}

.es-calc-card-amount strong {
	color: #ec2227;
	font-family: "Krona One", sans-serif;
	font-size: 24px;
	font-weight: 400;
}

.es-calc-card-detail {
	margin: 0;
	white-space: pre-line;
	color: #555;
	font-size: 13px;
	line-height: 1.5;
}

.es-calc-card-actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	margin-top: auto;
	padding-top: 14px;
}

.es-calc .es-calc-add,
.es-calc .es-calc-btn,
.es-calc .es-calc-btn:focus {
	max-width: 100%;
	min-width: 180px;
	white-space: normal;
	text-align: center;
	min-height: 44px;
	padding: 10px 18px;
	border: 1px solid #ec2227;
	border-radius: 999px;
	background: #ec2227;
	color: #fff;
	font-family: "Krona One", sans-serif;
	font-size: 13px;
	line-height: 18px;
	cursor: pointer;
	transition: background-color .2s, border-color .2s, color .2s;
}

.es-calc .es-calc-add:hover,
.es-calc .es-calc-btn:hover {
	background: #a8151a;
	border-color: #a8151a;
	color: #fff;
}

.es-calc .es-calc-btn--secondary,
.es-calc .es-calc-btn--secondary:focus {
	min-width: 0;
	background: #fff;
	color: #ec2227;
}

.es-calc .es-calc-btn--secondary:hover {
	background: #fdecec;
	border-color: #a8151a;
	color: #a8151a;
}

.es-calc .es-calc-add.is-loading,
.es-calc .es-calc-btn[aria-disabled="true"] {
	cursor: progress;
}

/* Already in the quote with this quantity: a quiet state, not a button look. */
.es-calc .es-calc-add.is-added,
.es-calc .es-calc-add.is-added:hover {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border-color: transparent;
	background: #eef6ef;
	color: #1b5e20;
	cursor: default;
}

.es-calc .es-calc-add.is-added::before {
	content: "";
	width: 12px;
	height: 12px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%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 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.es-calc-added {
	/* One line reserved in every card, so the buttons line up across cards. */
	min-height: 20px;
	font-size: 13px;
	line-height: 1.5;
}

.es-calc-added a {
	color: #000;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.es-calc-added a:hover {
	color: #ec2227;
}

.es-calc-added.is-error,
.es-calc-warning {
	color: #a8151a;
}

.es-calc-note {
	margin: 28px 0 0;
	padding: 14px 18px;
	border-radius: 15px;
	background: #eeeeee;
	color: #333;
	font-size: 14px;
	line-height: 1.6;
}

.es-calc-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
}

.es-calc-actions-status {
	color: #1b5e20;
	font-size: 14px;
}

/* "Küsi pakkumist koos hindadega" */
.es-calc-offer {
	margin-top: 24px;
	padding: 32px;
	border-radius: 15px;
	background: #eeeeee;
}

.es-calc-offer[hidden] {
	display: none;
}

.es-calc-offer-title {
	margin: 0 0 8px;
	font-family: "Krona One", sans-serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.3;
}

.es-calc-offer-intro {
	max-width: 70ch;
	margin: 0 0 24px;
	font-size: 15px;
	line-height: 1.6;
}

.es-calc-offer-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 360px));
	gap: 20px 32px;
}

.es-calc-offer-fields[hidden] {
	display: none;
}

.es-calc-offer input {
	font-size: 17px;
	font-weight: 500;
}

.es-calc-offer input[aria-invalid="true"] {
	border-bottom-color: #ec2227;
}

.es-calc-offer label span {
	color: #a8151a;
}

/* Honeypot (inc/paper-calculator-offer.php). */
.es-calc-offer-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.es-calc-offer-privacy {
	max-width: 70ch;
	margin: 20px 0 0;
	color: #555;
	font-size: 13px;
	line-height: 1.6;
}

.es-calc-offer-privacy a {
	color: #000;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.es-calc-offer-privacy a:hover {
	color: #ec2227;
}

.es-calc-offer-submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-top: 20px;
}

.es-calc-offer-status {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
}

.es-calc-offer-status.is-error {
	color: #a8151a;
}

.es-calc-offer-status.is-sent {
	color: #1b5e20;
	font-size: 16px;
	font-weight: 600;
}

.es-calc-method {
	margin-top: 48px;
	font-size: 15px;
	line-height: 1.7;
}

.es-calc-method h2 {
	font-size: 20px;
}

.es-calc-method p {
	max-width: 80ch;
	margin: 0 0 10px;
}

.es-calc-method a,
.es-calc-browse a {
	color: #000;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.es-calc-method a:hover {
	color: #ec2227;
}

.es-calc .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Krona One has no Cyrillic letters. */
:lang(ru) .es-calc-place,
:lang(ru) .es-calc-add,
:lang(ru) .es-calc-btn,
:lang(ru) .es-calc-card-amount strong,
:lang(ru) .es-calc-result-title,
:lang(ru) .es-calc-offer-title,
:lang(ru) .es-calc-method h2 {
	font-family: Montserrat, sans-serif;
	font-weight: 700;
}

@media (max-width: 1024px) {
	.es-calc-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.es-calc-form {
		padding: 20px;
	}

	.es-calc-places {
		gap: 8px;
	}

	.es-calc .es-calc-place,
	.es-calc .es-calc-place:focus {
		padding: 10px 16px;
		font-size: 12px;
	}

	.es-calc-inputs {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
		margin-top: 20px;
	}

	.es-calc-offer {
		padding: 20px;
	}

	.es-calc-offer-fields {
		grid-template-columns: minmax(0, 1fr);
	}

	.es-calc-actions .es-calc-btn {
		flex: 1 1 100%;
	}

	.es-calc input[type="number"] {
		font-size: 20px;
	}

	.es-calc-result {
		margin-top: 32px;
	}

	.es-calc-result-title {
		font-size: 20px;
	}

	.es-calc-cards {
		grid-template-columns: minmax(0, 1fr);
	}

	.es-calc-card {
		padding: 16px;
	}

	.es-calc-card-image {
		width: 64px;
		height: 64px;
	}
}

/* "Prindi / salvesta PDF": the form, the results and the note only. */
@media print {
	.elementor-location-header,
	.elementor-location-footer,
	.es-calc-actions,
	.es-calc-offer,
	.es-calc-card-actions,
	.es-calc-method,
	#tawk-default-container,
	iframe {
		display: none !important;
	}

	.es-calc-form,
	.es-calc-note {
		background: none;
		border: 1px solid #ccc;
	}

	.es-calc-card {
		break-inside: avoid;
	}
}
