/**
 * Nova Quote Calculator,
 front end.
 *
 * Built to match the retired Calculator Studio form: Poppins,
 ink #282b3e,
 * borders #d7d7db,
 Nova red #d4000f. Everything is scoped under .nqc so it cannot
 * leak into the Uncode theme.
 */

.nqc {
	--nqc-red: #d4000f;
	--nqc-red-dark: #ae000c;
	--nqc-ink: #282b3e;
	--nqc-line: #d7d7db;
	--nqc-track: #d0d0d5;
	--nqc-field: #fff;
	--nqc-radius: 3px;
	--nqc-xlarge: 334px;
	--nqc-col-gap: 48px;
	--nqc-field-gap: 19px;

	color: var(--nqc-ink);
	font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	max-width: 1040px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
}

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

.nqc p,
 .nqc h2,
 .nqc fieldset,
 .nqc label,
 .nqc output {
	float: none;
	letter-spacing: normal;
	text-transform: none;
}

.nqc .nqc-row {
	clear: both;
}

.nqc .nqc-title {
	color: var(--nqc-ink);
	font-size: 1.4rem;
	margin: 0 0 14px;
}

.nqc .nqc-spec {
	background: var(--nqc-red);
	border-radius: var(--nqc-radius);
	color: #fff;
	font-weight: 600;
	margin: 0 0 24px;
	padding: 10px 16px;
	text-align: center;
}

/* Rows and columns */

.nqc .nqc-row {
	display: grid;
	gap: 0 var(--nqc-col-gap);
	margin: 0;
}

