/* Conversation styling is scoped to the support dialog. */
#modal:has(#support-messages){width:min(760px,94vw);border-radius:24px;padding:24px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
#modal .support-heading{padding-bottom:18px;margin-bottom:16px;border-bottom:1px solid var(--ui-border,#e7e7e9);}
#modal .support-heading h2{font-size:21px;letter-spacing:-.5px;line-height:1.3;margin:0;}
#modal .support-heading-kicker{display:block;font-size:12px;line-height:1.5;color:var(--ui-muted,#737378);}
#modal .support-contact{display:flex;align-items:center;gap:12px;min-width:0;}
#modal .support-avatar{display:block;flex:none;width:32px;height:32px;overflow:hidden;border-radius:50%;background:#dadadd;}
#modal .support-avatar img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;transform:none;filter:none;}
#modal .support-contact .support-avatar{width:48px;height:48px;}
#modal .support-heading>button{border-radius:20px;font-size:12px;flex:none;}
#modal #support-status:empty{display:none;}
#modal #support-messages{height:clamp(180px,36vh,380px);margin:16px 0;padding:16px 12px;background:var(--ui-panel,#fff);border:1px solid var(--ui-border,#e8e8ec);border-radius:18px;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;}
#modal #support-messages:empty,#modal #support-messages:has(>p.muted:only-child){height:min(16vh,120px);}
#modal #support-messages>.muted{margin:16px;text-align:center;font-size:13px;}
#modal .support-entry{display:flex;align-items:flex-end;gap:9px;margin:0 0 18px;}
#modal .support-entry:last-child{margin-bottom:0;}
#modal .support-outgoing{flex-direction:row-reverse;}
#modal .support-entry>.support-avatar{margin-bottom:22px;}
#modal .support-message-content{display:flex;flex-direction:column;align-items:flex-start;max-width:calc(85% - 41px);min-width:0;}
#modal .support-outgoing .support-message-content{align-items:flex-end;}
#modal .support-author{font-size:11px;font-weight:600;line-height:1.4;color:var(--ui-muted,#6c6c72);margin:0 8px 5px;overflow-wrap:anywhere;}
#modal .support-outgoing .support-author{text-align:right;}
#modal .support-message{--bubble-color:#ededf0;position:relative;isolation:isolate;max-width:100%;margin:0;padding:11px 16px;border:0;border-radius:21px;background:var(--bubble-color);color:#232326;line-height:1.5;font-size:14px;}
#modal .support-message::before{content:"";position:absolute;z-index:-1;bottom:0;left:-6px;width:16px;height:18px;background:var(--bubble-color);clip-path:path("M 16 0 C 13 11 8 15 0 16 C 6 18 12 16 16 13 Z");}
#modal .support-outgoing .support-message::before{left:auto;right:-6px;transform:scaleX(-1);}
#modal .support-message p{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;}
#modal .support-message.support-admin{--bubble-color:#eb5e15;color:#fff;}
#modal .support-time{display:block;font-size:10px;line-height:1.4;font-variant-numeric:tabular-nums;color:var(--ui-muted,#797980);margin:5px 8px 0;}
#modal .support-file-link{margin:8px 0 0;border:1px solid #0002;border-radius:12px;padding:10px;color:inherit;}
#modal .support-file-link:only-child{margin-top:0;}
#modal .support-file-link>span{min-width:0;}
#modal .support-file-link small{color:inherit;opacity:.85;}
#modal .support-admin .support-file-link{border-color:#ffffff70;background:#ffffff12;}
#modal .support-admin .support-file-link img{filter:brightness(0) invert(1);}
#modal #support-form{border-top:1px solid var(--ui-border,#e7e7e9);padding-top:14px;}
#modal #support-form>label{font-size:12px;font-weight:600;color:var(--ui-muted,#737378);}
#modal #support-body{min-height:70px;max-height:150px;border-radius:18px;padding:12px 15px;margin:8px 0;background:var(--ui-panel,#fff);border-color:var(--ui-border,#d9d9de);}
#modal .support-compose-actions{gap:9px;flex-wrap:wrap;}
#modal :is(#support-attach,#support-send){box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;flex:none;height:40px;min-height:40px;border:1px solid var(--ui-border,#dadada);border-radius:8px;line-height:20px;white-space:nowrap;}
#modal #support-attach{width:40px;min-width:40px;padding:8px;background:var(--ui-raised,#fff);color:var(--ui-text,#333);}
#modal #support-attach:hover:not(:disabled){background:var(--ui-hover,#efefef);border-color:var(--ui-muted,#aeaeae);}
#modal #support-send{background:#eb5e15;border-color:#eb5e15;color:#fff;padding:9px 22px;}
#modal #support-send:hover:not(:disabled){background:#eb5e15;border-color:#eb5e15;}
#modal :is(#support-attach,#support-send):disabled{opacity:.6;cursor:not-allowed;}
#modal :is(#support-attach,#support-send):focus-visible{outline:2px solid var(--ui-text,#333);outline-offset:3px;}
html[data-theme=dark] #modal .support-message{--bubble-color:#37383e;color:#f0f1f3;}
html[data-theme=dark] #modal .support-file-link{border-color:#ffffff30;}
html[data-theme=dark] #modal .support-admin .support-file-link{border-color:#ffffff70;}
html[data-theme=dark] #modal .support-message.support-admin{--bubble-color:#eb5e15;color:#fff;}
@media(max-width:520px){
 #modal:has(#support-messages){padding:16px;}
 #modal .support-heading h2{font-size:19px;}
 #modal #support-messages{padding:12px 10px;}
 #modal .support-message-content{max-width:calc(100% - 41px);}
 #modal .support-message{padding:10px 13px;}
}

