.acd-calc {
	--acd-accent: #1f6feb;
	--acd-ink: #1b1f24;
	--acd-muted: #5b6470;
	--acd-line: #dfe3e8;
	--acd-bg: #f6f8fa;
	--acd-scale: 1.2;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
	gap: 32px;
	align-items: start;
	color: var(--acd-ink);
	font-size: 15px;
	line-height: 1.4;
}
@media (max-width: 820px) { .acd-calc { grid-template-columns: minmax(0, 1fr); } }

.acd-calc *, .acd-calc *::before, .acd-calc *::after { box-sizing: border-box; }
.acd-calc label { display: block; font-weight: 600; font-size: 13px; color: var(--acd-muted); }
.acd-calc input[type=text], .acd-calc input[type=number], .acd-calc select {
	display: block; width: 100%; min-width: 0; margin-top: 4px; padding: 9px 10px;
	border: 1px solid var(--acd-line); border-radius: 6px; font-size: 15px; color: var(--acd-ink); background: #fff;
}
.acd-calc input:focus, .acd-calc select:focus { outline: 2px solid var(--acd-accent); outline-offset: -1px; border-color: transparent; }

.acd-row { display: grid; gap: 14px; margin-bottom: 14px; }
.acd-row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 480px) { .acd-row-2 { grid-template-columns: minmax(0, 1fr); } }

.acd-location-list { display: grid; gap: 10px; }
.acd-loc {
	display: grid; grid-template-columns: 28px 1fr 90px; gap: 10px 12px; align-items: end;
	padding: 12px; border: 1px solid var(--acd-line); border-radius: 8px; background: var(--acd-bg);
}
.acd-loc-num {
	width: 28px; height: 28px; border-radius: 50%; background: var(--acd-accent); color: #fff;
	display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; align-self: center;
}
.acd-loc .acd-loc-flash-wrap { grid-column: 2 / -1; font-weight: 500; color: var(--acd-ink); font-size: 14px; cursor: pointer; }
.acd-loc .acd-loc-flash-wrap input { margin-right: 4px; }
.acd-loc-msg { grid-column: 2 / -1; color: #b42318; font-size: 13px; }
.acd-loc-msg:empty { display: none; }
.acd-loc-bad { border-color: #f04438; background: #fff5f4; }

.acd-quote {
	background: #fff; border: 1px solid var(--acd-line); border-radius: 10px; padding: 22px;
	border-top: 5px solid var(--acd-accent);
}
.acd-quote.acd-exporting { border-radius: 0; }
.acd-q-company { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--acd-accent); }
.acd-q-title { font-size: 20px; font-weight: 700; margin: 2px 0 8px; }
.acd-q-meta { font-size: 13px; color: var(--acd-muted); display: flex; flex-wrap: wrap; gap: 4px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--acd-line); }
.acd-q-table { width: 100%; border-collapse: collapse; table-layout: auto; margin: 14px 0; font-size: 14px; }
.acd-q-table th { white-space: nowrap; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--acd-muted); padding: 6px 4px; border-bottom: 1px solid var(--acd-line); }
.acd-q-table th:last-child, .acd-num { text-align: right; font-variant-numeric: tabular-nums; }
.acd-q-table td { padding: 8px 4px; border-bottom: 1px solid var(--acd-line); }
.acd-q-summary { display: grid; gap: 6px; }
.acd-q-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.acd-q-strong { font-weight: 700; }
.acd-q-total { margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--acd-ink); font-size: 18px; font-weight: 800; }
.acd-q-hint { margin: 14px 0 0; padding: 8px 10px; border-radius: 6px; background: var(--acd-bg); font-size: 13px; }
.acd-q-footer { margin: 14px 0 0; font-size: 12px; color: var(--acd-muted); }
.acd-q-empty { color: var(--acd-muted); margin: 14px 0 0; }
.acd-q-error { color: #b42318; font-weight: 600; margin: 14px 0 0; }

.acd-export { display: flex; gap: 10px; margin-top: 12px; }
.acd-btn {
	flex: 1; padding: 11px 14px; border: 0; border-radius: 6px; cursor: pointer;
	background: var(--acd-accent); color: #fff; font-weight: 700; font-size: 14px;
}
.acd-btn:disabled { opacity: .4; cursor: not-allowed; }

.acd-q-table th.acd-num { text-align: right; }
.acd-q-linetotal { font-weight: 700; }
.acd-q-allin { font-size: 13px; color: var(--acd-muted); }
@media (max-width: 480px) { .acd-q-table { font-size: 12px; } .acd-q-table th, .acd-q-table td { padding: 6px 2px; } }
.acd-q-table td.acd-num { white-space: nowrap; }
.acd-q-table th + th, .acd-q-table td + td { padding-left: 10px; }
@media (max-width: 480px) {
	.acd-quote { padding: 16px 12px; }
	.acd-q-table th { white-space: normal; font-size: 10px; letter-spacing: 0; }
	.acd-q-table th + th, .acd-q-table td + td { padding-left: 6px; }
	.acd-q-title { font-size: 18px; }
}

/*
 * Width. Block themes (Twenty Twenty-Five etc.) clamp every content child to
 * --wp--style--global--content-size with !important auto margins, and their
 * container is full width, so 100% != the text column. Base the width on the
 * theme's content size when it exists, else on the parent column (classic
 * themes), scale it, never exceed the screen, and center it — overriding the
 * theme's !important margins with a more specific, later-loaded rule.
 */
.acd-calc.acd-calc {
	--acd-w: min(
		calc(var(--wp--style--global--content-size, 100%) * var(--acd-scale)),
		calc(100% * var(--acd-scale)),
		calc(100vw - 32px)
	);
	width: var(--acd-w) !important;
	max-width: none !important;
	margin-left: calc((100% - var(--acd-w)) / 2) !important;
	margin-right: 0 !important;
}

/* Quote table: let headers wrap rather than push past the card; keep prices on one line. */
.acd-calc .acd-q-table th { white-space: normal; }
.acd-calc .acd-q-table td.acd-num { white-space: nowrap; }
