/* 3D Print Quoting Calculator – front end */
.tdpqc {
	--tdpqc-brand: #1e5f8a;
	--tdpqc-text: #1f2328;
	--tdpqc-muted: #646b75;
	--tdpqc-line: #dfe3e8;
	--tdpqc-bg: #ffffff;
	--tdpqc-soft: #f5f7f9;
	--tdpqc-radius: 10px;
	color: var(--tdpqc-text);
	font-size: 15px;
	line-height: 1.5;
	max-width: 1180px;
	margin: 0 auto;
}
.tdpqc *, .tdpqc *::before, .tdpqc *::after { box-sizing: border-box; }
.tdpqc [hidden] { display: none !important; }
.tdpqc-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 860px) { .tdpqc-grid { grid-template-columns: 1fr; } }
.tdpqc-col { display: grid; gap: 20px; }
.tdpqc-card { background: var(--tdpqc-bg); border: 1px solid var(--tdpqc-line); border-radius: var(--tdpqc-radius); padding: 20px; }
.tdpqc-h { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 17px; font-weight: 600; line-height: 1.3; }
.tdpqc-step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tdpqc-brand); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.tdpqc-muted { color: var(--tdpqc-muted); font-size: 13px; margin: 4px 0 0; }

.tdpqc-mode { display: inline-flex; background: var(--tdpqc-soft); border-radius: 8px; padding: 3px; margin-bottom: 14px; }
.tdpqc-mode-btn { border: 0; background: transparent; padding: 6px 14px; border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer; color: var(--tdpqc-muted); }
.tdpqc-mode-btn.is-active { background: var(--tdpqc-bg); color: var(--tdpqc-text); box-shadow: 0 1px 2px rgba(0,0,0,.08); font-weight: 600; }

.tdpqc-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 280px; padding: 24px; border: 2px dashed var(--tdpqc-line); border-radius: var(--tdpqc-radius); background: var(--tdpqc-soft); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.tdpqc-drop:hover, .tdpqc-drop.is-over { border-color: var(--tdpqc-brand); background: color-mix(in srgb, var(--tdpqc-brand) 6%, var(--tdpqc-soft)); }
.tdpqc-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tdpqc-drop-icon { color: var(--tdpqc-brand); }
.tdpqc-drop-title { font-weight: 600; }
.tdpqc-drop-sub { color: var(--tdpqc-muted); font-size: 13px; }
.tdpqc.is-loading .tdpqc-drop { opacity: .6; cursor: progress; }

.tdpqc-viewer-wrap { position: relative; border: 1px solid var(--tdpqc-line); border-radius: var(--tdpqc-radius); background: linear-gradient(180deg, #fbfcfd, #eef1f4); overflow: hidden; }
.tdpqc-viewer { display: block; width: 100%; height: 340px; cursor: grab; }
.tdpqc-viewer:active { cursor: grabbing; }
.tdpqc-viewer-hint { position: absolute; left: 12px; bottom: 8px; font-size: 12px; color: var(--tdpqc-muted); pointer-events: none; }
.tdpqc-clear { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--tdpqc-line); background: #fff; font-size: 18px; line-height: 1; cursor: pointer; color: var(--tdpqc-muted); }
.tdpqc-clear:hover { color: #b32d2e; }

.tdpqc-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; align-items: end; }
.tdpqc-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tdpqc label, .tdpqc-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; color: var(--tdpqc-text); margin: 0; }
.tdpqc-field + .tdpqc-field, .tdpqc-card > .tdpqc-field { margin-top: 12px; }
.tdpqc-card > .tdpqc-field:first-of-type { margin-top: 0; }
.tdpqc input[type="text"], .tdpqc input[type="email"], .tdpqc input[type="tel"], .tdpqc input[type="number"], .tdpqc select, .tdpqc textarea {
	width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--tdpqc-line); border-radius: 7px; background: #fff; font: inherit; font-size: 14px; font-weight: 400; color: var(--tdpqc-text); margin: 0;
}
.tdpqc input:focus, .tdpqc select:focus, .tdpqc textarea:focus { outline: 2px solid color-mix(in srgb, var(--tdpqc-brand) 35%, transparent); border-color: var(--tdpqc-brand); }
.tdpqc label.tdpqc-check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; min-height: 40px; }
.tdpqc-check input { width: 18px; height: 18px; accent-color: var(--tdpqc-brand); }

.tdpqc-error { margin-top: 12px; padding: 10px 12px; border-radius: 7px; background: #fdecec; color: #8a1c1c; font-size: 14px; }
.tdpqc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 16px 0 0; }
.tdpqc-stats div { background: var(--tdpqc-soft); border-radius: 8px; padding: 10px 12px; }
.tdpqc-stats dt { font-size: 12px; color: var(--tdpqc-muted); margin: 0; }
.tdpqc-stats dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }

.tdpqc-price-card { border-color: color-mix(in srgb, var(--tdpqc-brand) 30%, var(--tdpqc-line)); }
.tdpqc-total { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--tdpqc-brand); font-variant-numeric: tabular-nums; }
.tdpqc-total-wrap { margin-bottom: 14px; }
.tdpqc-fit-warning { margin-bottom: 12px; padding: 10px 12px; border-radius: 7px; background: #fff6e5; color: #7a4d00; font-size: 13px; }
.tdpqc-breakdown { width: 100%; border-collapse: collapse; font-size: 14px; margin: 0 0 14px; }
.tdpqc-breakdown td { padding: 6px 0; border: 0; border-bottom: 1px solid var(--tdpqc-line); background: none; }
.tdpqc-breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tdpqc-breakdown tr.is-sub td { font-weight: 600; }
.tdpqc-breakdown tr.is-save td { color: #17803d; }
.tdpqc-disclaimer { font-size: 12px; color: var(--tdpqc-muted); margin: 0 0 14px; }

.tdpqc-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--tdpqc-brand); color: #fff; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; transition: filter .15s; }
.tdpqc-btn:hover { filter: brightness(1.08); }
.tdpqc-btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.tdpqc-form { margin-top: 4px; display: grid; gap: 0; }
.tdpqc-form > .tdpqc-field { margin-top: 12px; }
.tdpqc-form .tdpqc-btn { margin-top: 16px; }
.tdpqc-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.tdpqc-form-msg { margin-top: 10px; font-size: 14px; }
.tdpqc-form-msg.is-error { color: #8a1c1c; }
.tdpqc-form-msg.is-success { padding: 12px; border-radius: 8px; background: #e9f7ef; color: #14532d; font-weight: 500; }
.tdpqc-stats > div:first-child { grid-column: span 2; }
