/* TL-11 contents value. Isolation contract as wt-tools.css: every selector starts .wt-, no !important. */
@media (min-width: 1000px) {
  .wt-shell.wt-cv { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
.wt-cv-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; border: 0; background: none;
  color: var(--wg-blue); font: inherit; font-size: 14.5px; font-weight: 600; text-decoration: underline; cursor: pointer;
}
.wt-cv-room { margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--wg-line); }
.wt-cv-room-head { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.wt-cv-room-head .wt-group-h { margin: 0 auto 0 0; font-size: 18px; }
/* "Rename" and "Remove room" stay together; on a narrow screen the pair wraps under the heading as one (r2 F6). */
.wt-cv-room-acts { display: inline-flex; flex-wrap: nowrap; gap: 0 8px; white-space: nowrap; margin-left: -6px; }
@media (min-width: 600px) { .wt-cv-room-acts { margin-left: 0; } }
/* Phones: the sticky "Total so far" bar keeps clear of the focused control via scroll-padding set by the module
   (contents-value.js barPad(); r2 F3): .wt-tool.wt-has-bar's 72 px bottom padding covers only the last element. */
.wt-cv-rename { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.wt-cv-rename .wt-input { flex: 1 1 200px; width: auto; }
.wt-cv-table { font-size: 14.5px; }
.wt-cv-table th, .wt-cv-table td { padding: 8px 8px; vertical-align: middle; }
.wt-cv-table tbody th { font-weight: 500; }
.wt-cv-name { display: block; }
.wt-cv-hint { display: block; margin-top: 4px; font-weight: 400; font-size: 12.5px; }
.wt-cv-qty { width: 72px; min-height: 44px; }
.wt-cv-money { display: inline-flex; align-items: center; gap: 6px; }
.wt-cv-money .wt-input { width: 120px; min-height: 44px; }
.wt-cv-err:empty { display: none; }
.wt-cv-err { display: block; margin-top: 4px; font-size: 13px; }
.wt-cv-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 13.5px; cursor: pointer; }
.wt-cv-check input { width: 22px; height: 22px; }
.wt-cv-table .wt-sr-col { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; }
.wt-cv-add, .wt-cv-addroom { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 12px 0 0; }
.wt-cv-add .wt-field, .wt-cv-addroom .wt-field { flex: 1 1 220px; }
/* UX review F9: a room shows its table (and header row) only once it has a line; until then just "Add an item" */
.wt-cv-room:not(.wt-cv-has-rows) .wt-cv-tablewrap { display: none; }
.wt-cv-valuehint { display: block; margin: 0 0 4px; font-size: 14px; }
/* UX review F4: once there is a total, an empty value field is outlined */
.wt-cv-money .wt-input.wt-cv-novalue { border-color: #B26A00; background: var(--wg-amber); }
.wt-cv-undo { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.wt-cv-undo.wt-off { display: none; }
.wt-cv-next { margin: 4px 0 14px; padding: 12px 14px; border-left: 4px solid var(--wg-teal); background: var(--wg-band); font-size: 15.5px; }
.wt-cv-next a { font-weight: 600; }
.wt-cv-more { margin-top: 12px; border-top: 1px solid var(--wg-line); }
.wt-cv-det { border-bottom: 1px solid var(--wg-line); }
.wt-cv-det > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; font-size: 15px; list-style: none; }
.wt-cv-det > summary::-webkit-details-marker { display: none; }
.wt-cv-det > summary::after { content: "+"; margin-left: auto; padding-left: 12px; color: var(--wg-blue); font-size: 20px; font-weight: 600; }
.wt-cv-det[open] > summary::after { content: "\2212"; }
.wt-cv-det > p { margin: 0 0 12px; font-size: 14.5px; }
.wt-cv-boxrow { display: grid; gap: 8px 14px; grid-template-columns: minmax(0, 1fr); align-items: end; padding: 10px 0; border-bottom: 1px solid var(--wg-line); }
/* phones: name, how many, value; then line total (left) and Remove (right) on one line, like an item card */
@media (max-width: 619.98px) {
  .wt-cv-boxrow { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .wt-cv-boxrow > * { grid-column: 1 / -1; }
  .wt-cv-boxrow > .wt-cv-boxtot { grid-column: 1; text-align: left; }
  .wt-cv-boxrow > .wt-list-x { grid-column: 2; justify-self: end; }
}
@media (min-width: 620px) { .wt-cv-boxrow { grid-template-columns: minmax(0, 1.3fr) auto auto auto auto; } }
.wt-cv-boxname { margin: 0; font-weight: 500; align-self: center; }
.wt-cv-boxtot { margin: 0; min-width: 70px; align-self: center; }
.wt-cv-later { margin: 18px 0 0; }
.wt-cv-errsum { margin: 0 0 12px; padding: 12px 14px; border: 2px solid var(--wg-coral-text); border-radius: var(--wg-radius-s); }
.wt-cv-errsum ul { margin: 6px 0 0; padding-left: 1.1em; }
.wt-cv-errh { margin: 0; font-weight: 600; }
.wt-cv-suggest { margin: 0 0 12px; font-size: 15.5px; }
.wt-cv-rooms { margin: 0 0 12px; padding: 0; list-style: none; font-size: 14.5px; }
.wt-cv-rooms li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--wg-line); }
/* cover panel: Yes / No / Not sure show only their own panel, with or without JavaScript */
.wt-cv-cover { margin-top: var(--wg-gap); }
.wt-cv-rule { font-size: 16.5px; font-weight: 500; }
.wt-cv-h3 { margin: 0; color: var(--wg-blue); font-size: 17px; font-weight: 600; }
.wt-cv-hc legend { padding: 0; }
.wt-cv-radios { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.wt-cv-r { width: auto; min-width: 120px; min-height: 48px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; -webkit-user-select: none; user-select: none; }
/* UX review F5: the chosen answer shows as a visible radio dot plus a tinted fill, not only a thin border */
.wt-cv-dot { width: 22px; height: 22px; margin: 0; flex: 0 0 auto; accent-color: var(--wg-teal); }
.wt-cv-r:has(input:checked) { background: #E6F4F1; font-weight: 600; }
.wt-cv-p { display: none; padding: 12px 14px; border-radius: var(--wg-radius-s); background: var(--wg-band); }
.wt-cv-p p { margin: 0 0 8px; }
.wt-cv-hc:has(input[value="yes"]:checked) .wt-cv-p--yes,
.wt-cv-hc:has(input[value="no"]:checked) .wt-cv-p--no,
.wt-cv-hc:has(input[value="notsure"]:checked) .wt-cv-p--notsure { display: block; }
.wt-cv-links { margin: 0; padding: 0; list-style: none; }
.wt-cv-blank td { height: 34px; }
/* phones: one card per item row (brief §8 a11y: card reflow under 600px) */
@media (max-width: 599.98px) {
  .wt-cv-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .wt-cv-table, .wt-cv-table tbody, .wt-cv-table tr, .wt-cv-table th, .wt-cv-table td { display: block; }
  .wt-cv-table tr { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--wg-line); border-radius: var(--wg-radius-s); }
  .wt-cv-table th, .wt-cv-table td { padding: 4px 0; border: 0; text-align: left; }
  .wt-cv-table td[data-label]:not(.wt-cv-photo)::before { content: attr(data-label); display: block; color: var(--wg-mute); font-size: 13px; }
  .wt-cv-table .wt-num { text-align: left; }
  .wt-cv-table td[data-line]:empty { display: none; }
}
@media (min-width: 600px) {
  .wt-cv-check span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* phones: a compact card per item — name; how many + cost side by side; line total, photo, remove on one line */
@media (max-width: 599.98px) {
  .wt-cv-table tr { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 2px 10px; align-items: end; }
  .wt-cv-table tbody th { grid-column: 1 / -1; }
  .wt-cv-table td[data-label="How many"] { grid-column: 1; }
  .wt-cv-table td[data-label="Cost to replace each, new"] { grid-column: 2 / -1; }
  .wt-cv-table td[data-line] { grid-column: 1; align-self: center; }
  .wt-cv-table td.wt-cv-photo { grid-column: 2; }
  .wt-cv-table td.wt-cv-x { grid-column: 3; }
  .wt-cv-table td[data-line]::before { content: none; }
  .wt-cv-table td[data-line]:empty { display: block; }
  .wt-cv-qty { width: 68px; }
  .wt-cv-money .wt-input { width: 100px; }
}
/* "How cover is worked out" (only when pricing is published) */
.wt-cv-rateswrap { max-width: 560px; }
.wt-cv-rateswrap + p { margin-top: 12px; }
/* Ctrl+P on the page prints the list as text, not the form (review r1 F6). Theme chrome is outside the isolation
   contract (every selector starts .wt-), so the print note points to "Print my inventory" for the tidy A4 copy. */
.wt-cv-printnote { display: none; }
@media print {
  .wt-cv-printnote { display: block; margin: 0 0 10px; font-style: italic; }
  .wt-tool--contents-value .wt-intro, .wt-tool--contents-value .wt-actions, .wt-tool--contents-value .wt-cv-add,
  .wt-tool--contents-value .wt-cv-addroom, .wt-tool--contents-value .wt-cv-link, .wt-tool--contents-value .wt-cv-rename,
  .wt-tool--contents-value .wt-cv-x, .wt-tool--contents-value .wt-list-x, .wt-tool--contents-value .wt-cv-hint,
  .wt-tool--contents-value .wt-hint, .wt-tool--contents-value [data-declare], .wt-tool--contents-value .wt-cv-more, .wt-tool--contents-value .wt-cv-next, .wt-tool--contents-value .wt-cv-undo,
  .wt-tool--contents-value .wt-cv-cover, .wt-tool--contents-value .wt-stickybar, 
  .wt-tool--contents-value .wt-s:not(.wt-s--tool), .wt-tool--contents-value .wt-controls > .wt-line, .wt-tool--contents-value .wt-nojs { display: none; }
  .wt-tool--contents-value .wt-shell.wt-cv { display: block; }
  .wt-tool--contents-value .wt-panel { border: 0; box-shadow: none; padding: 0; position: static; }
  .wt-tool--contents-value .wt-input { border: 0; background: none; padding: 0; min-height: 0; width: auto; box-shadow: none; }
  .wt-tool--contents-value .wt-cv-room { break-inside: avoid-page; }
}
