.purchase-need-dialog{width:min(760px,calc(100% - 24px));height:min(680px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--kc-color-border);color:var(--kc-color-text);background:var(--kc-color-surface);border-radius:var(--kc-radius-card)}
.purchase-need-dialog::backdrop{background:var(--kc-color-overlay,rgba(0,0,0,.45))}
.purchase-need-dialog>form{display:flex;flex-direction:column;flex:1;min-height:0;gap:0;max-height:calc(100dvh - 28px)}
.purchase-need-dialog .kc-modal__body{align-content:start;overflow:auto;min-height:0}
.purchase-need-dialog .kc-modal__footer{flex-wrap:wrap}
.purchase-need-row{display:flex;align-items:center;justify-content:space-between;gap:var(--kc-space-3);padding:var(--kc-space-3) 0;border-bottom:1px solid var(--kc-color-border)}
.purchase-need-row>div{min-width:0;display:grid;gap:var(--kc-space-2)}
.purchase-need-row small{color:var(--kc-color-text-secondary);font-size:var(--kc-font-size-caption,14px)}
.purchase-need-row p{margin:0;overflow-wrap:anywhere}
[data-purchase-needs-panel]{margin:var(--kc-space-5) 0}
@media(max-width:640px){.purchase-need-row{align-items:stretch;flex-direction:column}.purchase-need-dialog .kc-modal__header,.purchase-need-dialog .kc-modal__footer,.purchase-need-dialog .kc-modal__body{padding:var(--kc-space-3)}}

.purchase-need-picker{position:relative;min-width:0}
.purchase-need-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--kc-space-3);margin-bottom:var(--kc-space-3)}
.purchase-need-filters .kc-select{width:100%;min-width:0}
.purchase-need-picker>.kc-dropdown__menu{position:relative;margin-top:var(--kc-space-2);z-index:auto}
.purchase-need-picker .kc-dropdown__options{max-height:min(360px,42dvh);overflow:auto}
.purchase-need-picker .is-highlighted{background:var(--kc-color-primary-surface);color:var(--kc-color-primary-surface-text)}
.purchase-need-items{gap:var(--kc-space-3)}
.purchase-need-item-line,.purchase-need-columns{display:grid;grid-template-columns:minmax(0,1fr) 96px 128px var(--kc-touch-target-min);align-items:center;gap:var(--kc-space-3);padding:var(--kc-space-3)}
.purchase-need-columns{padding-block:0;color:var(--kc-color-text-secondary);font-size:var(--kc-font-size-caption);font-weight:var(--kc-font-weight-semibold)}
.purchase-need-item-name{display:grid;gap:var(--kc-space-1);min-width:0;overflow-wrap:anywhere}
.purchase-need-item-name strong{min-width:0;overflow-wrap:anywhere}
.purchase-need-added{color:var(--kc-color-text-muted);font-size:var(--kc-font-size-2xs);font-weight:var(--kc-font-weight-regular);line-height:1.35}
.purchase-need-item-line .kc-input,.purchase-need-item-line .kc-select{min-width:0;width:100%}
@media(max-width:640px){.purchase-need-item-line,.purchase-need-columns{grid-template-columns:minmax(0,1fr) 56px 72px var(--kc-touch-target-min);gap:var(--kc-space-1)}.purchase-need-item-line .kc-input,.purchase-need-item-line .kc-select{padding-inline:var(--kc-space-2)}}
.purchase-need-dialog[aria-busy=true]{cursor:progress}

[data-need-button] [data-need-count]{flex-shrink:0;white-space:nowrap}
.purchase-need-list-heading{display:flex;align-items:center;justify-content:space-between;gap:var(--kc-space-3);min-width:0}
.purchase-need-list-heading p{margin:0}
.purchase-need-list-heading [data-clear]{flex:none}
.purchase-need-item-line .kc-field__error{display:block;font-weight:var(--kc-font-weight-regular)}
@media(max-width:640px){.purchase-need-dialog .kc-modal__footer{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--kc-space-2)}.purchase-need-dialog .kc-modal__footer .kc-button{width:100%;padding-inline:var(--kc-space-3)}}
