/* Workbench conversations and purchases share the platform control palette. */
.wb-chat-dialog{box-sizing:border-box;width:min(900px,calc(100vw - 32px));height:min(800px,calc(100dvh - 40px));max-width:none;max-height:none;margin:auto;padding:0;border:0.5px solid #ccc;border-radius:16px;color:#303030;background:#fff;overflow:hidden}
.wb-chat-dialog[open]{display:grid;grid-template-rows:auto minmax(0,auto) minmax(80px,1fr) auto minmax(0,auto)}
.wb-chat-dialog::backdrop{background:rgba(0,0,0,.35)}
.wb-chat-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 24px 14px;border-bottom:0.5px solid #ddd}
.wb-chat-heading h2{margin:0;font-size:var(--xc-type-section,20px);line-height:1.4}.wb-chat-heading p{margin:5px 0 0;font-size:var(--xc-type-body,16px);color:#666;overflow-wrap:anywhere}
.wb-chat-info{min-height:0;max-height:26dvh;overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain}
.wb-chat-status{margin:0;padding:8px 24px;font-size:var(--xc-type-meta,12px);line-height:1.5;min-height:20px}.wb-chat-thread{position:relative;min-height:0;display:grid;grid-template-rows:minmax(0,1fr)}.wb-chat-transcript{min-height:0;overflow:auto;overscroll-behavior:contain;overflow-anchor:none;scrollbar-gutter:stable;padding:8px 24px}.wb-chat-jump{position:absolute;bottom:12px;right:24px;z-index:1}
.wb-chat-transcript .market-chat-history{margin:0;padding:0;list-style:none;gap:0;max-height:none;overflow:visible;border:0;border-radius:0;background:transparent}.wb-chat-transcript .market-chat-history>li{flex:none;max-width:84%;margin:0 0 16px}.wb-chat-transcript .market-chat-history>li.is-mine{margin-left:auto}
.wb-chat-transcript .market-chat-meta{font-size:var(--xc-type-meta,12px);color:#666;margin-bottom:6px}.wb-chat-transcript .market-chat-bubble{padding:12px 16px;border:0.5px solid #ddd;border-radius:12px;background:#f6f6f6;overflow-wrap:anywhere}.wb-chat-transcript .is-mine .market-chat-bubble{background:var(--xc-action-soft,#f7eee7)}.wb-chat-transcript .market-chat-bubble p{margin:0;line-height:1.65}.wb-chat-transcript .market-chat-bubble a{display:block;margin-top:6px}
.wb-chat-related{padding:10px 24px;border-top:0.5px solid #ddd;max-height:34dvh;overflow:auto}.wb-chat-related>summary{font-size:var(--xc-type-body,16px);cursor:pointer}.wb-chat-related .v2-section{margin:12px 0;padding:12px 0}
.wb-chat-dialog [data-chat-compose]{min-height:0;padding:14px 24px 20px;border-top:0.5px solid #ddd;max-height:38dvh;overflow:auto;overscroll-behavior:contain}
.wb-chat-dialog [data-chat-compose][hidden]{display:none}.wb-chat-dialog [data-chat-compose]>label,.wb-chat-dialog [data-chat-compose] details label{display:grid;gap:6px;margin:0;font-size:var(--xc-type-meta,12px)}
.wb-chat-dialog textarea{box-sizing:border-box;width:100%;min-width:0;min-height:80px;max-height:180px;margin:0;padding:10px 12px;border:0.5px solid #ccc;border-radius:8px;font:inherit;line-height:1.5;resize:vertical}
.wb-chat-dialog [data-chat-compose]>.actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;flex-wrap:wrap}.wb-chat-dialog [data-chat-compose] details{margin-top:8px}.wb-chat-dialog [data-chat-compose] summary{font-size:var(--xc-type-meta,12px);cursor:pointer}.wb-chat-dialog .button{min-height:44px}
.wb-chat-dialog textarea[name=body]{field-sizing:content;resize:none;overflow-y:auto;scrollbar-width:none;min-height:80px;max-height:180px;font-size:var(--xc-type-body,16px)}
.chat-unread{font-size:var(--xc-type-meta,12px);margin-left:6px}.product-create-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.product-create-options>section{padding:20px;border:0.5px solid #ddd;border-radius:12px;display:flex;flex-direction:column;align-items:flex-start}.product-create-options h2{margin:0 0 12px;font-size:var(--xc-type-section,20px)}.product-create-options p{line-height:1.7}.product-create-options .button{margin-top:auto}
.purchase-count{margin:20px 0 8px;color:#666;font-size:var(--xc-type-body,16px)}.purchase-list{list-style:none;margin:0;padding:0}.purchase-list>li{padding:24px 0;border-bottom:0.5px solid #ddd}.purchase-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.purchase-heading h2{font-size:var(--xc-type-section,20px);margin:10px 0 6px}.purchase-heading p{font-size:var(--xc-type-body,16px);color:#666;margin:0}.purchase-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px;margin:18px 0}.purchase-facts>div{min-width:0}.purchase-facts dt{font-size:var(--xc-type-meta,12px);color:#666}.purchase-facts dd{margin:5px 0 0;font-size:var(--xc-type-body,16px);line-height:1.7;overflow-wrap:anywhere}.purchase-list .actions{display:flex;flex-wrap:wrap;gap:16px}
@media(max-width:760px){.product-create-options{grid-template-columns:1fr}.purchase-facts{grid-template-columns:1fr}.wb-chat-dialog{width:calc(100vw - 16px);height:calc(100dvh - 16px);border-radius:12px}.wb-chat-heading{padding:16px}.wb-chat-status{padding:6px 16px}.wb-chat-transcript{padding:8px 16px}.wb-chat-related{padding:10px 16px}.wb-chat-dialog [data-chat-compose]{padding:12px 16px}.wb-chat-heading h2{font-size:var(--xc-type-section,20px)}.wb-chat-transcript .market-chat-history>li{max-width:92%}.purchase-heading{gap:12px}}


/* Keep composing inside the visual viewport while the mobile keyboard is open. */
body.keyboard-open .wb-chat-dialog[data-keyboard-dialog]{height:calc(var(--xc-visual-height,100dvh) - 16px);overflow:hidden;grid-template-rows:auto minmax(0,auto) minmax(0,1fr) auto minmax(0,auto)}
body.keyboard-open .wb-chat-dialog .wb-chat-heading{padding:8px 16px}
body.keyboard-open .wb-chat-dialog .wb-chat-heading>div{min-width:0}
body.keyboard-open .wb-chat-dialog .wb-chat-heading p{max-height:2.6em;overflow:auto}
body.keyboard-open .wb-chat-dialog .wb-chat-info{max-height:36px}
body.keyboard-open .wb-chat-dialog .wb-chat-related{padding:6px 16px;max-height:calc(var(--xc-visual-height,100dvh)*.25)}
body.keyboard-open .wb-chat-dialog [data-chat-compose]{max-height:calc(var(--xc-visual-height,100dvh)*.62)}
body.keyboard-open .wb-chat-dialog textarea[name=body]{max-height:clamp(80px,calc(var(--xc-visual-height,100dvh)*.22),140px)}

body.keyboard-open .wb-chat-dialog [data-chat-compose]>.actions{flex-wrap:nowrap;gap:8px}
body.keyboard-open .wb-chat-dialog [data-chat-compose]>.actions>small{flex:1;min-width:0;line-height:1.4}
body.keyboard-open .wb-chat-dialog [data-chat-compose]>.actions>button{flex:0 0 auto;width:auto;min-width:88px}

body.keyboard-open .wb-chat-status:empty{display:none}

/* Message fields scroll independently; the send controls remain in their own visible row. */
.wb-chat-dialog [data-chat-compose]{box-sizing:border-box;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:12px;overflow:hidden}
.wb-chat-fields{min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding:7px;margin:-7px}
.wb-chat-dialog .wb-chat-fields>label{display:grid;gap:6px;margin:0;font-size:var(--xc-type-meta,12px)}
.wb-chat-dialog [data-chat-compose]>.actions{margin-top:0}
.wb-chat-status:empty{display:none}
.wb-chat-notice{padding:0 24px}
.wb-chat-notice>summary{box-sizing:border-box;min-height:44px;padding:12px 0;font-size:var(--xc-type-meta,12px);line-height:20px;cursor:pointer}
.wb-chat-notice [data-chat-notice]{padding:0 0 12px}
@media(max-width:760px){.wb-chat-notice{padding-inline:16px}.wb-chat-heading{padding:12px 16px}.wb-chat-heading p{font-size:var(--xc-type-meta,12px);line-height:1.5}}
body.keyboard-open .wb-chat-dialog .wb-chat-info{max-height:44px}
body.keyboard-open .wb-chat-dialog .wb-chat-info:has([data-chat-notice-details][open]){max-height:calc(var(--xc-visual-height,100dvh)*.25)}

@media(max-width:760px){.wb-chat-dialog .wb-chat-fields textarea[name=body]{max-height:clamp(80px,16dvh,140px)}}
