/**
 * Grout Calculator.
 * All class names are prefixed with "tvc-" so they never clash with the theme.
 */

.tvc-calculator {
	margin: 2em 0;
	color: #243746;
}

.tvc-calculator__title {
	margin: 0 0 1em;
	font-weight: 700;
}

.tvc-calculator__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1em 1.5em;
}

.tvc-calculator__field {
	margin: 0;
}

.tvc-calculator__field--full {
	grid-column: 1 / -1;
}

.tvc-calculator__label {
	display: block;
	margin-bottom: 0.4em;
	font-size: 0.95em;
	font-weight: 600;
}

.tvc-calculator__input {
	width: 100%;
	padding: 0.65em 0.75em;
	border: 1px solid #c9d1d9;
	border-radius: 4px;
	background: #fff;
	font-size: 1em;
	box-sizing: border-box;
}

.tvc-calculator__input:focus {
	border-color: #243746;
	outline: 2px solid #243746;
	outline-offset: 1px;
}

.tvc-calculator__actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.75em;
	margin-top: 1.25em;
}

.tvc-button {
	padding: 0.7em 1.9em;
	border: 1px solid #243746;
	border-radius: 4px;
	font-size: 1em;
	cursor: pointer;
}

.tvc-button--calculate {
	background: #243746;
	color: #fff;
}

.tvc-button--calculate:hover {
	background: #16232e;
}

.tvc-button--calculate:disabled {
	opacity: 0.6;
	cursor: wait;
}

.tvc-button--reset {
	background: #fff;
	color: #243746;
}

.tvc-button--reset:hover {
	background: #f0f2f4;
}

.tvc-calculator__message {
	margin-top: 1em;
}

.tvc-calculator__message--error {
	color: #a00;
	font-weight: 600;
}

.tvc-calculator__results {
	margin-top: 1.5em;
}

.tvc-results__table {
	width: 100%;
	border-collapse: collapse;
}

.tvc-results__table th,
.tvc-results__table td {
	border: 1px solid #dfe3e8;
	padding: 0.7em 0.9em;
	text-align: left;
	vertical-align: middle;
}

.tvc-results__table thead th {
	background: #243746;
	color: #fff;
	font-weight: 600;
}

.tvc-results__table tbody th {
	width: 55%;
	background: #f6f7f9;
	font-weight: 600;
}

.tvc-results__note {
	margin-top: 0.8em;
	font-size: 0.9em;
	color: #6b7280;
	text-align: center;
}

@media (max-width: 600px) {
	.tvc-calculator__grid {
		grid-template-columns: 1fr;
	}

	.tvc-calculator__actions {
		justify-content: stretch;
	}

	.tvc-button {
		flex: 1;
	}
}

/* Result values are short numbers; keep each on a single line. */
.tvc-results__table td {
	white-space: nowrap;
}
