/* Styled HTML chat documents use an opaque, scriptless frame. The frame
   scrolls internally; the modal does not add a competing scroll pane. */
.pc-document-frame{display:block;width:100%;height:clamp(168px,45vh,360px);height:clamp(168px,45dvh,360px);border:0;background:#fff}
.pc-document-viewer-scroll.pc-document-viewer-styled{padding:0;display:grid;grid-template:minmax(0,1fr)/minmax(0,1fr);overflow:hidden;scrollbar-gutter:auto;min-width:0;min-height:0}
.pc-document-frame.pc-document-frame-fullscreen{width:100%;height:100%;min-width:0;min-height:0}

/* Full-width documents extend into the conversation gutter while message
   metadata and ordinary bubbles keep their existing inset. */
.pc-messages article.pc-message:has(>.pc-bubble>.pc-document-message[data-pc-explicit-layout="full-width"])>.pc-bubble{
 border:0!important;
 border-radius:0!important;
 background:transparent!important;
 box-shadow:none;
}
.pc-messages .pc-document-message[data-pc-explicit-layout="full-width"]{
 --pc-document-edge-left:var(--pc-conversation-gutter,20px);
 --pc-document-edge-right:var(--pc-conversation-gutter,20px);
}
.pc-messages .pc-document-message[data-pc-explicit-layout="full-width"]>:is(.pc-document-toolbar,.pc-document-body){
 width:auto;
 max-width:none;
 margin-left:calc(-1 * var(--pc-document-edge-left));
 margin-right:calc(-1 * var(--pc-document-edge-right));
}
.pc-messages .pc-document-message[data-pc-explicit-layout="full-width"]>.pc-document-toolbar{
 min-height:45px;
 padding:0 max(4px,env(safe-area-inset-right,0px)) 0 max(8px,env(safe-area-inset-left,0px));
 border-radius:0;
 border-top:1px solid #d5e1e8;
}
.pc-shell .pc-messages .pc-document-message[data-pc-explicit-layout="full-width"]>.pc-document-toolbar button.pc-document-tool{
 flex-basis:44px;
 width:44px;
 min-width:44px;
 height:44px;
 min-height:44px;
 max-height:44px;
}
.pc-messages .pc-document-message[data-pc-explicit-layout="full-width"]>.pc-document-body{
 padding-inline:0;
 border-bottom:1px solid #d5e1e8;
}
.pc-messages .pc-document-message[data-pc-explicit-layout="full-width"]>.pc-document-body:has(iframe.pc-document-frame){
 padding-block:0;
}
.pc-messages .pc-document-message[data-pc-explicit-layout="full-width"]>.pc-document-body .pc-rich-image-link:not(.pc-image-gallery > .pc-rich-image-link){
 max-width:100%;
}
.pc-messages .pc-document-message[data-pc-explicit-layout="full-width"]>.pc-document-body .pc-rich-image-link:not(.pc-image-gallery > .pc-rich-image-link)>.pc-rich-image{
 max-height:none;
 border-radius:0;
}
@media(max-width:700px){
 .pc-messages .pc-document-message[data-pc-explicit-layout="full-width"]{
  --pc-document-edge-left:max(var(--pc-conversation-gutter,12px),env(safe-area-inset-left,0px));
  --pc-document-edge-right:max(var(--pc-conversation-gutter,12px),env(safe-area-inset-right,0px));
 }
 .pc-messages .pc-document-message[data-pc-explicit-layout="full-width"]>.pc-document-body{
  padding-left:env(safe-area-inset-left,0px);
  padding-right:env(safe-area-inset-right,0px);
 }
}

.pc-messages article.pc-message:has(>.pc-bubble>.pc-document-message[data-pc-explicit-layout="full-width"][data-pc-document-type="html"])>.pc-reply-context{
 display:flex;align-items:flex-start;gap:8px;width:fit-content;max-width:min(100%,36rem);min-width:0;min-height:44px;
 margin:2px 0 8px;padding:6px 10px;border:1px solid var(--pc-line,#dce5ea);border-inline-start:2px solid #95b4ad;border-radius:7px;
 background:#f5f8f8;color:var(--pc-ink,#152b3b);white-space:normal;text-align:start;
}
.pc-messages article.pc-message:has(>.pc-bubble>.pc-document-message[data-pc-explicit-layout="full-width"][data-pc-document-type="html"])>.pc-reply-context>svg{
 flex:0 0 14px;width:14px;height:14px;margin-top:2px;color:var(--pc-accent,#12685f);
}
.pc-messages article.pc-message:has(>.pc-bubble>.pc-document-message[data-pc-explicit-layout="full-width"][data-pc-document-type="html"])>.pc-reply-context .pc-reply-context-text{display:block;min-width:0}
.pc-messages article.pc-message:has(>.pc-bubble>.pc-document-message[data-pc-explicit-layout="full-width"][data-pc-document-type="html"])>.pc-reply-context strong{
 margin:0 0 2px;font-size:12px;font-weight:650;line-height:1.3;color:var(--pc-accent,#12685f);white-space:normal;overflow-wrap:anywhere;
}
.pc-messages article.pc-message:has(>.pc-bubble>.pc-document-message[data-pc-explicit-layout="full-width"][data-pc-document-type="html"])>.pc-reply-context strong::before{content:none}
.pc-messages article.pc-message:has(>.pc-bubble>.pc-document-message[data-pc-explicit-layout="full-width"][data-pc-document-type="html"])>.pc-reply-context .pc-reply-excerpt{
 display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:normal;overflow-wrap:anywhere;
 font-size:12px;line-height:1.4;color:#425b68;
}
.pc-messages article.pc-message:has(>.pc-bubble>.pc-document-message[data-pc-explicit-layout="full-width"][data-pc-document-type="html"])>.pc-reply-context:hover{background:#ecf4f2}
.pc-messages article.pc-message:has(>.pc-bubble>.pc-document-message[data-pc-explicit-layout="full-width"][data-pc-document-type="html"])>.pc-reply-context:focus-visible{outline:2px solid var(--pc-accent,#12685f);outline-offset:2px}
.pc-messages article.pc-message:has(>.pc-bubble>.pc-document-message[data-pc-document-type="html"])>.pc-bubble>.pc-message-targets{
 padding:0 0 4px;
 color:#536c88;
}
/* A full-width HTML report keeps an inset for reading and room for its images. */
.pc-messages .pc-document-message[data-pc-document-type="html"]{
 --pc-report-inset:clamp(12px,3.6vw,16px);
 --pc-report-left:max(var(--pc-report-inset),env(safe-area-inset-left,0px));
 --pc-report-right:max(var(--pc-report-inset),env(safe-area-inset-right,0px));
}
.pc-messages .pc-document-message[data-pc-document-type="html"]>.pc-document-toolbar{
 padding-left:var(--pc-report-left);
}
.pc-messages .pc-document-message[data-pc-document-type="html"]>.pc-document-body:not(:has(iframe.pc-document-frame)){
 padding:15px var(--pc-report-right) 18px var(--pc-report-left);
}
.pc-document-message[data-pc-document-type="html"] :is(.pc-document-body,.pc-document-viewer-content) .pc-message-content{
 color:var(--pc-ink,#152b3b);
 line-height:1.6;
}
.pc-document-message[data-pc-document-type="html"] :is(.pc-document-body,.pc-document-viewer-content) :is(h1,h2,h3,h4,h5,h6){
 margin:1.15em 0 .45em;
 line-height:1.3;
}
.pc-document-message[data-pc-document-type="html"] :is(.pc-document-body,.pc-document-viewer-content) :is(h1,h2,h3,h4,h5,h6):first-child{margin-top:0}
.pc-document-message[data-pc-document-type="html"] :is(.pc-document-body,.pc-document-viewer-content) h1{font-size:1.45em}
.pc-document-message[data-pc-document-type="html"] :is(.pc-document-body,.pc-document-viewer-content) h2{font-size:1.22em}
.pc-document-message[data-pc-document-type="html"] :is(.pc-document-body,.pc-document-viewer-content) :is(h3,h4,h5,h6){font-size:1.08em}
.pc-document-message[data-pc-document-type="html"] :is(.pc-document-body,.pc-document-viewer-content) mark{
 background:#e7f2ed;color:var(--pc-accent,#12685f);padding:.08em .3em;border-radius:.25em;
}
.pc-document-message[data-pc-document-type="html"] :is(.pc-document-body,.pc-document-viewer-content) figure{margin-block:1.1em}
.pc-document-message[data-pc-document-type="html"] :is(.pc-document-body,.pc-document-viewer-content) figcaption{
 margin-top:.4em;color:#486474;font-size:.88em;line-height:1.5;
}
.pc-document-message[data-pc-document-type="html"] :is(.pc-document-body,.pc-document-viewer-content) figure:has(>figcaption)>.pc-rich-image-link:not(.pc-rich-image-failed)>.pc-rich-image-caption{
 display:none;
}
.pc-messages .pc-document-message[data-pc-explicit-layout="full-width"][data-pc-document-type="html"]>.pc-document-body figure:has(>.pc-rich-image-link):not(:is(blockquote,li,details) *)>.pc-rich-image-link{
 display:flex;
 width:max-content;
 max-width:calc(100% + var(--pc-report-left) + var(--pc-report-right));
 margin:0 calc(-1 * var(--pc-report-right)) 0 calc(-1 * var(--pc-report-left));
}
.pc-document-message[data-pc-document-type="html"] .pc-document-body figure:has(>.pc-rich-image-link):not(:is(blockquote,li,details) *)>.pc-rich-image-link>.pc-rich-image-caption{
 padding-inline:var(--pc-report-left) var(--pc-report-right);
}
.pc-document-message[data-pc-document-type="html"] .pc-document-body figure>.pc-rich-image-link{margin-block:0}
