/* Bradshaw-styled Calculator - 2x typography */
:root{--tcc-bg:#ffffff;--tcc-surface:#f8fafc;--tcc-border:#e5e7eb;--tcc-muted:#64748b;--tcc-text:#0b1220;--tcc-primary:#0f3d4c;--tcc-primary-ink:#e6f3f6;--tcc-primary-soft:#d6e9ee}
.tcc-wrap{max-width:1200px;margin:1.5rem auto;padding:1.25rem;border:1px solid var(--tcc-border);border-radius:12px;background:var(--tcc-bg);box-shadow:0 1px 2px rgba(0,0,0,.04);font-size:2rem}
.tcc-header{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:1rem}
.tcc-title{font-size:1.1em;font-weight:800;color:var(--tcc-primary)}
.tcc-card{border:1px solid var(--tcc-border);border-radius:12px;padding:14px;background:var(--tcc-surface)}

.tcc-layout-lr{display:grid;grid-template-columns:minmax(380px,520px) 1fr;gap:18px;align-items:center}

/* Inputs column (big) */
.tcc-inputs-col .tcc-field{margin-bottom:14px}
.tcc-field label{font-weight:800;margin-bottom:.4rem;color:var(--tcc-primary);font-size:1em}
.tcc-input{display:flex;gap:12px;align-items:center}
.tcc-field input, .tcc-field select{width:100%;padding:1rem 1.1rem;border:1px solid var(--tcc-border);border-radius:12px;background:#fff;font-size:1em}
.tcc-prefix, .tcc-suffix{font-size:1em;color:#1f2937}
/* Remove spinner arrows on number inputs */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
input[type=number]{-moz-appearance:textfield}
/* Ensure selects are fully visible and large enough */
.tcc-field select{min-width:160px}

/* Sketch area */
.iso-wrap{display:flex;justify-content:center}
.tcc-iso-svg{max-width:100%;height:auto}

/* Results list: as big/bold as inputs */
.tcc-results-list{margin-top:18px;border:1px solid var(--tcc-border);border-radius:12px;background:#fff}
.tcc-results-list .tcc-out{display:flex;justify-content:space-between;gap:12px;align-items:baseline;padding:18px 20px;border-top:1px solid var(--tcc-border)}
.tcc-results-list .tcc-out:first-child{border-top:none;border-top-left-radius:12px;border-top-right-radius:12px}
.tcc-results-list .tcc-out:last-child{border-bottom-left-radius:12px;border-bottom-right-radius:12px}
.tcc-results-list .label{font-size:1em;color:var(--tcc-primary);font-weight:800}
.tcc-results-list .val{font-size:1.2em;font-weight:900;color:#0b1220}
.tcc-results-list .unit{margin-left:8px;color:var(--tcc-muted);font-size:1em}
.tcc-note{font-size:.6em;color:#475569;margin-top:1rem}


/* Cutlist UI */
.tcc-footer{display:flex;gap:12px;align-items:center;margin-top:.75rem;flex-wrap:wrap}
.tcc-chip{display:inline-flex;align-items:center;gap:6px;font-size:.75em;border:1px solid var(--tcc-border);padding:6px 10px;border-radius:999px;background:#fff;color:#0f172a}
.tcc-chip .dot{width:8px;height:8px;border-radius:50%;background:var(--tcc-primary)}
.tcc-divider{height:1px;background:var(--tcc-border);margin:1rem 0}
.tcc-btn{background:var(--tcc-primary);color:#fff;border:none;border-radius:10px;padding:.8rem 1.1rem;font-weight:800;cursor:pointer}
.tcc-btn:hover{opacity:.95}
.tcc-btn-secondary{background:#0f3d4c22;color:#0f3d4c}
.tcc-btn-danger{background:#ef4444}

.tcc-table-wrap{overflow:auto;border:1px solid var(--tcc-border);border-radius:12px;background:#fff}
.tcc-table{width:100%;border-collapse:separate;border-spacing:0;min-width:760px}
.tcc-table th,.tcc-table td{padding:.7rem .8rem;border-bottom:1px solid var(--tcc-border);text-align:left}
.tcc-table thead th{position:sticky;top:0;background:#f1f5f9;font-weight:800;color:#0f3d4c}
.tcc-table tbody tr:nth-child(even){background:#fafafa}
.tcc-table input{width:100%;padding:.5rem .6rem;border:1px solid var(--tcc-border);border-radius:8px;background:#fff;font-size:.9em}
.tcc-row-actions{display:flex;gap:8px}

.tcc-summary{margin-top:1rem}
.tcc-summary h4{margin:.2rem 0 .6rem 0;color:#0f3d4c}
.tcc-summary-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}
.tcc-summary-item{border:1px solid var(--tcc-border);border-radius:12px;padding:.8rem;background:#fff;display:flex;justify-content:space-between;align-items:center}
.tcc-grand{margin-top:.7rem;display:flex;justify-content:space-between;align-items:center;border:2px dashed var(--tcc-primary);border-radius:12px;padding:.9rem 1rem;font-weight:800;color:#0f3d4c;font-size:1.1em}

/* Keep everything large and simple */
.tcc-table th, .tcc-table td, .tcc-btn, .tcc-chip { font-size: 1em; }


/* Textarea styling to match inputs */
.tcc-field textarea{width:100%;padding:.8rem .9rem;border:1px solid var(--tcc-border);border-radius:10px;background:#fff;font-size:1.1rem;resize:vertical;min-height:3.2rem}
/* Wider table for extra columns */
.tcc-table{min-width:980px}


/* Wider default layout; can be overridden by inline style from shortcode */
.tcc-wrap{ max-width: 880px; }

/* Species groups */
.tcc-groups{ display: grid; gap: 14px; }
.tcc-group{ border:1px solid var(--tcc-border); border-radius:12px; background:#fff; overflow:hidden }
.tcc-group-header{ display:flex; justify-content:space-between; align-items:center; padding:.8rem 1rem; background:#f1f5f9; border-bottom:1px solid var(--tcc-border) }
.tcc-group-title{ font-weight:800; color:#0f3d4c }
.tcc-group-actions{ display:flex; gap:8px }
.tcc-group-body{ overflow:auto }
.tcc-group .tcc-table{ width:100%; border-collapse:separate; border-spacing:0; min-width:860px }
.tcc-group .tcc-table th, .tcc-group .tcc-table td{ padding:.7rem .8rem; border-bottom:1px solid var(--tcc-border); text-align:left }
.tcc-group .tcc-table thead th{ position:sticky; top:0; background:#fff; font-weight:800; color:#0f3d4c }
.tcc-row-actions{ display:flex; gap:8px }

/* Buttons */
.tcc-btn.ghost{ background:transparent; color:#0f3d4c; border:1px dashed #93c5fd }


/* v1.16.2 minimal theme fix: prevent theme from stretching inputs to 100% in cutlist */
.tcc-group .tcc-table{ table-layout: auto; width: 100%; }
.tcc-group .tcc-table td input{ width: auto !important; max-width: 100%; }
.tcc-group .tcc-table td input.tmm,
.tcc-group .tcc-table td input.wmm{ max-width: 6.5rem; }
.tcc-group .tcc-table td input.lm{ max-width: 7.5rem; }
.tcc-group .tcc-table td input.qty{ max-width: 4.5rem; text-align:center; }
.tcc-group .tcc-table td input.rate{ max-width: 7.5rem; }
.tcc-group .tcc-table td input.species{ max-width: 12rem; }
.tcc-group .tcc-table td input.notes{ max-width: 14rem; }



/* v1.16.7 — Fit cutlist cleanly without large gaps */
.tcc-group .tcc-table th, .tcc-group .tcc-table td{ padding:.48rem .56rem; }
.tcc-group .tcc-table td input{ width:auto; max-width:100%; }
.tcc-group .tcc-table td input.tmm,
.tcc-group .tcc-table td input.wmm{ max-width: 6.5ch; }
.tcc-group .tcc-table td input.lm{ max-width: 8ch; }
.tcc-group .tcc-table td input.qty{ max-width: 5ch; text-align:center; }
.tcc-group .tcc-table td input.rate{ max-width: 8ch; text-align:right; }
.tcc-group .tcc-table td input.species{ max-width: 18ch; }
.tcc-group .tcc-table td input.notes{ max-width: 22ch; }
.tcc-row-actions .tcc-btn{ padding:.35rem .6rem; white-space:nowrap; }
.tcc-group-body{ overflow-x:hidden; } /* no side scroll on desktop; inputs are capped */




.tcc-group-body{ position: relative; }
.tcc-group-body .tcc-table{ transform-origin: top left; }
.tcc-group-body{ overflow-x:auto; }



/* v1.16.10 — Summary rows: species header with volume+price on right; thickness rows each on their own line */
.tcc-summary-list .tcc-summary-item,
.tcc-summary-list .tcc-summary-subitem,
.tcc-summary-list .tcc-summary-subtotal{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap: 12px;
  padding: .35rem .6rem;
}
.tcc-summary-list .tcc-summary-item{ border-radius:12px; background:var(--tcc-surface); }
.tcc-summary-list .tcc-sum-right{ display:flex; gap:10px; white-space:nowrap; }
.tcc-summary-list .tcc-sum-right .vol{ color: var(--tcc-muted); }
.tcc-summary-list .tcc-summary-subitem{ padding-left: 1rem; }



/* v1.16.11 — Force species summaries to stack vertically with clear grouping */
.tcc-summary-list{ display:block; }
.tcc-species-group{ margin:.35rem 0 1rem; }
.tcc-species-group > .tcc-summary-item,
.tcc-species-group > .tcc-summary-subitem,
.tcc-species-group > .tcc-summary-subtotal{ width:100%; }


/* v1.16.13 — Improve timber SVG labels/grain */
.tcc-iso-svg{ max-width:100%; height:auto; display:block; }
.tcc-iso-svg text{ font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji'; }
