/* Traffic control quote builder (/tools/traffic-control-quote-builder): saved-quotes bar, line cards, the quote document */
.qb .tool-out { align-content: start; grid-template-columns: minmax(0, 1fr); }
.qb .tool-out > *, .qb .tool-out .tw-gate-wrap, .qb .tool-out .tw-gate-blur { min-width: 0; }
.qb .tw-actions button { min-height: 44px; }
.qb-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: end; margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: var(--concrete); }
.qb-pick { display: grid; gap: 4px; font-weight: 700; font-size: .84rem; color: var(--ink); min-width: 0; }
.qb-pick select { width: 100%; min-width: 0; height: 44px; padding: 0 10px; border: 1.5px solid var(--concrete-2); border-radius: 10px; background: var(--white); font: inherit; font-weight: 600; }
.qb-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.qb-btns button { min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--asphalt); background: var(--white); color: var(--asphalt); font: inherit; font-weight: 700; font-size: .86rem; cursor: pointer; }
.qb-btns button[data-q="save"] { background: var(--asphalt); color: var(--yellow); }
.qb-btns button:hover { background: var(--asphalt); color: var(--yellow); }
.qb-saved { grid-column: 1 / -1; margin: 0; font-size: .8rem; color: var(--steel); }
.qb-saved:empty { display: none; }
@media (max-width: 620px) { .qb-bar { grid-template-columns: 1fr; } .qb-btns button { flex: 1 1 calc(50% - 6px); } }

