/* Taxi Quote Creator - uses the website's own fonts (font-family: inherit) */
.tqc-root, .tqc-root *, .tqc-admin .tqc-preview-box, .tqc-admin .tqc-preview-box * { box-sizing: border-box; }
.tqc-root { display: block; width: 100%; min-width: 0; max-width: 100%; overflow-x: hidden; font-family: inherit; color: #1d2327; font-size: 15px; line-height: 1.45; }
.tqc-root input, .tqc-root textarea, .tqc-root button, .tqc-root select { font-family: inherit; font-size: 14px; }
.tqc-wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.tqc-editor { flex: 1 1 320px; min-width: 0; max-width: 100%; }
.tqc-previewcol { flex: 1 1 420px; min-width: 0; max-width: 100%; position: sticky; top: 12px; }
@media (max-width: 900px) { .tqc-previewcol { position: static; } }
.tqc-previewlabel { font-weight: 600; margin-bottom: 6px; }

.tqc-card { background: #fff; border: 1px solid #dcdfe4; border-radius: 10px; padding: 16px; margin: 0 0 14px; color: #1d2327; }
.tqc-card h3 { margin: 0 0 12px; font-size: 16px; color: #1d2327; }
.tqc-card h4 { margin: 18px 0 4px; font-size: 14px; color: #1d2327; }
.tqc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tqc-f { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.tqc-f.wide { grid-column: 1 / -1; }
.tqc-f > span { font-size: 12.5px; font-weight: 600; color: #50575e; }
.tqc-root input[type=text], .tqc-root input[type=tel], .tqc-root input[type=email], .tqc-root input[type=date],
.tqc-root input:not([type]), .tqc-root textarea {
	width: 100%; padding: 8px 10px; border: 1px solid #c3c4c7; border-radius: 6px; background: #fff; color: #1d2327; margin: 0; min-height: 38px;
}
.tqc-colour { display: flex; gap: 8px; align-items: center; }
.tqc-root .tqc-colour input[type=text] { width: 110px; font-family: monospace; }
.tqc-root input[type=color] { width: 60px; height: 38px; padding: 2px; border: 1px solid #c3c4c7; border-radius: 6px; background: #fff; }
.tqc-root textarea { resize: vertical; }
.tqc-root input:focus, .tqc-root textarea:focus { outline: 2px solid #4a7fbf; outline-offset: 0; border-color: #4a7fbf; }
.tqc-hint { font-size: 13px; color: #6b7076; margin: 6px 0 10px; }

.tqc-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tqc-tab { padding: 9px 16px; border: 1px solid #c3c4c7; background: #fff; color: #1d2327; border-radius: 999px; cursor: pointer; }
.tqc-tab.on { background: #4a7fbf; border-color: #4a7fbf; color: #fff; font-weight: 600; }

.tqc-btn { display: inline-block; padding: 10px 18px; border: 1px solid #4a7fbf; background: #fff; color: #2f5f9a; border-radius: 6px; cursor: pointer; font-weight: 600; text-decoration: none; line-height: 1.2; }
.tqc-btn:hover {
    background: #16a34a !important;
    color: #ffffff !important;
    border-color: #16a34a !important;
}
.tqc-btn:hover { background: #eef4fb; }
.tqc-btn-primary { background: #4a7fbf; color: #fff; }
.tqc-btn-primary:hover { background: #3d6ea8; }
.tqc-btn-sm { padding: 6px 12px; font-size: 13px; }
.tqc-btn-ghost { border-color: #c3c4c7; color: #50575e; }
.tqc-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

.tqc-scroll { overflow-x: auto; border: 1px solid #e2e4e7; border-radius: 6px; }
.tqc-edt { border-collapse: collapse; width: 100%; min-width: 460px; margin: 0; }
.tqc-edt th, .tqc-edt td { border: 1px solid #e2e4e7; padding: 3px; vertical-align: middle; background: #fff; position: relative; }
.tqc-edt th { background: #f3f6fa; }
.tqc-edt input { min-width: 84px; border: 0 !important; border-radius: 0 !important; min-height: 34px !important; padding: 6px !important; background: transparent !important; }
.tqc-edt th input { font-weight: 600; }
.tqc-edt-c input { min-width: 70px; }
.tqc-edt-c td:first-child input { min-width: 140px; }
.tqc-rt { white-space: nowrap; padding: 3px 8px !important; font-weight: 600; font-size: 13px; }
.tqc-x { border: 0; background: transparent; color: #b32d2e; font-size: 18px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.tqc-edt th .tqc-x { position: absolute; top: 0; right: 0; padding: 0 4px; font-size: 14px; }
.tqc-gst { margin-top: 12px; display: flex; gap: 8px; align-items: center; }
.tqc-root .tqc-gst-rate { width: 70px; }
.tqc-grand-live { margin-top: 12px; font-size: 16px; }

.tqc-up { display: flex; align-items: center; gap: 10px; }
.tqc-up img, .tqc-up-empty { width: 84px; height: 56px; object-fit: contain; border: 1px dashed #c3c4c7; border-radius: 6px; background: #fafafa; }
.tqc-up-empty { display: flex; align-items: center; justify-content: center; font-size: 11px; color: #8c8f94; }

.tqc-consent { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: 13.5px; }
.tqc-consent input { margin-top: 3px; width: auto !important; min-height: 0 !important; }
.tqc-status { margin-top: 10px; font-size: 14px; color: #1a7f37; min-height: 20px; }
.tqc-status.bad { color: #b32d2e; }

.tqc-root .tqc-consent input[type=checkbox] {
	-webkit-appearance: checkbox !important;
	appearance: auto !important;
	display: inline-block !important;
	visibility: visible !important;
	opacity: 1 !important;
	position: static !important;
	width: 15px !important;
	height: 15px !important;
	min-height: 0 !important;
	flex: 0 0 18px;
	margin: 2px 0 0 0 !important;
	accent-color: #4a7fbf;
}
.tqc-consent span::before, .tqc-consent span::after { display: none !important; }

/* ---------- small screens ---------- */
.tqc-f { min-width: 0; }
.tqc-root input, .tqc-root textarea { max-width: 100%; min-width: 0; }
@media (max-width: 700px) {
	.tqc-wrap { display: block; }
	.tqc-editor, .tqc-previewcol { width: 100%; max-width: 100%; }
	.tqc-card { padding: 12px; margin-bottom: 12px; }
	.tqc-grid { grid-template-columns: minmax(0, 1fr); }
	.tqc-up { flex-wrap: wrap; }
	.tqc-tab { padding: 8px 12px; }
	.tqc-actions .tqc-btn-primary, .tqc-actions .tqc-btn { flex: 1 1 auto; text-align: center; }
	.tqc-root input[type=date] { display: block; min-width: 0; width: 100%; }
}

/* ---------- preview frame ---------- */
.tqc-preview-box { width: 100%; overflow: hidden; background: #e9ebee; border: 1px solid #dcdfe4; border-radius: 8px; position: relative; }
.tqc-preview-scaler { position: absolute; top: 0; left: 0; width: 794px; transform-origin: 0 0; background: #fff; }
.tqc-preview-box { min-height: 40px; }
.tqc-admin .tqc-preview-box { max-width: 794px; }

/* ---------- the quotation document ---------- */
.tqc-doc { width: 794px; box-sizing: border-box; padding: 20px 35px 50px; background: #fff; color: #1a1a1a; line-height: 1.5; text-align: left; }
.tqc-doc .tqc-t th, .tqc-doc .tqc-t td { font-size: 14px; }
.tqc-doc *, .tqc-doc *::before, .tqc-doc *::after { box-sizing: border-box; }
.tqc-doc-head { display: grid; grid-template-columns: minmax(0, 1fr) 240px minmax(0, 1fr); gap: 10px; align-items: center; }
.tqc-doc-head .c1, .tqc-doc-head .c3 { font-size: 13px; line-height: 1.65; overflow-wrap: anywhere;font-weight:500; }
.tqc-doc-head .c1 { text-align: left; }
.tqc-doc-head .c3 { text-align: right; }
.tqc-doc-head .c2 { text-align: center; min-width: 0; }
.tqc-doc-head .tqc-gst-line { margin-top: 4px; }
.tqc-doc-logo { display: block; margin: 0 auto 5px; max-width: 100%; max-height: 54px; object-fit: contain; }
.tqc-doc-company { font-weight: 800;  line-height: 1.2; overflow-wrap: anywhere; color: #111; text-transform: uppercase;  }
.tqc-doc-rule { height: 4px; background: var(--tqc-accent, #4a7fbf); margin: 14px -35px 0; }
.tqc-doc-title { text-align: center; font-size: 18px; font-weight: 700; margin: 24px 0 16px; color: #111; letter-spacing: .2px; }
.tqc-doc-title::after { content: ""; display: block; width: 56px; height: 3px; background: var(--tqc-accent, #4a7fbf); margin: 8px auto 0; border-radius: 2px; }
.tqc-doc-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 14px; padding: 10px 14px;  background: #f6f8fb; border: 1px solid #e3e8ef; border-radius: 6px; }
.tqc-doc-meta .l { flex: 1 1 55%; }
.tqc-doc-meta .r { flex: 1 1 40%; text-align: right; }
.tqc-doc-subject { margin: 0 0 14px; padding: 8px 12px; background: #f6f8fb; border-left: 4px solid var(--tqc-accent, #4a7fbf); }

.tqc-doc .tqc-t { width: 100%; border-collapse: collapse; margin: 6px 0 14px; }
.tqc-doc .tqc-t th { background: var(--tqc-accent, #4a7fbf); color: var(--tqc-accent-text, #fff); font-weight: 600; border: 1px solid #1a1a1a; padding: 8px 8px; text-align: center; }
.tqc-doc .tqc-t td { border: 1px solid #1a1a1a; padding: 7px 8px; text-align: center; vertical-align: middle; }
.tqc-doc .tqc-t tbody tr:nth-child(even) td { background: #f7f9fc; }
.tqc-doc .tqc-t td:first-child { white-space: nowrap; font-weight: 500; }
.tqc-doc .tqc-sub { font-size: 10.5px; color: #555; margin-top: 2px; }
.tqc-doc .tqc-sec-title { font-weight: 700; margin: 20px 0 8px; font-size: 15px; padding-left: 8px; border-left: 4px solid var(--tqc-accent, #4a7fbf); }
.tqc-doc .tqc-note { font-size: 11.5px; color: #555; margin: 4px 0 8px; }
.tqc-doc .tqc-totals { margin: 6px 0 8px auto; border-collapse: collapse; min-width: 300px; }
.tqc-doc .tqc-totals td { padding: 6px 12px; border: 1px solid #1a1a1a; }
.tqc-doc .tqc-totals td:last-child { text-align: right; }
.tqc-doc .tqc-grand td { font-weight: 700; font-size: 15px; background: var(--tqc-accent, #4a7fbf); color: var(--tqc-accent-text, #fff); }
.tqc-doc .tqc-terms { margin: 4px 0 0; padding-left: 22px; }
.tqc-doc .tqc-terms li { margin: 0 0 4px; }
.tqc-doc-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 28px; min-height: 60px; }
.tqc-doc-foot .l { font-size: 14px; font-weight: 700; }
.tqc-doc-stamp { display: block; max-height: 100px; max-width: 180px; object-fit: contain; margin-left: auto; }
.tqc-doc-powered { text-align: center; font-size: 11px; color: #666; margin-top: 20px; padding-top: 8px; border-top: 1px solid #e3e3e3; }
.tqc-doc-powered a { color: #2f5f9a; }
.tqc-doc-sign { text-align: right; font-weight: 700; margin-top: 4px; line-height: 1.3; }
.tqc-doc-sign span { display: block; font-weight: 400; font-size: 11px; color: #555; }
.tqc-doc-tagline { font-size: 11px; font-style: italic; color: #555; margin-top: 3px; line-height: 1.3; overflow-wrap: anywhere; }
/* ---------- print ---------- */
#tqc-print-root { display: none; }
@media print {
	@page { size: A4; margin: 20px 10mm 50px; }
	body.tqc-printing > *:not(#tqc-print-root) { display: none !important; }
	body.tqc-printing #tqc-print-root { display: block !important; position: static !important; }
	body.tqc-printing { background: #fff !important; margin: 0 !important; padding: 0 !important; }
	#tqc-print-root .tqc-doc { width: 100% !important; padding: 0 !important; }
	#tqc-print-root .tqc-doc-rule { margin-left: 0; margin-right: 0; }
	#tqc-print-root .tqc-doc-head { grid-template-columns: minmax(0, 1fr) 36% minmax(0, 1fr); }
	#tqc-print-root, #tqc-print-root * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.tqc-nb { break-inside: avoid; page-break-inside: avoid; }
}

.tqc-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid #e2e4e7; font-size: 12px; color: #6b7076; }
.tqc-root .tqc-link { border: 0; background: none; padding: 0; color: #b32d2e; text-decoration: underline; cursor: pointer; font-size: 12px; }
.tqc-f > span { margin-top: 10px; }
/* ---------- wp-admin: collected emails box ---------- */
.tqc-emails-box { background: #fff; border: 1px solid #c3c4c7; border-left: 4px solid #2271b1; padding: 4px 16px 8px; margin: 12px 0 16px; max-width: 900px; }
.tqc-emails-box h2 { margin: 12px 0 6px; font-size: 15px; }
.tqc-emails-count { font-weight: 400; color: #50575e; font-size: 13px; margin-left: 6px; }
.tqc-emails-box textarea { resize: vertical; }
.tqc-copy-msg { color: #1a7f37; font-weight: 600; margin-left: 8px; }

/* ---------- outstation vehicle form + terms editor ---------- */
.tqc-line { border: 1px solid #dcdfe4; border-radius: 8px; padding: 12px; margin: 0 0 12px; background: #fafbfc; }
.tqc-line-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tqc-line-head .tqc-x { font-size: 20px; }
.tqc-root .tqc-grid.tqc-grid-s { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; }
.tqc-line-total { margin-top: 10px; font-size: 13.5px; color: #50575e; text-align: right; }
.tqc-terms-list { display: flex; flex-direction: column; gap: 8px; }
.tqc-term { display: flex; gap: 8px; align-items: flex-start; }
.tqc-term-n { flex: 0 0 22px; text-align: right; padding-top: 9px; font-size: 13px; color: #6b7076; }
.tqc-root .tqc-term textarea { flex: 1 1 auto; min-height: 40px; overflow: hidden; resize: none; line-height: 1.4; }
.tqc-term-btns { flex: 0 0 auto; display: flex; gap: 4px; padding-top: 4px; }
.tqc-term-btns button { min-width: 30px; height: 30px; border: 1px solid #c3c4c7; background: #fff; color: #1d2327; border-radius: 5px; cursor: pointer; font-size: 12px; padding: 0 6px; }
.tqc-term-btns button.tqc-x { color: #b32d2e; font-size: 18px; border-color: #e0c3c3; }
@media (max-width: 700px) {
	.tqc-term { flex-wrap: wrap; }
	.tqc-term-n { display: none; }
	.tqc-term-btns { width: 100%; justify-content: flex-end; padding-top: 0; }
	.tqc-root .tqc-grid.tqc-grid-s { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tqc-root .tqc-grid.tqc-grid-s .tqc-f.wide { grid-column: 1 / -1; }
}
.tqc-root .tqc-gst input.tqc-gst-rate { width: 80px; flex: 0 0 80px; }
.tqc-gst label { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tqc-doc .tqc-terms li, .tqc-doc-subject { font-size: 13px; line-height: 1.4; }
.tqc-doc-meta,.tqc-doc-sign{font-size:14px;}


/* ---------- price breakup (editor card) ---------- */
.tqc-line-brk { margin-top: 10px; padding: 8px 10px; background: #eef4fb; border-left: 3px solid #4a7fbf; border-radius: 4px; font-size: 13px; line-height: 1.45; color: #2c3a4a; }

/* ---------- document polish: refined tables, totals card, accents ---------- */
.tqc-doc { position: relative; }
.tqc-doc::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--tqc-accent, #4a7fbf); }
.tqc-doc-title { letter-spacing: .6px; }
.tqc-doc-meta { background: var(--tqc-tint, #f6f8fb); border: 1px solid var(--tqc-tint2, #e3e8ef); border-left: 4px solid var(--tqc-accent, #4a7fbf); border-radius: 6px; }
.tqc-doc .tqc-t { margin: 8px 0 16px; border: 1px solid #aeb8c6; }
.tqc-doc .tqc-t th { border: 1px solid rgba(255, 255, 255, .35); letter-spacing: .2px; padding: 9px 8px; }
.tqc-doc .tqc-t td { border: 1px solid #d3dae4; padding: 8px 8px; }
.tqc-doc .tqc-t tbody tr:nth-child(even) td { background: #f8fafc; }
.tqc-doc .tqc-t td:first-child { font-weight: 600; }
.tqc-doc .tqc-t .tqc-brk td { text-align: left; white-space: normal !important; font-weight: 400; font-size: 12px; line-height: 1.5; color: #333b47; padding: 7px 10px; background: var(--tqc-tint, #f3f6fb) !important; }
.tqc-brk-tag { display: inline-block; font-size: 9.5px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: var(--tqc-accent-text, #fff); background: var(--tqc-accent, #4a7fbf); border-radius: 3px; padding: 1px 6px; margin-right: 8px; vertical-align: 1px; }
.tqc-doc .tqc-totals { border: 1px solid #aeb8c6; border-radius: 4px; min-width: 320px; }
.tqc-doc .tqc-totals td { border: 0; border-bottom: 1px solid #e1e6ee; padding: 7px 14px; }
.tqc-doc .tqc-grand td { border-bottom: 0; padding: 10px 14px; font-size: 16px; }
.tqc-doc-foot { border-top: 1px solid #e3e6ec; padding-top: 14px; }
@media print { #tqc-print-root .tqc-doc::before { display: none; } }
