@import url('./template-product-picker.css');
.dq-product-template-dialog{box-sizing:border-box;width:min(820px,calc(100vw - 32px));max-height:min(710px,calc(100dvh - 36px));padding:0;border:1px solid #dfe3ea;border-radius:16px;background:#fff;color:#283343;box-shadow:0 22px 70px #172b4d30;overflow:auto;font:13px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif}
.dq-product-template-dialog::backdrop{background:#14203455;backdrop-filter:blur(3px)}
.dq-product-template-dialog *{box-sizing:border-box}
.dq-product-template-dialog button,.dq-product-template-dialog input{font:inherit}
.dq-product-template-dialog button{cursor:pointer}
.dq-product-template-dialog button:disabled{cursor:default;opacity:.5}
.dq-product-template-dialog :focus-visible{outline:2px solid #0071e3;outline-offset:2px}
.dq-tpl-heading{display:flex;align-items:center;justify-content:space-between;padding:17px 20px 12px;gap:12px}
.dq-tpl-heading h2{margin:0;font-size:18px;font-weight:650;letter-spacing:-.3px}
.dq-tpl-close{display:grid;place-items:center;width:30px;height:30px;padding:6px;border:0;border-radius:7px;background:#f3f5f8;color:#788496}
.dq-product-template-dialog svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dq-tpl-tabs{display:flex;gap:21px;padding:0 20px;border-bottom:1px solid #e8ebf0}
.dq-tpl-tabs button{border:0;border-bottom:2px solid transparent;padding:8px 0 10px;background:none;color:#7a8595;font-weight:500}
.dq-tpl-tabs button[aria-selected="true"]{color:#0071e3;border-bottom-color:#0071e3}
.dq-tpl-error{margin:12px 20px 0;padding:9px 11px;background:#fff3f0;color:#b3422f;border-radius:7px;font-size:12px}
.dq-tpl-error[hidden]{display:none}
.dq-tpl-toolbar,.dq-tpl-editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 20px}
.dq-tpl-toolbar p{margin:0;color:#7a8595;font-size:12px}
.dq-tpl-button{white-space:nowrap;min-height:34px;padding:6px 13px;border:1px solid #dce2eb;border-radius:7px;background:#fff;color:#384659;font-weight:500}
.dq-tpl-button.is-primary{background:#0071e3;border-color:#0071e3;color:#fff}
.dq-tpl-text{border:0;padding:3px 0;background:none;color:#0071e3;white-space:nowrap}
.dq-tpl-text.is-danger{color:#b84b40}
.dq-tpl-browser{display:grid;grid-template-columns:220px minmax(0,1fr);margin:0 20px;min-height:250px;max-height:390px;border:1px solid #e3e8ef;border-radius:9px;overflow:hidden}
.dq-tpl-list{padding:7px;background:#f6f8fb;border-right:1px solid #e3e8ef;overflow:auto}
.dq-tpl-list-entry{position:relative;border:1px solid transparent;border-radius:7px}
.dq-tpl-list-entry+.dq-tpl-list-entry{margin-top:4px}
.dq-tpl-list-entry.is-active{background:#fff;border-color:#a9d0fb}
.dq-tpl-list-item{display:grid;gap:5px;text-align:left;width:100%;padding:10px;border:0;border-radius:7px;background:none;color:#39485d}
.dq-tpl-list-item small{padding-right:40px}
.dq-tpl-direct{position:absolute;bottom:8px;right:8px;border:0;border-radius:5px;background:#eaf3ff;color:#0071e3;font-size:11px;padding:2px 7px}
.dq-tpl-list-item strong{font-weight:550;overflow-wrap:anywhere}
.dq-tpl-list-item small{font-size:11px;color:#8793a4}
.dq-tpl-miniatures{display:flex;gap:4px}
.dq-tpl-miniatures img{width:29px;height:29px;object-fit:contain;border-radius:4px;background:#fff}
.dq-tpl-preview{min-width:0;padding:0 14px;overflow:auto}
.dq-tpl-preview-heading{display:flex;align-items:center;gap:13px;padding:13px 0 8px}
.dq-tpl-preview-heading h3{flex:1;margin:0;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.dq-tpl-items{padding:0;margin:0;list-style:none}
.dq-tpl-items li{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #eef1f5;min-width:0}
.dq-tpl-items li:last-child{border-bottom:0}
.dq-tpl-items li>img,.dq-tpl-product>img{width:40px;height:40px;object-fit:contain;flex:none;border-radius:5px;background:#f6f8fb}
.dq-tpl-product-copy{display:grid;gap:3px;flex:1;min-width:0}
.dq-tpl-product-copy strong{font-size:12px;font-weight:500;overflow-wrap:anywhere}
.dq-tpl-product-copy small{color:#8793a4;font-size:11px;overflow-wrap:anywhere}
.dq-tpl-items li>b{font-size:12px;font-weight:500;white-space:nowrap;color:#56677e}
.dq-tpl-items li.is-unavailable .dq-tpl-product-copy small{color:#b47c29}
.dq-tpl-note{font-size:11px;color:#8390a2;margin:10px 0;line-height:1.7}
.dq-tpl-note.is-warning{color:#a97323}
.dq-tpl-delete-confirm{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:11px 0;font-size:12px;border-top:1px solid #e8ebf0}
.dq-tpl-delete-confirm>span{flex:1;min-width:150px}
.dq-tpl-empty{display:grid;justify-items:center;align-content:center;min-height:230px;padding:28px 20px;color:#7d8a9d;text-align:center}
.dq-tpl-empty strong{font-size:14px;font-weight:500;color:#4b5c73}
.dq-tpl-empty p{font-size:12px;margin:8px 0}
.dq-tpl-footer{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:14px 20px;margin-top:13px;border-top:1px solid #e8ebf0;background:#fafbfd}
.dq-tpl-footer>span{flex:1;font-size:11px;color:#8a95a5;line-height:1.6}
.dq-tpl-name{display:grid;gap:6px;padding:14px 20px 0;font-size:12px;color:#6d7c91}
.dq-tpl-name input,.dq-tpl-items input{min-width:0;padding:7px 9px;border:1px solid #dce2eb;border-radius:6px;background:#fff;color:#34445b;outline:none}
.dq-tpl-name input{width:100%;font-size:13px}
.dq-tpl-editor-toolbar{font-size:11px;color:#8390a2;padding-top:12px;padding-bottom:10px}
.dq-tpl-editor{display:grid;grid-template-columns:minmax(0,3fr) minmax(0,2fr);height:380px;margin:0 20px;border:1px solid #e3e8ef;border-radius:8px;overflow:hidden}
.dq-tpl-catalog{display:flex;flex-direction:column;min-width:0;border-right:1px solid #e3e8ef}
.dq-tpl-catalog[data-dpt-product-picker]{min-height:0;overflow:hidden;padding:9px}
.dq-tpl-catalog[data-dpt-product-picker]>.tpp-models{min-height:0;overflow:auto;flex:1}
.dq-tpl-search{display:flex;align-items:center;gap:6px;padding:9px;background:#f6f8fb;color:#97a2b1;border-bottom:1px solid #e8ebf0}
.dq-tpl-search input{width:100%;min-width:0;border:0;background:none;outline:none;font-size:12px}
.dq-tpl-search svg{width:15px;height:15px;flex:none}
.dq-tpl-products{overflow:auto;padding:4px 9px}
.dq-tpl-product{display:flex;align-items:center;gap:8px;width:100%;padding:8px 0;border:0;border-bottom:1px solid #eef1f5;background:none;text-align:left;color:#34445b}
.dq-tpl-product>img{width:34px;height:34px}
.dq-tpl-plus{color:#0071e3;font-size:18px;padding:0 3px}
.dq-tpl-selection{min-width:0;overflow:auto;padding:0 11px}
.dq-tpl-selection h3{display:flex;justify-content:space-between;align-items:center;margin:0;padding:11px 0 6px;font-size:12px;font-weight:600}
.dq-tpl-selection h3 span{font-size:11px;font-weight:400;color:#8a95a5}
.dq-tpl-selection .dq-tpl-items li{gap:7px}
.dq-tpl-selection .dq-tpl-items li>img{width:33px;height:33px}
.dq-tpl-items input{width:47px;padding:5px 2px;text-align:center;font-size:12px}
.dq-tpl-remove{display:grid;place-items:center;width:22px;padding:3px;border:0;background:none;color:#97a2b1}
.dq-tpl-remove svg{width:14px;height:14px}
.dq-tpl-no-items{color:#8a95a5;font-size:12px;justify-content:center}
@media(max-width:600px){.dq-product-template-dialog{width:calc(100vw - 20px);max-height:calc(100dvh - 22px);border-radius:12px}.dq-tpl-heading{padding:13px 14px 10px}.dq-tpl-tabs{padding:0 14px}.dq-tpl-toolbar{padding:11px 14px;align-items:flex-start}.dq-tpl-toolbar p{max-width:200px}.dq-tpl-browser{grid-template-columns:130px minmax(0,1fr);margin:0 14px;max-height:390px}.dq-tpl-list-item{padding:8px 6px}.dq-tpl-miniatures img{width:23px;height:23px}.dq-tpl-preview{padding:0 9px}.dq-tpl-preview-heading{gap:8px;flex-wrap:wrap}.dq-tpl-preview-heading h3{flex-basis:100%}.dq-tpl-items li{gap:7px}.dq-tpl-items li>img{width:32px;height:32px}.dq-tpl-footer{padding:12px 14px;flex-wrap:wrap}.dq-tpl-footer>span{min-width:170px}.dq-tpl-name{padding:12px 14px 0}.dq-tpl-editor-toolbar{padding:10px 14px;align-items:flex-start;gap:8px}.dq-tpl-editor{margin:0 14px;height:310px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.dq-tpl-editor .dq-tpl-product-copy strong{font-size:11px}.dq-tpl-editor .dq-tpl-product-copy small{font-size:10px}.dq-tpl-product>img{width:28px;height:28px}.dq-tpl-selection{padding:0 7px}.dq-tpl-selection .dq-tpl-items li{flex-wrap:wrap;gap:5px}.dq-tpl-selection .dq-tpl-items li>img{width:28px;height:28px}.dq-tpl-selection .dq-tpl-items .dq-tpl-product-copy{min-width:70px}.dq-tpl-items input{width:43px}.dq-tpl-error{margin-left:14px;margin-right:14px}}