@media (min-width: 782px) {
	.nqc-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.nqc-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.nqc .nqc-col {
	min-width: 0;
}

/* Fields */

.nqc .nqc-field {
	margin: 0 0 var(--nqc-field-gap);
	width: 100%;
}

.nqc .nqc-w-x-large {
	max-width: var(--nqc-xlarge);
}

.nqc .nqc-label {
	color: var(--nqc-ink);
	display: block;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	margin: 0 0 6px;
}

.nqc .nqc-label-empty {
	display: none;
}

.nqc .nqc-input,
 .nqc .nqc-select {
	background: var(--nqc-field);
	border: 1px solid var(--nqc-line);
	border-radius: var(--nqc-radius);
	color: var(--nqc-ink);
	display: block;
	font-family: inherit;
	font-size: 14px;
	height: 30px;
	line-height: 1.4;
	padding: 3px 11px;
	width: 100%;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nqc .nqc-select {
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #6f7280 50%),
		linear-gradient(135deg, #6f7280 50%, transparent 50%);
	background-position: calc(100% - 16px) 54%, calc(100% - 11px) 54%;
	background-repeat: no-repeat;
	background-size: 5px 5px, 5px 5px;
	cursor: pointer;
	padding-right: 32px;
}

.nqc .nqc-input:focus,
 .nqc .nqc-select:focus {
	border-color: var(--nqc-red);
	box-shadow: 0 0 0 2px rgba(212, 0, 15, 0.15);
	outline: none;
}

.nqc .nqc-field-error .nqc-input,
 .nqc .nqc-field-error .nqc-select {
	background: #fff7f7;
	border-color: var(--nqc-red);
}

/* Quantity slider. Track with ticks,
 then the value centred underneath. */

.nqc .nqc-field-quantity {
	margin-bottom: 10px;
}

.nqc .nqc-range {
	appearance: none;
	background: transparent;
	display: block;
	margin: 6px 0 0;
	width: 100%;
}

.nqc .nqc-range::-webkit-slider-runnable-track {
	background-color: var(--nqc-track);
	background-image: repeating-linear-gradient(
		to right,
		#fff 0,
		#fff 1px,
		transparent 1px,
		transparent calc(100% / 19)
	);
	border-radius: 2px;
	height: 4px;
}

.nqc .nqc-range::-moz-range-track {
	background-color: var(--nqc-track);
	background-image: repeating-linear-gradient(
		to right,
		#fff 0,
		#fff 1px,
		transparent 1px,
		transparent calc(100% / 19)
	);
	border-radius: 2px;
	height: 4px;
}

.nqc .nqc-range::-webkit-slider-thumb {
	appearance: none;
	background: var(--nqc-red);
	border: none;
	border-radius: 50%;
	height: 15px;
	margin-top: -5.5px;
	width: 15px;
}

.nqc .nqc-range::-moz-range-thumb {
	background: var(--nqc-red);
	border: none;
	border-radius: 50%;
	height: 15px;
	width: 15px;
}

.nqc .nqc-range:focus-visible {
	outline: 2px solid var(--nqc-red);
	outline-offset: 6px;
}

.nqc .nqc-qty-value {
	color: var(--nqc-ink);
	display: block;
	font-size: 14px;
	margin-top: 10px;
	text-align: center;
}

/* Selection notice,
 for example the auto doors message. */

.nqc .nqc-notice {
	color: var(--nqc-ink);
	font-size: 14px;
	font-weight: 400;
	margin: 0 0 var(--nqc-field-gap);
}

/* Cost */

.nqc .nqc-cost {
	align-items: baseline;
	color: var(--nqc-ink);
	column-gap: 9px;
	display: flex;
	flex-wrap: wrap;
	font-family: inherit;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.3;
	margin: 22px 0 12px;
}

.nqc .nqc-cost-prefix,
 .nqc .nqc-cost-suffix {
	font-weight: 700;
}

.nqc .nqc-total {
	color: var(--nqc-red);
	font-size: 30px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.nqc .nqc-disclaimer {
	color: var(--nqc-ink);
	font-size: 15px;
	margin: 0 0 20px;
}

.nqc .nqc-disclaimer strong {
	font-weight: 700;
}

/* Submit */

.nqc .nqc-actions {
	margin: 0;
}

.nqc .nqc-submit {
	background: var(--nqc-red) !important;
	background-image: none !important;
	border: none !important;
	border-radius: 100px !important;
	box-shadow: none !important;
	color: #fff !important;
	letter-spacing: 0.02em !important;
	text-shadow: none !important;
	text-transform: none !important;
	cursor: pointer;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	padding: 7px 17px;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.nqc .nqc-submit:hover:not(:disabled),
 .nqc .nqc-submit:focus:not(:disabled) {
	background: var(--nqc-red-dark) !important;
	color: #fff !important;
}

.nqc .nqc-submit:disabled {
	cursor: default;
	opacity: 0.6;
}

.nqc .nqc-submit:focus-visible {
	outline: 2px solid var(--nqc-ink);
	outline-offset: 3px;
}

/* Optional breakdown,
 off unless the shortcode asks for it. */

.nqc .nqc-breakdown-toggle-wrap {
	margin: 0 0 12px;
}

.nqc .nqc-toggle-breakdown {
	background: none;
	border: none;
	color: var(--nqc-red);
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	padding: 0;
	text-decoration: underline;
}

.nqc .nqc-breakdown {
	margin: 0 0 20px;
	max-width: 720px;
}

.nqc .nqc-breakdown-table {
	border-collapse: collapse;
	width: 100%;
}

.nqc .nqc-breakdown-table th,
 .nqc .nqc-breakdown-table td {
	border-bottom: 1px solid var(--nqc-line);
	color: var(--nqc-ink);
	font-size: 14px;
	font-weight: 400;
	padding: 8px 4px;
	text-align: left;
}

.nqc .nqc-amount {
	font-variant-numeric: tabular-nums;
	text-align: right;
	white-space: nowrap;
}

.nqc .nqc-row-total th,
 .nqc .nqc-row-total td {
	border-bottom: none;
	font-weight: 700;
}

/* Messages */

.nqc .nqc-message {
	border-radius: var(--nqc-radius);
	font-size: 14px;
	font-weight: 600;
	margin: 14px 0 0;
	max-width: 720px;
	padding: 11px 15px;
}

.nqc .nqc-message-success {
	background: #e8f6ec;
	border-left: 4px solid #1f8a45;
}

.nqc .nqc-message-error {
	background: #fdecec;
	border-left: 4px solid var(--nqc-red);
}

/* Honeypot and screen reader text */

.nqc .nqc-hp {
	height: 0;
	left: -9999px;
	overflow: hidden;
	position: absolute;
	width: 0;
}

.nqc .screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

/* Small screens */

@media (max-width: 781px) {
	.nqc {
		--nqc-col-gap: 0px;
	}

	.nqc .nqc-w-x-large {
		max-width: 100%;
	}

	.nqc-cost,
	.nqc .nqc-total {
		font-size: 24px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nqc * {
		transition: none !important;
	}
}

/* Notice colour variants. The original picks these per calculator. */

.nqc .nqc-notice-red {
	color: var(--nqc-red);
	font-weight: 600;
}

.nqc .nqc-notice-ink {
	color: var(--nqc-ink);
	font-weight: 400;
}

/* Password panel shown in place of a locked calculator. */

.nqc .nqc-lock-panel {
	border: 1px solid var(--nqc-line);
	border-radius: var(--nqc-radius);
	max-width: 460px;
	padding: 24px 26px 22px;
}

.nqc .nqc-lock-heading {
	color: var(--nqc-ink);
	font-family: inherit;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 8px;
}

.nqc .nqc-lock-message {
	color: var(--nqc-ink);
	font-size: 14px;
	margin: 0 0 18px;
}

.nqc .nqc-lock-panel .nqc-actions {
	margin-top: 4px;
}