.qb-rows { display: grid; gap: 10px; }
.qb-row { border: 1.5px solid var(--concrete-2); border-radius: 12px; padding: 10px 12px 12px; background: #fafbfc; display: grid; gap: 8px; }
.qb-row-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.qb-row-h b { flex: none; font-size: .84rem; color: var(--asphalt); }
.qb-info { flex: 1; min-width: 0; font-size: .78rem; font-weight: 600; color: var(--steel); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: flex-end; text-align: right; }
.qb-info .tw-pill { background: var(--concrete); color: var(--ink); }
.qb-info .tw-pill.warn { background: #ffedd5; color: #9a3412; } .qb-info .tw-pill.alert { background: #fee2e2; color: #991b1b; } .qb-info .tw-pill.dark { background: var(--asphalt); color: var(--yellow); }
@media (max-width: 620px) { .qb-row-h { flex-wrap: wrap; } .qb-info { order: 3; flex-basis: 100%; justify-content: flex-start; text-align: left; } .qb-info:empty { display: none; } }
.qb-x { flex: none; width: 44px; height: 44px; margin: -6px -6px -6px auto; border-radius: 10px; border: 1px solid var(--concrete-2); background: var(--white); color: var(--steel); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.qb-x:hover { border-color: var(--red); color: var(--red); }
.qb-g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px 10px; }
.qb-g > * { grid-column: span 12; min-width: 0; }
.qb-g .c2 { grid-column: span 2; } .qb-g .c3 { grid-column: span 3; } .qb-g .c4 { grid-column: span 4; } .qb-g .c6 { grid-column: span 6; } .qb-g .c8 { grid-column: span 8; } .qb-g .c12 { grid-column: span 12; }
@media (max-width: 620px) { .qb-g .m4 { grid-column: span 4; } .qb-g .m6 { grid-column: span 6; } .qb-g .m12 { grid-column: span 12; } }
.qb-g input[type="time"] { padding: 0 6px; }
.qb .presets button { min-height: 40px; }
.qb-mults { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.qb-mults label { font-size: .8rem; }
@media (max-width: 520px) { .qb-mults { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.qb-logo { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 8px 12px; align-items: center; }
.qb-logo-prev { grid-row: span 2; width: 84px; height: 64px; border: 1.5px dashed var(--concrete-2); border-radius: 10px; display: grid; place-items: center; overflow: hidden; background: var(--white); font-size: .74rem; color: var(--steel); }
.qb-logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.qb-file input[type="file"] { width: 100%; min-width: 0; min-height: 44px; padding: 8px; border: 1.5px dashed var(--concrete-2); border-radius: 10px; background: var(--white); font: inherit; font-size: .84rem; }
.qb-mini { justify-self: start; min-height: 40px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--concrete-2); background: var(--white); font: inherit; font-size: .84rem; font-weight: 700; color: var(--ink); cursor: pointer; }
@media (max-width: 620px) { .qb .row3 > :first-child { grid-column: 1 / -1; } }

/* the quote document (white paper inside the dark result panel; also what prints) */
.qb-paper { background: #fff; color: #15171b; border-radius: 12px; padding: 16px; }
.qbp > * { min-width: 0; }
@media (max-width: 520px) { .qb-paper { padding: 12px 10px; } }
.qbp-items { table-layout: fixed; }
.qbp-items td { overflow-wrap: anywhere; }
.qbp-items th:last-child, .qbp-items td:last-child { width: 96px; }
.qbp { display: grid; gap: 10px; font-size: .86rem; line-height: 1.4; color: #15171b; }
.qbp-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 3px solid #15171b; }
.qbp-co { display: flex; gap: 10px; align-items: center; min-width: 0; }
.qbp-co img { max-height: 60px; max-width: 130px; object-fit: contain; }
.qbp-co b { display: block; font-size: 1.05rem; }
.qbp-co span, .qbp-ref span { display: block; font-size: .78rem; color: #4b5260; }
.qbp-ref { text-align: right; }
.qbp-ref b { display: block; text-transform: uppercase; letter-spacing: .1em; font-size: 1.15rem; }
.qbp-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 0; }
@media (max-width: 420px) { .qbp-meta { grid-template-columns: 1fr; } .qbp-ref { text-align: left; } }
.qbp-meta dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: #4b5260; font-weight: 700; }
.qbp-meta dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.qbp h4 { margin: 6px 0 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #15171b; font-family: var(--body); }
.qbp p { margin: 0; }
.qbp-pre { white-space: pre-wrap; }
.qbp-small { font-size: .76rem; color: #4b5260; }
.qbp-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.qbp-t { width: 100%; border-collapse: collapse; font-size: .8rem; }
.qbp-t th, .qbp-t td { border-bottom: 1px solid #dfe3e8; padding: 5px 6px; text-align: left; vertical-align: top; }
.qbp-t th { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: #4b5260; }
.qbp-t th small { display: block; font-weight: 600; text-transform: none; }
.qbp-items td:last-child, .qbp-items th:last-child { text-align: right; white-space: nowrap; }
.qbp-items td small { display: block; font-size: .74rem; color: #4b5260; font-weight: 500; }
.qbp-grp td { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; color: #4b5260; background: #f4f6f8; }
.qbp-items tfoot td { font-weight: 600; border-bottom: 0; }
.qbp-items tfoot td:first-child { text-align: right; }
.qbp-total td { font-size: 1rem; font-weight: 800 !important; border-top: 2px solid #15171b; }
.qbp-sched td, .qbp-sched th { white-space: nowrap; text-align: right; }
.qbp-sched td:first-child, .qbp-sched th:first-child { text-align: left; white-space: normal; }
.qbp-list { margin: 0; padding-left: 18px; display: grid; gap: 3px; font-size: .8rem; }
.qbp-accept { border: 1.5px solid #15171b; border-radius: 8px; padding: 10px; display: grid; gap: 6px; }
.qbp-accept p { font-size: .78rem; color: #4b5260; }
.qbp-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; padding-top: 14px; }
.qbp-lines span { border-top: 1px solid #15171b; padding-top: 3px; font-size: .7rem; color: #4b5260; text-transform: uppercase; letter-spacing: .05em; }

@media print {
  #tw-print .qbp { font-size: 9.5pt; }
  #tw-print .qbp-top { border-bottom: 2px solid #000 !important; }
  #tw-print .qbp-t th, #tw-print .qbp-t td { border: 0 !important; border-bottom: 1px solid #bbb !important; font-size: 8.5pt; white-space: normal; }
  #tw-print .qbp-total td { border-top: 2px solid #000 !important; font-size: 11pt; }
  #tw-print .qbp-accept, #tw-print .qbp-items tr, #tw-print .qbp-sched { break-inside: avoid; }
  #tw-print .qbp-lines span { border-top: 1px solid #000 !important; }
}