/* Inline videos keep the same private message layout and never autoplay. */
#modal .support-video{width:min(420px,100%);margin-top:9px;overflow-wrap:anywhere;}
#modal .support-video:only-child{margin-top:0;}
#modal .support-video video{display:block;width:100%;max-height:320px;aspect-ratio:16/9;object-fit:contain;border-radius:13px;background:#191919;}
#modal .support-video-name{display:block;font-size:12px;font-weight:600;margin-top:8px;}
#modal .support-video small{display:block;color:inherit;font-size:11px;line-height:1.5;opacity:.9;margin-top:3px;}
#modal .support-video-download{display:inline-block;color:inherit;font-size:12px;text-underline-offset:3px;margin-top:7px;}
#modal .support-video-expired{font-size:12px;line-height:1.5;padding:9px 12px;border:1px solid #ffffff70;border-radius:12px;margin-top:6px;}
#modal .support-video-error{font-size:12px;line-height:1.45;margin-top:8px;}
#modal .support-video-error[hidden]{display:none;}
#modal .support-video-guidance{font-size:11px;line-height:1.5;color:var(--ui-muted,#737378);margin:8px 0 0;}
#modal[data-support-sending=true] #support-status{color:var(--ui-text,#333)!important;}
#modal .support-message:has(.support-video){min-width:min(320px,100%);}
#modal .support-message-content:has(.support-video){width:min(420px,calc(85% - 41px));}
@media(max-width:520px){#modal .support-message-content:has(.support-video){width:calc(100% - 41px);}}

/* Sender read receipts are separate from video playback or download. */
#modal .support-time{display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;}
#modal .support-outgoing .support-time{justify-content:flex-end;}
#modal .support-receipt{display:inline-flex;align-items:center;gap:4px;font-size:10px;white-space:nowrap;}
#modal .support-receipt svg{width:16px;height:12px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;overflow:visible;}
#modal .support-seen{color:#eb5e15;font-weight:650;}
html[data-theme=dark] #modal .support-seen{color:#eb5e15;}

/* Compact, keyboard-accessible removal control on the author's BCD bubbles only. */
#modal .support-message.support-removable{padding-right:44px;min-height:42px;}
#modal .support-delete{position:absolute;top:4px;right:4px;width:32px;height:32px;display:grid;place-items:center;padding:0;margin:0;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer;opacity:.85;}
#modal .support-delete svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;}
#modal .support-delete:hover{background:#ffffff26;opacity:1;}
#modal .support-delete:focus-visible{outline:2px solid currentColor;outline-offset:-3px;opacity:1;}
#modal .support-delete:disabled{opacity:.4;cursor:wait;}

#modal .support-image-open{display:block;width:min(340px,100%);padding:0;margin:8px 0 0;border:0;border-radius:12px;overflow:hidden;background:transparent;cursor:zoom-in}
#modal .support-image-open img{display:block;width:100%;max-height:260px;aspect-ratio:4/3;object-fit:contain;border-radius:12px}
#modal .support-image-open[hidden],#modal .support-image-fallback[hidden]{display:none!important}
#modal .support-image-fallback{color:inherit}
html body dialog.support-image-viewer{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;margin:0;padding:56px 5vw;background:transparent;overflow:hidden;box-shadow:none}
html body dialog.support-image-viewer::backdrop{background:#101214d9;backdrop-filter:blur(8px)}
.support-image-viewer img{display:block;width:fit-content;height:fit-content;max-width:90vw;max-height:calc(100dvh - 112px);object-fit:contain;position:absolute;inset:0;margin:auto;border-radius:10px}
html body .support-image-viewer button.site-close-button{position:absolute;top:16px;right:20px;background:#fff;color:#252525;border:1px solid #ddd}
.store-project-count{font-variant-numeric:tabular-nums;min-width:34px}
