.legion-root .support-toolbar,.zj-support .support-toolbar{display:flex;align-items:center;gap:12px;justify-content:space-between}.legion-root .support-toolbar h3{margin:0;font-size:20px}.legion-root [data-chat]{min-width:0}.legion-root .support-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;border:1px solid #655347;border-radius:10px;background:transparent;color:#e5c7a5;padding:10px;cursor:pointer}.support-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.legion-root .support-context{padding:12px 14px;border-radius:12px;background:#28221f;color:#dfc6b0;font-size:13px;line-height:1.5;margin:16px 0;overflow-wrap:anywhere}.legion-root .support-actions{display:flex;gap:12px;margin:16px 0;flex-wrap:wrap}.legion-root .support-thread{width:100%;display:grid;grid-template-columns:1fr auto;text-align:left;gap:8px;padding:16px;margin:12px 0;background:#242321;border:1px solid #413d38;border-radius:14px;color:#eee;cursor:pointer}.legion-root .support-thread strong{font-size:15px;overflow-wrap:anywhere}.legion-root .support-thread span,.legion-root .support-thread small{font-size:12px}.legion-root .support-state{color:#cbb09a}.legion-root .support-count,.support-unread{background:#c12316;color:#fff;border-radius:20px;font-size:11px;min-width:18px;height:18px;line-height:18px;text-align:center;padding:0 4px}.support-unread{position:absolute;right:0;top:0;pointer-events:none}.support-unread[hidden]{display:none!important}[data-legion-account-entry],[data-tab="chat"],[data-chat-shortcut]{position:relative}.legion-root .support-status{font-size:13px;color:#c7b19b;min-height:0;margin:8px 0}.legion-root .support-error{color:#ffb3a8}.legion-root .support-history{display:flex;flex-direction:column;gap:14px;margin:16px 0}.legion-root .support-message{max-width:92%;padding:14px 16px;border-radius:16px;border:1px solid #49423c;overflow-wrap:anywhere;background:#252422}.legion-root .support-own{align-self:flex-end;background:#382722;border-color:#6e483b}.legion-root .support-reply{align-self:flex-start}.legion-root .support-message strong{font-size:12px;color:#e3bc94}.legion-root .support-message p{white-space:pre-wrap;line-height:1.5;margin:8px 0;font-size:14px}.legion-root .support-message time{display:block;font-size:11px;color:#aaa}.legion-root .support-message img{max-width:100%;max-height:320px;object-fit:contain;border-radius:8px;margin:8px 0}.legion-root .support-composer{padding:16px;border:1px solid #635044;border-radius:16px;background:#211d1a;margin-top:18px}.legion-root .support-composer label{display:block;font-size:13px}.legion-root .support-composer textarea{box-sizing:border-box;display:block;width:100%;background:#151515;border:1px solid #554b44;border-radius:8px;color:#eee;padding:12px;margin:8px 0 12px;min-height:90px;font:inherit;font-size:14px;resize:vertical}.legion-root .support-composer button:disabled{opacity:.5;cursor:wait}.legion-root .support-composer .legion-primary{min-width:0;padding:10px 16px;font-size:14px}.legion-root .support-attachments{display:flex;gap:8px;flex-wrap:wrap}.legion-root .support-attachments>div{position:relative}.legion-root .support-attachments img{width:70px;height:70px;object-fit:cover;border-radius:8px}.legion-root .support-attachments button{position:absolute;right:0;top:0;width:24px;height:24px;min-width:24px;padding:3px;background:#161616}.support-product-entry{font:inherit;font-size:14px;color:#dfbea0;border:1px solid #534237;border-radius:12px;background:#211b18;min-height:44px;width:100%;padding:10px 16px;margin:20px 0;cursor:pointer}.legion-root .support-question{margin-top:12px;font-size:13px}.legion-root [data-orders]>.legion-filter{overflow-x:auto;gap:4px}.legion-root [data-orders]>.legion-filter button{min-width:max-content;padding:10px;font-size:13px}
/* Shared admin inbox styles stay inside the support section. */
.zj-support{display:grid;grid-template-columns:minmax(220px,1fr) minmax(0,2fr);gap:24px}.zj-support button,.zj-support select{cursor:pointer}.zj-support .support-thread{display:block;width:100%;text-align:left;padding:14px;margin:8px 0;border:1px solid #ddd;border-radius:10px;background:#fff}.zj-support .support-thread strong,.zj-support .support-thread small{display:block}.zj-support .support-thread.active{border-color:#ad261b;background:#fff5f2}.zj-support .support-history{display:flex;flex-direction:column;gap:12px;max-height:55vh;overflow-y:auto;padding:12px 0}.zj-support .support-message{box-sizing:border-box;width:fit-content;max-width:min(82%,680px);padding:12px 15px;white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid transparent;border-radius:16px}.zj-support .support-message.from-customer{align-self:flex-start;background:#f1f1f1;border-color:#e6e6e6;border-top-left-radius:4px}.zj-support .support-message.from-staff{align-self:flex-end;background:#dcf8c6;border-color:#cbe9b4;border-top-right-radius:4px}.zj-support .support-message.internal{align-self:center;width:min(94%,720px);max-width:94%;background:#fff2cc;border-color:#f0dfad;border-radius:12px}.zj-support .support-message img{max-width:160px;max-height:160px;object-fit:contain;display:block}.zj-support .support-message time{font-size:12px;color:#777;display:block;text-align:right;margin-top:8px}.zj-support textarea{width:100%;min-height:100px;box-sizing:border-box;border:1px solid #aaa;border-radius:10px;padding:12px;margin:12px 0;font:inherit}.zj-support .support-context{font-size:13px;background:#f5f3f0;padding:14px;border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere}.zj-support .support-controls{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.zj-support [role=status]{font-size:13px;color:#9d281d}.zj-support .support-list{max-height:75vh;overflow-y:auto}.zj-support select{max-width:100%;padding:8px}.zj-support .support-attachments img{width:64px;height:64px;object-fit:cover}.zj-support .support-message strong{display:block;margin-bottom:8px}.zj-support .support-message.internal strong{color:#755515}@media(max-width:700px){.zj-support{grid-template-columns:1fr}.zj-support .support-list{max-height:30vh}.zj-support .support-message{max-width:88%}.zj-support .support-message.internal{width:96%;max-width:96%}.legion-root .support-composer{padding:12px}.legion-root .support-toolbar{gap:8px}.legion-root .support-composer small{font-size:10px}}

/* Compact staff filters: one clear row, no stretched select or wrapped label. */
#support .support-filter-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0 16px}
#support .support-filter-tabs{display:flex;align-items:center;gap:4px;padding:4px;border:1px solid #dedbd7;background:#eceae7;border-radius:12px;min-width:0;overflow-x:auto}
#support .support-filter-tabs button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:auto;min-height:36px;padding:8px 18px;border:0;border-radius:8px;background:transparent;color:#66615c;white-space:nowrap;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
#support .support-filter-tabs button[aria-pressed=true]{background:#fff;color:#92251b;box-shadow:0 1px 4px #00000012}
#support .support-filter-tabs button:hover{color:#92251b;background:#ffffff80}
#support .support-refresh{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;padding:11px;border:1px solid #d7d2cc;border-radius:10px;background:#fff;color:#5a5149;cursor:pointer}
#support .support-refresh svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#support .support-refresh:hover{background:#f6efea;border-color:#b99c83}
#support .support-refresh:disabled{opacity:.55;cursor:wait}
#support .support-refresh[aria-busy=true] svg{animation:support-refresh-spin 1s linear infinite}
#support .support-filter-tabs button:focus-visible,#support .support-refresh:focus-visible{outline:2px solid #b44332;outline-offset:2px}
#support [data-support-status]:empty{display:none}
@keyframes support-refresh-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#support .support-refresh[aria-busy=true] svg{animation:none}}
@media(max-width:600px){#support .support-filter-bar{gap:8px}#support .support-filter-tabs button{padding:8px 12px;font-size:12px}}

#support .support-search{display:flex;gap:10px;align-items:center;margin:0 0 18px;max-width:760px}
#support .support-search input{min-width:0;flex:1;margin:0;height:42px}
#support .support-search button{flex:0 0 auto;height:42px;white-space:nowrap}
#support .support-thread{color:#302c29;overflow-wrap:anywhere}
#support .support-thread strong{font-size:14px;line-height:1.5}
#support .support-thread-subject{display:block;font-size:12px;margin:5px 0;color:#716b65}
#support .support-thread small{font-size:11px;line-height:1.7;color:#77716b}
#support .support-customer-name{display:block;font-size:16px;margin:6px 0}
#support .support-controls{align-items:center}
#support .support-controls select{width:auto;min-width:130px;flex:1;max-width:220px;margin:0;height:40px}
#support .support-controls button{white-space:nowrap;min-height:40px}

/* Staff workspace: conversation and customer record share one workspace. */
#support .zj-support{grid-template-columns:minmax(200px,280px) minmax(0,1fr);gap:18px;align-items:start}
#support [data-support-detail]{padding:0;overflow:hidden;min-width:0}
#support .support-detail-grid{display:grid;grid-template-columns:minmax(340px,1fr) minmax(250px,320px)}
#support .support-chat-column{padding:22px;min-width:0}
#support .support-chat-column h2{font-size:18px;margin:0 0 18px}
#support .support-customer-panel{min-width:0;border-left:1px solid #e5e1dc;background:#faf9f7;padding:18px}
#support .support-context{background:#fff;border:1px solid #e5e1dc;font-size:12px;line-height:1.6}
#support .support-country{display:block;font-size:12px;margin:10px 0;color:#5b5148}
#support .support-orders{margin-top:22px}
#support .support-orders-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}
#support .support-orders-heading h3{font-size:15px;margin:0}
#support .support-order-refresh{padding:5px 10px;font-size:20px;line-height:1}
#support .support-order{background:#fff;border:1px solid #e2ded9;border-radius:10px;margin:10px 0;overflow:hidden}
#support .support-order summary{cursor:pointer;padding:12px;list-style:none}
#support .support-order summary:focus-visible{outline:2px solid #a54730;outline-offset:-3px}
#support .support-order-title{display:flex;justify-content:space-between;gap:8px;font-size:13px;margin-bottom:6px}
#support .support-order summary small{font-size:11px;color:#777}
#support .support-order[open] summary{background:#f3ede7;border-bottom:1px solid #e2ded9}
#support .support-order-content{padding:12px;font-size:12px;overflow-wrap:anywhere}
#support .support-order-item{display:flex;gap:8px;margin:8px 0 14px}
#support .support-order-item img{width:42px;height:42px;object-fit:cover;border-radius:6px;flex:none}
#support .support-order-item strong,#support .support-order-item small{display:block;margin-bottom:4px;line-height:1.4}
#support .support-order-item small{font-size:11px;color:#6b635d}
#support .support-muted{font-size:12px;color:#80776f}
#support .support-address{white-space:pre-wrap;line-height:1.6}
#support .support-shipment{border-top:1px solid #eee;padding-top:10px;margin-top:10px}
@media(max-width:1150px){#support .zj-support{grid-template-columns:220px minmax(0,1fr)}#support .support-detail-grid{grid-template-columns:1fr}#support .support-customer-panel{border-left:0;border-top:1px solid #e5e1dc}}
@media(max-width:700px){#support .zj-support{grid-template-columns:1fr}#support .support-search{flex-wrap:wrap}#support .support-search input{flex-basis:100%}#support .support-chat-column{padding:16px}}

/* Authenticated staff workspace only; storefront chat styles remain independent. */
body.support-workspace-page main{padding-top:22px;padding-bottom:20px;max-width:none}
body.support-workspace-page header{margin-bottom:12px}
body.support-workspace-page header .eyebrow,body.support-workspace-page header .subtitle,body.support-workspace-page #notice:not(.error){display:none}
body.support-workspace-page header h1{font-size:23px}
#support>p:first-child{font-size:11px;color:#777;line-height:1.5;margin:6px 0 10px}
#support .zj-support{height:var(--support-workspace-height,68vh);min-height:360px;grid-template-columns:minmax(205px,250px) minmax(0,1fr);gap:12px;align-items:stretch}
#support .support-list{max-height:none;height:100%;min-height:0;overflow-y:auto;padding:4px;overscroll-behavior:contain;scrollbar-gutter:stable}
#support .support-thread{display:block;width:100%;margin:0 0 6px;padding:13px 12px;border-radius:10px;border-color:transparent;background:transparent;text-align:left;transition:background .12s}
#support .support-thread:hover{background:#eeece9}
#support .support-thread.active{border-color:#dfc2be;background:#fff0ed;box-shadow:inset 3px 0 0 var(--accent,#b30000)}
#support .support-thread-heading{display:flex;align-items:center;gap:7px;min-width:0}
#support .support-thread-heading strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
#support .support-thread-time{flex:0 0 auto;font-size:10px;color:#777;font-variant-numeric:tabular-nums}
#support .support-thread-count{display:inline-flex;align-items:center;justify-content:center;background:var(--accent,#b30000);color:#fff;min-width:18px;height:18px;border-radius:10px;padding:0 4px;font-size:10px;line-height:1}
#support .support-thread-preview{display:block;margin:5px 0 4px;font-size:12px;color:#484746;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#support .support-thread-meta{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
#support [data-support-detail]{margin:0;height:100%;min-height:0;position:relative;background:#fff}
#support .support-detail-grid{height:100%;min-height:0;grid-template-columns:minmax(285px,1fr) minmax(235px,285px)}
#support .support-chat-column{display:flex;flex-direction:column;height:100%;min-height:0;padding:16px;position:relative}
#support .support-conversation-heading{display:flex;align-items:center;gap:10px;flex:none;min-height:36px}
#support .support-conversation-heading h2{font-size:16px;line-height:1.4;margin:0;flex:1;min-width:0;overflow-wrap:anywhere}
#support .support-chat-column>.support-controls{flex:none;margin:10px 0;padding-bottom:10px;border-bottom:1px solid #eee;gap:6px}
#support .support-chat-column>.support-controls select{min-width:90px;max-width:180px;font-size:12px;height:34px;padding:6px 8px}
#support .support-chat-column>.support-controls button{font-size:12px;min-height:34px;padding:6px 9px}
#support .support-history{flex:1;min-height:60px;max-height:none;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;overflow-anchor:none;gap:12px;padding:12px 6px}
#support .support-message{max-width:88%;padding:10px 12px;font-size:13px;line-height:1.6;border-radius:12px}
#support .support-message strong{font-size:10px;color:#666;margin-bottom:4px}
#support .support-message time{font-size:10px;color:#777;margin-top:5px;font-variant-numeric:tabular-nums}
#support .support-message-body{white-space:pre-wrap;overflow-wrap:anywhere}
#support .support-message img{border-radius:7px;margin-top:8px;max-width:min(220px,100%);max-height:200px}
#support .support-customer-panel{height:100%;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:14px;background:#faf9f7}
#support .support-reply-composer{flex:0 0 auto;padding:10px 0 0;border-top:1px solid #e8e6e3;max-height:46%;overflow-y:auto}
#support .support-reply-composer>textarea{margin:8px 0;min-height:68px;max-height:140px;resize:vertical;padding:10px 12px;font-size:13px;border-color:#d2ceca}
#support .support-reply-composer>label{display:flex;gap:6px;align-items:center;font-size:11px;line-height:1.5;margin:5px 0}
#support .support-reply-composer>label input[type=checkbox]{flex:none;width:15px;height:15px;margin:0;accent-color:var(--accent,#b30000)}
#support .support-reply-composer>input[type=file]{margin:6px 0;padding:6px;font-size:11px;border:0;background:#f5f4f2}
#support .support-reply-tools>.support-controls{margin:0;gap:6px}
#support .support-reply-tools select{font-size:12px;height:32px;padding:5px 8px;min-width:140px}
#support .support-reply-tools button{min-height:32px;padding:5px 10px;font-size:12px}
#support .support-reply-tools details{font-size:11px;margin:5px 0}
#support .support-reply-tools details[open]{padding:8px;background:#f5f4f2;border-radius:7px}
#support .support-shortcut-hint{display:block;font-size:10px;color:#888}
#support .support-reply-feedback{margin:6px 0 0;font-size:12px;line-height:1.5;min-height:0}
#support .support-reply-feedback:empty{display:none}
#support .support-reply-composer>button[type=submit]{float:right;min-height:34px;padding:7px 18px}
#support .support-compose-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:7px}
#support .support-compose-actions button[type=submit]{min-height:34px;padding:7px 18px}
#support .support-attach-button{display:flex;align-items:center;justify-content:center;min-height:32px;width:34px;font-size:22px;padding:3px}
#support .support-attachments{display:flex;flex-wrap:wrap;gap:7px}
#support .support-attachment-preview{position:relative;display:inline-flex}
#support .support-attachment-preview img{width:54px;height:54px;border-radius:6px;object-fit:cover}
#support .support-attachment-remove{position:absolute;right:-4px;top:-4px;display:flex;align-items:center;justify-content:center;min-height:22px;width:22px;border:1px solid #ccc;border-radius:50%;background:#fff;color:#333;font-size:17px;padding:0}
#support .support-new-messages{flex:none;align-self:center;border-radius:20px;font-size:12px;padding:5px 12px;min-height:30px;background:#fff;box-shadow:0 2px 7px #00000012}
#support .support-back,#support .support-customer-toggle,#support .support-customer-close{display:none}
#support .support-list-empty{padding:20px 10px;font-size:13px;color:#777}
@media(max-width:1279px){#support .support-detail-grid{grid-template-columns:minmax(0,1fr)}#support .support-customer-panel{display:none}#support .support-customer-toggle{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:6px 10px;font-size:12px}#support .support-show-customer .support-customer-panel{display:block;position:absolute;right:0;top:0;bottom:0;width:min(330px,95%);z-index:3;border-left:1px solid #ddd;box-shadow:-8px 0 22px #00000012}#support .support-customer-close{display:flex;align-items:center;justify-content:center;width:32px;margin-left:auto;padding:3px;min-height:32px;font-size:20px}}
@media(max-width:700px){#support .zj-support{display:block;min-height:440px}#support .support-list{height:100%}#support [data-support-detail]{display:none}#support.support-has-thread .support-list{display:none}#support.support-has-thread [data-support-detail]{display:block}#support .support-back{display:inline-flex;align-items:center;justify-content:center;width:32px;min-height:32px;padding:4px;font-size:23px}#support .support-chat-column{padding:12px}#support .support-search{margin-bottom:10px}#support .support-filter-bar{margin:10px 0}#support .support-message{max-width:92%}}
@media(prefers-reduced-motion:reduce){#support .support-thread{transition:none}}
