/* Uses the same surfaces, typography and accent as SvoiCall's call workspace. */
#chat-image-attach { border:0; background:transparent; color:var(--sc-v2-text-secondary); font-size:24px; min-width:36px; min-height:44px; cursor:pointer; flex-shrink:0; border-radius:8px; }
#chat-image-attach:hover { color:var(--sc-v2-accent); background:var(--sc-v2-accent-soft); }
#chat-image-draft { display:flex; gap:10px; flex-wrap:wrap; align-items:center; padding:12px; background:var(--sc-v2-bg-control); border:1px solid var(--sc-v2-border); border-radius:12px; margin-bottom:10px; }
#chat-image-draft[hidden] { display:none; }
#chat-image-draft img { width:64px; height:64px; object-fit:contain; border-radius:8px; background:var(--sc-v2-bg-content); }
#chat-image-draft span { flex:1; min-width:120px; font-size:12px; line-height:1.5; color:var(--sc-v2-text-secondary); }
#chat-image-draft button { min-height:40px; border:1px solid var(--sc-v2-border); border-radius:9px; background:var(--sc-v2-bg-card); color:var(--sc-v2-text-primary); padding:8px 12px; cursor:pointer; font:500 12px var(--font-family); }
#chat-image-draft button:first-of-type { background:var(--sc-v2-accent); border-color:transparent; color:#fff; }
.chat-image-card { display:block; max-width:100%; min-height:64px; margin-top:8px; padding:0; border:1px solid var(--sc-v2-border); border-radius:12px; background:var(--sc-v2-bg-control); color:var(--sc-v2-text-secondary); overflow:hidden; cursor:zoom-in; }
.chat-image-card img { display:block; max-width:100%; max-height:260px; object-fit:contain; transition:opacity .15s; }
.chat-image-card:hover img { opacity:.88; }
@keyframes chatImageViewerPopIn {
  0% {
    opacity: 0;
    transform: scale(0.93) translateY(12px) translateZ(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) translateZ(0);
  }
}
@keyframes chatImageBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.chat-image-viewer { width:calc(100vw - 64px); height:calc(100dvh - 64px); max-width:1440px; max-height:1000px; margin:auto; padding:0; border:1px solid var(--sc-v2-border); border-radius:20px; background:var(--sc-v2-bg-window); color:var(--sc-v2-text-primary); box-shadow:0 32px 100px #0008; overflow:hidden; font-family:var(--font-family); }
.chat-image-viewer[open] { display:flex; flex-direction:column; animation: chatImageViewerPopIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) both; will-change: transform, opacity; }
.chat-image-viewer::backdrop { background:rgba(5,8,13,.78); backdrop-filter:blur(8px); }
.chat-image-viewer[open]::backdrop { animation: chatImageBackdropIn 0.24s cubic-bezier(0.16, 1, 0.3, 1) both; }
.chat-image-header { display:flex; align-items:center; justify-content:space-between; gap:20px; flex-shrink:0; padding:20px 24px; border-bottom:1px solid var(--sc-v2-border); background:var(--sc-v2-bg-glass); }
.chat-image-identity { display:flex; align-items:center; gap:12px; min-width:0; }
.chat-image-badge { width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:var(--sc-v2-accent-soft); color:var(--sc-v2-accent); flex-shrink:0; }
.chat-image-viewer svg { width:20px; height:20px; flex-shrink:0; }
.chat-image-identity h2 { font:600 16px/1.4 var(--header-family); margin:0 0 3px; color:var(--sc-v2-text-primary); }
.chat-image-identity p { font-size:12px; line-height:1.4; color:var(--sc-v2-text-secondary); white-space:nowrap; }
.chat-image-toolbar { display:flex; align-items:center; gap:8px; }
.chat-image-toolbar button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:40px; height:40px; padding:0 14px; border:1px solid var(--sc-v2-border); border-radius:10px; background:var(--sc-v2-bg-control); color:var(--sc-v2-text-primary); font:500 13px var(--font-family); cursor:pointer; transition:background .15s,opacity .15s; white-space:nowrap; }
.chat-image-toolbar button:hover { background:var(--bg-modifier-hover); }
.chat-image-toolbar button:focus-visible,#chat-image-attach:focus-visible,.chat-image-card:focus-visible { outline:2px solid var(--sc-v2-accent); outline-offset:3px; }
.chat-image-toolbar .chat-image-primary { background:var(--sc-v2-accent); color:#fff; border-color:transparent; }
.chat-image-toolbar .chat-image-primary:hover { background:var(--accent-blue-hover); }
.chat-image-toolbar button:disabled { opacity:.4; cursor:default; }
.chat-image-toolbar .chat-image-icon-button { padding:0; width:40px; }
.chat-image-icon-button .chat-image-action-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.chat-image-toolbar .chat-image-close { margin-left:8px; background:transparent; border-color:transparent; color:var(--sc-v2-text-secondary); }
.chat-image-stage { position:relative; flex:1; min-height:0; margin:16px 16px 0; padding:24px; display:flex; align-items:center; justify-content:center; overflow:hidden; touch-action:none; cursor:grab; border-radius:12px; background:#090b0f; }
.chat-image-stage:active { cursor:grabbing; }
.chat-image-stage img { max-width:100%; max-height:100%; object-fit:contain; user-select:none; flex-shrink:0; box-shadow:0 8px 40px #0004; }
.chat-image-stage img:not([src]) { display:none; }
.chat-image-viewer[data-loading=true] .chat-image-stage::after { content:''; position:absolute; width:28px; height:28px; border:2px solid #ffffff20; border-top-color:var(--sc-v2-accent); border-radius:50%; animation:chat-image-loading .8s linear infinite; }
.chat-image-controls { display:flex; justify-content:center; padding:14px 16px 8px; flex-shrink:0; }
.chat-image-zoom { gap:4px; padding:5px; border:1px solid var(--sc-v2-border); border-radius:14px; background:var(--sc-v2-bg-control-bar); box-shadow:0 4px 16px #0001; }
.chat-image-zoom button { background:transparent; border-color:transparent; height:36px; min-width:36px; padding:0 10px; }
.chat-image-zoom .chat-image-icon-button { width:36px; padding:0; }
.chat-image-zoom-value { min-width:52px; text-align:center; font-size:13px; font-variant-numeric:tabular-nums; color:var(--sc-v2-text-primary); }
.chat-image-tool-separator { width:1px; height:20px; margin:0 6px; background:var(--sc-v2-border); }
.chat-image-footer { display:flex; justify-content:space-between; gap:16px; padding:8px 24px 18px; flex-shrink:0; font-size:11px; line-height:1.5; color:var(--sc-v2-text-tertiary); }
.chat-image-retention { display:flex; gap:6px; align-items:center; }
.chat-image-retention svg { width:14px; height:14px; }
body.light-theme .chat-image-stage { background:#e9edf3; }
body.light-theme .chat-image-viewer::backdrop { background:rgba(19,28,45,.4); }
@keyframes chat-image-loading { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .chat-image-viewer *, .chat-image-card img { transition:none; animation:none!important; } }
@media(max-width:700px) {
  .chat-image-viewer { width:100vw; height:100dvh; max-height:none; max-width:none; margin:0; border-radius:0; padding-top:env(safe-area-inset-top); padding-bottom:env(safe-area-inset-bottom); }
  .chat-image-header { padding:14px 12px; gap:8px; }
  .chat-image-identity { gap:8px; }
  .chat-image-badge { width:34px; height:34px; border-radius:10px; }
  .chat-image-identity h2 { font-size:14px; }
  .chat-image-identity p { font-size:10px; }
  .chat-image-actions { gap:4px; }
  .chat-image-actions button { min-width:40px; height:44px; padding:0; }
  .chat-image-actions .chat-image-action-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .chat-image-toolbar .chat-image-close { margin-left:0; }
  .chat-image-stage { margin:8px 8px 0; padding:8px; border-radius:10px; }
  .chat-image-controls { padding:12px 8px 4px; }
  .chat-image-zoom button { height:44px; min-width:40px; }
  .chat-image-footer { justify-content:center; padding:10px 12px 12px; }
  .chat-image-gesture-hint { display:none; }
  #chat-input { min-width:0; }
}
