#bw-add {max-width:1200px}
#bw-add fieldset {border:0;padding:0;margin:0;min-width:0}
#bw-add legend {margin-bottom:8px;color:var(--tw-text-2)}
.bw-add-choices {display:grid;grid-template-columns:2fr 1fr;gap:24px}
.bw-add-segments {display:flex;flex-wrap:wrap;gap:8px}
.bw-add-segments label {position:relative;cursor:pointer}
.bw-add-segments input {position:absolute;opacity:0;width:1px;height:1px}
.bw-add-segments span {display:flex;align-items:center;justify-content:center;min-height:44px;padding:0 14px;background:var(--tw-surface);border-radius:10px}
.bw-add-segments input:checked + span {background:var(--tw-accent-soft);color:var(--tw-accent-text);outline:1px solid var(--tw-accent)}
.bw-add-segments input:focus-visible + span {outline:2px solid var(--tw-accent);outline-offset:2px}
.bw-add-drop {min-height:160px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;border:1.5px dashed var(--tw-divider-strong);border-radius:16px;padding:20px}
.bw-add-drop.dragging {border-color:var(--tw-accent);background:var(--tw-accent-soft)}
.bw-add-item {display:flex;align-items:center;gap:12px;min-height:80px;border-bottom:.5px solid var(--tw-divider);padding:8px 0}
.bw-add-item .identity {flex:1;min-width:0}
.bw-add-picture {width:56px;height:56px;object-fit:contain;background:white;border:.5px solid var(--tw-divider-strong);border-radius:10px;flex:none}
.bw-add-no-image {background:var(--tw-surface-2);display:grid;place-items:center;text-align:center;font:11px var(--tw-mono);color:var(--tw-text-2)}
.bw-add-table {overflow:auto}
#bw-add th,#bw-add td {padding:12px 8px;text-align:left;border-bottom:.5px solid var(--tw-divider);vertical-align:top}
#bw-add td input[type=number] {width:90px;text-align:right;font-family:var(--tw-mono)}
#bw-add select,#bw-add input,#bw-add button {min-height:44px}
#bw-add .bw-add-colour {height:56px;min-width:110px;border-radius:6px;border:1px solid var(--tw-divider-strong)}
#bw-add [hidden] {display:none !important}
#bw-add .secondary {color:var(--tw-text-2)}
#bw-add .identity .mono {display:block;margin-bottom:4px}
#bw-add button {color:var(--tw-accent-text)}
#bw-add button.primary {color:#1A1816}
@media(max-width:1023px){.bw-add-choices{grid-template-columns:1fr}.bw-add-segments label{flex:none}#bw-add [data-review],#bw-add [data-confirm]{min-height:56px;flex:1}}
@media(prefers-reduced-motion:reduce){#bw-add *{transition:none}}
.bw-add-palette {display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;max-height:50vh;overflow:auto;padding:4px}
#bw-add .bw-add-colour-choice {min-height:56px;border-radius:6px;border:1px solid var(--tw-divider-strong);padding:8px}
#bw-add .bw-add-colour-choice[aria-pressed=true] {outline:3px solid var(--tw-accent);outline-offset:1px}
#bw-add [data-colour-dialog] {background:var(--tw-surface-2);max-width:650px;width:calc(100% - 40px)}

#bw-add [data-import-message] {color:var(--tw-text-2) !important}

/* Manage 4d · reviewed Add heading, shared segments and filled search. */
#bw-add header{display:flex;flex-direction:column;gap:4px}
#bw-add header h1{margin:0;font:600 22px/28px var(--tw-font);letter-spacing:-.2px}
#bw-add header .secondary{margin:0;font:400 14px/20px var(--tw-font);color:var(--tw-text-muted)}
#bw-add .bw-add-continuous{display:flex;flex-wrap:nowrap;background:var(--tw-surface);border-radius:10px;padding:2px;gap:2px;overflow:visible}
#bw-add .bw-add-continuous label{flex:1;min-width:0}
#bw-add .bw-add-continuous span{height:44px;min-height:44px;padding:0;border-radius:8px;background:transparent;color:var(--tw-text-2);font:500 13px var(--tw-font);white-space:nowrap}
#bw-add .bw-add-continuous input:checked + span{background:var(--tw-accent-soft);color:var(--tw-accent-text);outline:none}
#bw-add .bw-add-continuous input:focus-visible + span{outline:2px solid var(--tw-accent)}
.bw-add-search-field{display:flex;align-items:center;gap:10px;height:48px;border-radius:10px;background:var(--tw-surface);padding:0 14px}
.bw-add-search-field:focus-within{outline:2px solid var(--tw-accent)}
.bw-add-search-field .icon{width:18px;height:18px;flex:none;color:var(--tw-text-muted)}
#bw-add [data-search]{flex:1;width:100%;min-width:0;min-height:0;background:none;border:0;padding:0;font:400 16px var(--tw-font)}
/* M.10 A · the Part list picker and the picture warning in the review (design 4.3, 6.8). */
.bw-add-part-list{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.bw-add-part-list label{display:flex;flex-direction:column;gap:4px}
.bw-add-part-list .check-field{flex-direction:row;align-items:center;gap:8px;min-height:44px}
.bw-add-part-list .check-field input{min-height:0;width:20px;height:20px;accent-color:var(--tw-accent)}
.bw-add-part-list p{margin:0;font-size:13px;line-height:18px}
#bw-add .bw-add-no-picture{margin:6px 0 0;padding:6px 10px;border-radius:8px;background:var(--tw-warning-soft);color:var(--tw-text);font-size:13px;line-height:18px}
#bw-add .bw-add-sub td{padding-top:0;height:auto}
#bw-add tr.has-sub td{border-bottom:0}
#bw-add .bw-add-sub .bw-add-part-list{max-width:520px;margin:0}
@media(max-width:1279px){
 #bw-add .bw-add-table thead{display:none}
 #bw-add .bw-add-table table,#bw-add .bw-add-table tbody,#bw-add .bw-add-table tr,#bw-add .bw-add-table td{display:block;width:100%;box-sizing:border-box}
 #bw-add .bw-add-table tr{padding:12px 0;border-bottom:.5px solid var(--tw-divider)}
 #bw-add .bw-add-table td{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:6px 12px;border:0;padding:6px 0;height:auto;min-height:44px}
 #bw-add .bw-add-table td::before{content:attr(data-label);flex:none;min-width:96px;font:500 11px/14px var(--tw-font);letter-spacing:.1em;text-transform:uppercase;color:var(--tw-text-2)}
 #bw-add .bw-add-table td:first-child::before,#bw-add .bw-add-sub td::before{content:none}
 #bw-add .bw-add-table td>select,#bw-add .bw-add-table td>input{flex:1;min-width:0}
 #bw-add .bw-add-table td[data-label=Choice]>*{flex:1 1 100%;margin:0}
 #bw-add .bw-add-table tr.has-sub{border-bottom:0;padding-bottom:0}
 #bw-add .bw-add-table tr.bw-add-sub{padding-top:0}
}
/* No-image tile: the number, clipped. Selects take their natural width and the Item column gives way. */
.bw-add-no-image{padding:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block;line-height:56px;border:.5px dashed var(--tw-divider-strong)}
#bw-add .identity .mono{white-space:nowrap}
@media(min-width:1280px){
 #bw-add .bw-add-table table{width:100%}
 #bw-add .bw-add-table td:not(:first-child),#bw-add .bw-add-table th:not(:first-child){width:1%;white-space:nowrap}
 #bw-add .bw-add-table td:first-child{width:auto;min-width:220px}
 #bw-add .bw-add-table td select{width:auto;max-width:none}
 #bw-add .bw-add-table td[data-label=Choice]{white-space:normal;min-width:230px}
}
/* Choice chips for a number not in the catalogue. */
.bw-add-choice-chips{display:flex;flex-wrap:wrap;gap:8px}
#bw-add .bw-add-choice{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;min-height:44px;padding:6px 14px;border-radius:10px;border:.5px solid var(--tw-divider-strong);background:var(--tw-surface);color:var(--tw-text);font:500 14px var(--tw-font);text-align:left}
#bw-add .bw-add-choice small{font-size:12px;line-height:16px}
#bw-add .bw-add-choice[aria-pressed=true]{border:1.5px solid var(--tw-accent);background:var(--tw-accent-soft);color:var(--tw-accent-text)}
#bw-add .bw-add-choice:disabled{opacity:.6;cursor:not-allowed}
#bw-add button:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:1279px){#bw-add .bw-add-choice{flex:1 1 100%}}
/* Completeness does not apply to a part: a muted dash in the table, nothing in the cards. */
#bw-add td.bw-add-na::after{content:'\2014';color:var(--tw-text-muted)}
@media(max-width:1279px){#bw-add td.bw-add-na{display:none!important}}
/* The steps, Select and the bar that keeps the next step in view (Ulf, 2026-10-28: "Add to list" read as adding to the collection). */
.bw-add-steps{display:flex;flex-wrap:wrap;gap:6px 18px;margin:0;padding:0;list-style:none;counter-reset:bw-step;font:500 13px/20px var(--tw-font);color:var(--tw-text-muted)}
.bw-add-steps li{counter-increment:bw-step;display:flex;align-items:center;gap:6px}
.bw-add-steps li::before{content:counter(bw-step);display:grid;place-items:center;width:20px;height:20px;border-radius:50%;border:.5px solid var(--tw-divider-strong);font:500 11px var(--tw-mono)}
.bw-add-steps li[aria-current=step]{color:var(--tw-text)}
.bw-add-steps li[aria-current=step]::before{background:var(--tw-accent-soft);border-color:var(--tw-accent);color:var(--tw-accent-text)}
#bw-add .bw-add-select{min-width:104px;border-radius:10px;border:1px solid var(--tw-accent);background:transparent;padding:0 14px}
#bw-add .bw-add-select[aria-pressed=true]{background:var(--tw-accent-soft)}
#bw-add .bw-add-select[aria-pressed=true]::before{content:'✓ '}
.bw-add-bar{position:sticky;bottom:0;z-index:2;display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:12px 0 calc(12px + env(safe-area-inset-bottom));background:var(--tw-bg);border-top:.5px solid var(--tw-divider)}
.bw-add-bar p{margin:0;flex:1 1 auto}
#bw-add .bw-add-bar [data-review]:disabled{opacity:.5}
@media(max-width:1023px){.bw-add-bar{bottom:var(--bw-bottom);padding-bottom:12px}}
@media(max-width:767px){.bw-add-bar p{flex-basis:100%}}
