.chat-file-picker { position:relative; display:flex; flex-shrink:0; }
.chat-file-picker > button { border:0; width:42px; height:42px; padding:0; border-radius:50%; display:grid; place-items:center; background:#f2f4f7; color:#858da3; cursor:pointer; }
.chat-file-picker > button:hover:not(:disabled) { background:#eaeaf5; color:#6866a2; }
.chat-file-picker > button:disabled { opacity:.45; cursor:default; }
.chat-file-feedback { position:absolute; bottom:54px; left:0; width:260px; max-width:65vw; padding:10px 12px; border:1px solid #e6e8ef; box-shadow:0 6px 24px #202a4812; background:#fff; border-radius:12px; font-size:11px; line-height:1.65; color:#7d849b; z-index:5; display:flex; gap:9px; align-items:flex-start; }
.chat-file-feedback.is-error { color:#a16d62; }
.chat-file-feedback > button { display:flex; padding:0; border:0; background:none; color:inherit; flex-shrink:0; }
.chat-file-drafts { display:flex; flex-wrap:wrap; gap:8px; padding:0; margin:0 0 12px; list-style:none; max-height:152px; overflow:auto; }
.chat-file-draft { display:flex; align-items:center; gap:9px; min-width:0; max-width:min(300px,100%); box-sizing:border-box; background:#fff; border:1px solid #e6e8ef; border-radius:12px; padding:7px; color:#646d83; }
.chat-file-draft > img, .chat-file-icon { width:38px; height:38px; border-radius:7px; flex-shrink:0; object-fit:cover; }
.chat-file-icon { display:grid; place-items:center; background:#f2f3f8; color:#8b90aa; }
.chat-file-copy { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
.chat-file-copy strong { font-size:12px; line-height:1.5; font-weight:550; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-file-copy small { font-size:10px; line-height:1.5; color:#9299ac; }
.chat-file-draft > button { border:0; padding:0; width:28px; height:28px; flex-shrink:0; display:grid; place-items:center; border-radius:7px; background:none; color:#989eb0; cursor:pointer; }
.chat-file-draft > button:disabled { opacity:.4; }
.chat-file-messages { width:100%; min-width:0; display:flex; flex-direction:column; gap:9px; }
.chat-file-message { display:flex; flex-direction:column; gap:7px; width:280px; max-width:100%; min-width:0; color:#5d6180!important; text-decoration:none!important; border-radius:9px; }
.chat-file-photo { display:block; width:100%; height:auto; max-height:280px; object-fit:contain; border-radius:12px; background:#ffffff66; }
.chat-file-message.is-image { width:320px; }
.chat-file-preview, .chat-file-download { display:block; min-width:0; color:inherit!important; text-decoration:none!important; border-radius:12px; }
.chat-file-preview { overflow:hidden; width:100%; padding:0; border:0; background:transparent; cursor:zoom-in; }
.chat-file-preview-error { min-height:150px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; background:#ffffff66; color:#787d97; font-family:inherit; font-size:12px; font-weight:500; line-height:1.5; }
.chat-file-preview:focus-visible, .chat-file-download:focus-visible { outline:2px solid #8277ed; outline-offset:3px; }
.chat-file-label { display:flex; align-items:center; gap:10px; min-width:0; box-sizing:border-box; padding:10px; border:1px solid #8584ad24; border-radius:12px; background:#ffffffb8; }
.chat-file-label .chat-file-icon { background:#fff; }
.chat-file-label .chat-file-copy small { color:#767d91; }
.chat-file-label > svg { flex-shrink:0; box-sizing:content-box; padding:7px; border-radius:50%; background:#8277ed12; color:#7670ab; }
.chat-file-message:hover .chat-file-label { background:#fff; border-color:#8584ad40; }
.chat-file-message:hover .chat-file-copy strong { color:#4e63b9; }
.chat-file-message:focus-visible, .chat-file-picker > button:focus-visible, .chat-file-draft > button:focus-visible, .chat-file-feedback > button:focus-visible { outline:2px solid #8277ed; outline-offset:3px; }
.cc-bubble:has(> .chat-file-messages), .ac-bubble:has(> .chat-file-messages), .cc-bubble:has(> .chat-file-drafts), .ac-bubble:has(> .chat-file-drafts) { display:grid; grid-template-columns:minmax(0,1fr); width:max-content; }
.ac-bubble:has(> .chat-file-messages) > .ac-inline-time, .cc-bubble:has(> .chat-file-messages) > .cc-message-meta { justify-self:end; margin-left:auto; }
.cc-bubble .chat-file-drafts, .ac-bubble .chat-file-drafts { width:100%; margin:0; }
.cc-bubble .chat-file-draft, .ac-bubble .chat-file-draft { background:#ffffff66; border:0; }
.cc-widget .chat-file-picker > button { width:34px; height:34px; }
.cc-widget .chat-file-draft { max-width:100%; }
.cc-widget .chat-file-drafts { max-height:105px; }
.cc-widget .chat-file-photo { max-height:190px; }
.cc-attempt-status, .ac-send-status { flex-wrap:wrap; }
.chat-image-viewer { position:fixed; inset:0; width:100%; height:100vh; height:100dvh; z-index:30000; display:grid; grid-template-rows:auto minmax(0,1fr) auto; overflow:hidden; box-sizing:border-box; background:#141518; color:#f4f4f6; font-family:Manrope,system-ui,sans-serif; text-align:left; isolation:isolate; overscroll-behavior:none; }
.chat-image-viewer *, .chat-image-viewer *::before, .chat-image-viewer *::after { box-sizing:border-box; }
.chat-image-viewer-header { display:flex; align-items:center; justify-content:space-between; gap:20px; min-width:0; padding:calc(12px + env(safe-area-inset-top,0px)) max(20px,env(safe-area-inset-right,0px)) 12px max(24px,env(safe-area-inset-left,0px)); }
.chat-image-viewer-header h2 { margin:0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; line-height:1.5; font-weight:550; color:#e7e7ed; }
.chat-image-viewer-heading { display:flex; align-items:center; gap:14px; min-width:0; }
.chat-image-viewer-count { flex-shrink:0; color:#a3a4ad; font-size:12px; line-height:1.5; font-variant-numeric:tabular-nums; white-space:nowrap; }
.chat-image-viewer-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.chat-image-viewer button, .chat-image-viewer-actions a { display:grid; place-items:center; width:44px; height:44px; min-width:44px; padding:0; border:0; border-radius:12px; background:transparent; color:#ededf2; text-decoration:none; font:inherit; cursor:pointer; touch-action:manipulation; }
.chat-image-viewer button:hover:not(:disabled), .chat-image-viewer-actions a:hover { background:#ffffff14; }
.chat-image-viewer button:disabled { color:#727379; cursor:default; }
.chat-image-viewer button:focus-visible, .chat-image-viewer a:focus-visible, .chat-image-viewer-stage:focus-visible { outline:2px solid #b5afff; outline-offset:-3px; }
.chat-image-viewer-stage { position:relative; min-width:0; min-height:0; overflow:hidden; touch-action:none; overscroll-behavior:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; outline:none; cursor:zoom-in; }
.chat-image-viewer-stage.is-zoomed { cursor:grab; }
.chat-image-viewer-stage.is-dragging { cursor:grabbing; }
.chat-image-viewer button.chat-image-viewer-nav { position:absolute; top:50%; transform:translateY(-50%); z-index:2; width:48px; height:48px; border:1px solid #ffffff20; border-radius:50%; background:#232428de; color:#ededf2; }
.chat-image-viewer button.chat-image-viewer-nav:hover:not(:disabled) { background:#34353bf0; }
.chat-image-viewer button.chat-image-viewer-nav:disabled { opacity:.25; cursor:default; }
.chat-image-viewer-nav.is-previous { left:20px; }
.chat-image-viewer-nav.is-next { right:20px; }
.chat-image-viewer-image { position:absolute; display:block; max-width:none!important; max-height:none!important; margin:0; object-fit:contain; transform-origin:center; pointer-events:none; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-user-drag:none; }
.chat-image-viewer-status, .chat-image-viewer-error { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px; padding:20px; margin:0; text-align:center; color:#bfc0c9; font-size:14px; line-height:1.6; cursor:default; }
.chat-image-viewer-error p { margin:0; }
.chat-image-viewer-error button { display:block; width:auto; padding:0 18px; border:1px solid #ffffff30; border-radius:10px; font-size:13px; }
.chat-image-viewer-footer { display:flex; flex-direction:column; align-items:center; gap:12px; padding:14px 16px calc(18px + env(safe-area-inset-bottom,0px)); }
.chat-image-viewer-controls { display:flex; align-items:center; gap:4px; padding:4px; border:1px solid #ffffff12; border-radius:16px; background:#242529; }
.chat-image-viewer-controls output { min-width:55px; font-size:13px; font-weight:500; text-align:center; font-variant-numeric:tabular-nums; }
.chat-image-viewer-divider { height:20px; width:1px; margin:0 4px; background:#ffffff20; }
.chat-image-viewer-footer p { margin:0; color:#91929c; font-size:11px; line-height:1.5; text-align:center; }
.chat-image-viewer-footer p.is-error { color:#efb6ad; }
@media(max-width:760px) {
  .chat-file-picker > button, .chat-file-draft > button, .chat-file-feedback > button { width:44px; height:44px; min-width:44px; min-height:44px; }
  .chat-file-feedback { max-width:min(300px,calc(100vw - 80px)); width:max-content; box-sizing:border-box; align-items:center; }
  .chat-file-draft { max-width:100%; }
  .chat-file-message { min-height:44px; }
  .chat-image-viewer-header { gap:12px; padding-left:max(16px,env(safe-area-inset-left,0px)); padding-right:max(12px,env(safe-area-inset-right,0px)); }
  .chat-image-viewer-header h2 { font-size:12px; }
  .chat-image-viewer-heading { flex-direction:column; align-items:flex-start; gap:2px; }
  .chat-image-viewer-heading h2 { max-width:100%; }
  .chat-image-viewer-count { font-size:11px; }
  .chat-image-viewer button.chat-image-viewer-nav { display:none; }
  .chat-image-viewer-stage.has-error button.chat-image-viewer-nav { display:grid; top:auto; bottom:16px; transform:none; }
  .chat-image-viewer-actions { gap:2px; }
  .chat-image-viewer-footer { gap:8px; padding-top:10px; padding-bottom:calc(12px + env(safe-area-inset-bottom,0px)); }
  .chat-image-viewer-footer p { max-width:260px; font-size:10px; }
}
