/**
 * Athestate Cost Calculator.
 *
 * Styling is scoped to .as-calc so the Houzez theme is untouched.
 *
 * @package Athestate
 */

.as-calc {
	--as-navy: #0a1f3d;
	--as-ink: #1f2937;
	--as-muted: #5c6773;
	--as-bronze: #8c6a3f;
	--as-bronze-tint: #f6f1e8;
	--as-rule: #d9d3c8;
	--as-paper-2: #faf8f4;
	--as-warn: #9a5b12;
	--as-warn-tint: #fcf4e7;
	--as-bad: #9b2c2c;

	max-width: 860px;
	color: var(--as-ink);
	font-size: 15px;
	line-height: 1.55;
}

.as-calc__intro {
	margin: 0 0 22px;
	padding: 14px 16px;
	background: var(--as-paper-2);
	border-left: 4px solid var(--as-bronze);
	color: #3b2e19;
	font-size: 14px;
}

.as-calc__group {
	margin: 0 0 26px;
	padding: 0;
	border: 0;
}

.as-calc__group legend {
	padding: 0;
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--as-bronze);
	border-bottom: 1px solid var(--as-rule);
	width: 100%;
	padding-bottom: 8px;
}

.as-calc__optional {
	font-weight: 400;
	letter-spacing: 0.06em;
	color: var(--as-muted);
	text-transform: none;
}

.as-calc__row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 12px;
	margin-bottom: 12px;
}

.as-calc__row label {
	flex: 1 1 260px;
	font-size: 14px;
	font-weight: 600;
	color: var(--as-navy);
}

.as-calc__row input[type="number"],
.as-calc__row input[type="date"],
.as-calc__row select {
	flex: 0 1 220px;
	min-width: 180px;
	padding: 9px 11px;
	font-size: 15px;
	font-family: inherit;
	color: var(--as-ink);
	background: #fff;
	border: 1px solid #c9c9c9;
	border-radius: 3px;
}

.as-calc__row input:focus,
.as-calc__row select:focus {
	outline: 2px solid var(--as-bronze);
	outline-offset: 1px;
	border-color: var(--as-bronze);
}

.as-calc__row--check label {
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 9px;
}

.as-calc__row--check input {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	accent-color: var(--as-bronze);
}

.as-calc__hint {
	display: block;
	font-weight: 400;
	font-size: 12.5px;
	color: var(--as-muted);
	margin-top: 2px;
}

.as-calc__note {
	margin: 4px 0 14px;
	font-size: 13px;
	color: var(--as-muted);
}

.as-calc__submit {
	display: inline-block;
	padding: 12px 30px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #fff;
	background: var(--as-navy);
	border: 0;
	border-radius: 3px;
	cursor: pointer;
}

.as-calc__submit:hover,
.as-calc__submit:focus {
	background: #14315a;
	color: #fff;
}

.as-calc__results {
	margin-top: 30px;
}

.as-calc__box {
	margin-bottom: 26px;
	border: 1px solid var(--as-rule);
	border-radius: 4px;
	overflow: hidden;
}

.as-calc__box h3 {
	margin: 0;
	padding: 13px 18px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fff;
	background: var(--as-navy);
}

.as-calc__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.as-calc__table th,
.as-calc__table td {
	padding: 11px 18px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid #edeae4;
}

.as-calc__table th {
	width: 46%;
	font-weight: 500;
	color: var(--as-ink);
}

.as-calc__table tr:last-child th,
.as-calc__table tr:last-child td {
	border-bottom: 0;
}

.as-calc__val {
	width: 22%;
	text-align: right;
	font-weight: 700;
	color: var(--as-navy);
	white-space: nowrap;
}

.as-calc__sub {
	width: 32%;
	font-size: 12.5px;
	color: var(--as-muted);
}

.as-calc__total {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 12px;
	padding: 16px 18px;
	background: var(--as-bronze-tint);
	border-top: 1px solid var(--as-rule);
	font-size: 15px;
	font-weight: 600;
	color: var(--as-navy);
}

.as-calc__total strong {
	font-size: 21px;
	margin-left: auto;
}

.as-calc__pct {
	font-size: 13px;
	font-weight: 500;
	color: var(--as-muted);
}

.as-calc__warn {
	margin-bottom: 26px;
	padding: 15px 18px;
	background: var(--as-warn-tint);
	border-left: 4px solid var(--as-warn);
	font-size: 14px;
	color: #4a3410;
}

.as-calc__warn strong {
	display: block;
	margin-bottom: 6px;
}

.as-calc__warn p {
	margin: 6px 0 0;
}

.as-calc__warn-diff {
	font-weight: 600;
}

.as-calc__disclaimer {
	margin-top: 26px;
	padding: 15px 18px;
	background: var(--as-paper-2);
	border: 1px solid var(--as-rule);
	font-size: 13px;
	color: var(--as-muted);
}

.as-calc__disclaimer strong {
	display: block;
	margin-bottom: 6px;
	color: var(--as-ink);
}

.as-calc__disclaimer p {
	margin: 0;
}

@media (max-width: 640px) {
	.as-calc__row label,
	.as-calc__row input[type="number"],
	.as-calc__row input[type="date"],
	.as-calc__row select {
		flex: 1 1 100%;
	}

	.as-calc__table th,
	.as-calc__table td {
		display: block;
		width: auto;
		padding: 8px 14px;
		text-align: left;
	}

	.as-calc__table tr {
		display: block;
		border-bottom: 1px solid #edeae4;
		padding: 8px 0;
	}

	.as-calc__val {
		text-align: left;
	}

	.as-calc__total strong {
		margin-left: 0;
	}
}
