/* ── layout.css — container-center, container-left, container-right, topbar ─ */

/* ── Container center (div2) — sits on top of shell, slides right ── */
#container-center {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface2);
  border-radius: 0;
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    right 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: left, right, transform;
  overflow: hidden;
  z-index: 2;

  border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

#container-center .safe-content {
  display: flex;
  flex-direction: row;
  flex: 1;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: rgb(21 21 21);
  z-index: 1;
}

#safeTop {
  position: absolute;
  height: fit-content;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 2;
  background: rgba(255, 255, 0, 0.25);
}

#safeBottom {
  position: absolute;
  height: fit-content;
  width: 100%;
  bottom: 0;
  left: 0;
  z-index: 2;
  background: rgba(255, 0, 255, 0.25);
}

#message-area {
  position: relative;
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    flex-basis 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
}

#canvas-area {
  position: relative;
  width: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: rgb(255, 102, 0);
  /*test color*/
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    flex-basis 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: width;
  z-index: 3;
}

#safeCanvas {
  /* height: 100%; */
  height: calc(100% - 8px - env(safe-area-inset-top, 0px) - 8px - env(safe-area-inset-bottom, 0px));
  /* width: 100%; */
  flex-shrink: 0;
  margin: 8px 8px 8px 4px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgb(32, 32, 31);
  /* border-radius: 12px;
  border: 1px solid var(--border); */
  border-width: 1.11111px;
  border-radius: 10px;
  border-color: color(srgb 1 1 1 / 0.1);
}

/* #app-shell.viewer-open #canvas-area {
  display: flex;
} */

@media (min-width: 600px) {
  #app-shell.viewer-open #container-center .safe-content #canvas-area {
    flex: 1 1 50%;
    width: 50%;
  }

  #app-shell.viewer-open #container-center .safe-content #message-area {
    flex: 1 1 50%;
    width: 50%;
  }
}

@media (max-width: 599px) {
  #app-shell.viewer-open #container-center .safe-content #canvas-area {
    flex: 1 1 100%;
    width: 100%;
  }

  #app-shell.viewer-open #container-center .safe-content #message-area {
    flex: 0 0 0;
    width: 0;
  }
}

@media (min-width: 600px) {
  #app-shell.panel-open #container-center {
    left: min(78%, 300px);
  }

  #app-shell.panel-open #container-left {
    width: 78%;
    max-width: 300px;
  }
}

@media (max-width: 599px) {
  #app-shell.panel-open #container-center {
    transform: translateX(100%);
  }

  #app-shell.panel-open #container-left {
    width: 100%;
    max-width: 100%;
  }
}

/* ── Screen dim overlay — fades in over container-center ─────── */
/* Shared by both panel-open (left panel) and viewer-open (right panel). */
#screen-dim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* above messages (0), below topbar (3) */
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#app-shell.panel-open #screen-dim {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 599px) {
  #app-shell.viewer-open #screen-dim {
    opacity: 1;
    pointer-events: all;
  }
}

/* ── Top bar ─────────────────────────────────────────────────── */
#chat-topbar {
  /* position: absolute; */
  top: 0;
  left: 0;
  /* right: 0; */
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  pointer-events: none;
  background: transparent;
}

#chat-topbar>* {
  pointer-events: auto;
}

/* ── Hamburger ───────────────────────────────────────────────── */
#hamburger-btn {
  width: 42px;
  height: 42px;
  background: rgba(32, 32, 31);
  border: 1px solid var(--border-md);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;

  width: 46px;
  height: 46px;
  margin: 0rem 0rem 0rem 0.375rem;
  padding: 1rem;
}

#hamburger-btn:hover {
  background: rgba(58, 53, 54);
}

.ham-line {
  display: block;
  width: 15px;
  height: 1.5px;
  background: var(--muted);
  transition: background 0.15s;
  border-radius: 1px;
}

#hamburger-btn:hover .ham-line {
  background: var(--text);
}

/* ── Container right (div3) ──────────────────────────────────── */
#container-right {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  z-index: 1;
  overflow: hidden;
}

#container-right .safe-content {
  display: flex;
  flex-direction: column;
  background: rgb(255, 0, 255);
  /*test color*/
  overflow-x: hidden;
  overflow-y: visible;
}

@media (max-width: 599px) {

  /* Mobile: sits behind center like container-left does.
     Reserved for future use — not used as viewer panel. */
  #container-right {
    left: auto;
    right: 0;
    width: 78%;
    visibility: hidden;
  }
}

@media (min-width: 600px) {

  /* Desktop: container-right reserved for future use — not used as viewer panel */
  #container-right {
    width: 0;
    overflow: hidden;
  }
}

/* ── Viewer toolbar ──────────────────────────────────────────── */
#viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-width: 0;
  min-height: 44px;
}

/* Left: mode toggle + filename + badge */
#viewer-toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

/* Segmented mode toggle */
#viewer-mode-toggle {
  display: none;
  align-items: stretch;
  flex-shrink: 0;
  background: var(--surface3);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 0;
}

#viewer-mode-toggle.is-visible {
  display: flex;
}

.viewer-mode-btn {
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  border-radius: calc(var(--radius-sm) - 1px);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}

.viewer-mode-btn.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.viewer-mode-btn:not(.is-active):hover {
  color: var(--text);
}

/* Filename */
#viewer-filename {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-secondary, var(--muted));
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  margin: 0;
}

/* File type badge */
#viewer-type-badge {
  font-size: var(--text-xs, 0.75rem);
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

#viewer-type-badge:not(:empty)::before {
  content: ' · ';
  opacity: 0.5;
}

#viewer-type-badge.is-live {
  color: #ef4444;
  font-weight: 600;
  letter-spacing: 0.03em;
}

#viewer-type-badge.is-live::before {
  content: ' ';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  vertical-align: middle;
  margin-right: 4px;
  opacity: 1;
  animation: cv-live-pulse 1.4s ease-in-out infinite;
}

@keyframes cv-live-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

/* Right: copy group + expand + close */
#viewer-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* Action split button group */
#viewer-action-group {
  position: relative;
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px var(--border-md);
  overflow: visible;
}

#viewer-action-btn {
  height: 30px;
  padding: 0 0.65rem;
  background: var(--surface2);
  border: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text);
  font-size: var(--text-sm);
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}

#viewer-action-btn:hover {
  background: var(--surface3);
}

#viewer-action-btn.copied {
  color: var(--accent);
}

.viewer-action-seam {
  width: 1px;
  background: var(--border-md);
  flex-shrink: 0;
}

#viewer-action-more {
  width: 26px;
  height: 30px;
  padding: 0 4px;
  background: var(--surface2);
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s;
}

#viewer-action-more:hover {
  background: var(--surface3);
}

/* When dropdown is hidden (unsupported type), round both corners of action-btn */
#viewer-action-group.no-dropdown #viewer-action-btn {
  border-radius: var(--radius-sm);
}

/* Action dropdown menu */
#viewer-action-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 10;
  min-width: 130px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#viewer-action-menu.hidden {
  display: none;
}

#viewer-action-menu button {
  width: 100%;
  padding: 0.55rem 0.85rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: var(--text-sm);
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

#viewer-action-menu button:hover {
  background: var(--surface2);
}

/* Expand + Close ghost icon buttons */
#viewer-expand,
#viewer-close {
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
}

#viewer-expand:hover,
#viewer-close:hover {
  background: var(--surface2);
  color: var(--text);
}

/* Expanded state — canvas-area takes full width, message-area hidden */
#app-shell.viewer-expanded #message-area {
  flex: 0 0 0 !important;
  width: 0 !important;
  overflow: hidden;
}

#app-shell.viewer-expanded #canvas-area {
  flex: 1 1 100% !important;
  width: 100% !important;
}

/* Expand button is pointless on mobile — canvas is already full-width */
@media (max-width: 599px) {
  #viewer-expand {
    display: none;
  }
}

/* ── Viewer content ──────────────────────────────────────────── */
#viewer-content {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  min-width: 0;
  min-height: 0;
}

.viewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.viewer-video {
  max-width: 100%;
  max-height: 100%;
  display: block;
  outline: none;
}

.viewer-audio-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
}

.viewer-audio-name {
  font-size: var(--text-sm);
  color: var(--muted);
  text-align: center;
  word-break: break-word;
}

.viewer-audio-box audio {
  width: 100%;
  max-width: 320px;
}

.viewer-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.viewer-text {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  border: none;
  outline: none;
}

/* ═══════════════════════════════════════════════════════════════
   Canvas panel — renderer styles (cv-* classes from canvas.js)
   All scoped inside #viewer-content.
   ═══════════════════════════════════════════════════════════════ */

/* ── Shared content alignment ────────────────────────────────── */
/* #viewer-content already flex + center — override for full-fill types */
#viewer-content:has(.cv-code),
#viewer-content:has(.cv-text),
#viewer-content:has(.cv-hex-wrap),
#viewer-content:has(.cv-csv-wrap),
#viewer-content:has(.cv-md),
#viewer-content:has(.cv-iframe),
#viewer-content:has(.cv-font-wrap) {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0;
}

/* ── Image ───────────────────────────────────────────────────── */
.cv-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

/* ── Video ───────────────────────────────────────────────────── */
.cv-video {
  max-width: 100%;
  max-height: 100%;
  display: block;
  outline: none;
  border-radius: 4px;
}

/* ── Audio ───────────────────────────────────────────────────── */
.cv-audio-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 2rem 1rem;
}

.cv-audio-name {
  font-size: var(--text-sm);
  color: var(--muted);
  text-align: center;
  word-break: break-word;
}

.cv-audio-wrap audio {
  width: 100%;
  max-width: 340px;
}

/* ── PDF fallback (mobile) ───────────────────────────────────── */
.cv-pdf-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.cv-pdf-icon {
  font-size: 3rem;
}

.cv-pdf-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cv-pdf-name {
  font-size: var(--text-sm);
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

.cv-pdf-hint {
  font-size: var(--text-xs, 0.75rem);
  color: var(--muted);
}

.cv-pdf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  font-size: var(--text-sm);
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
}

.cv-pdf-btn:hover {
  background: var(--accent-dk, var(--accent));
}

.cv-pdf-btn--dl {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-md);
}

.cv-pdf-btn--dl:hover {
  background: var(--surface3);
}

/* ── Font viewer ─────────────────────────────────────────────── */
.cv-font-wrap {
  width: 100%;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

.cv-font-meta {
  font-size: var(--text-xs, 0.75rem);
  color: var(--muted);
}

.cv-font-sample {
  font-size: 1.5rem;
  line-height: 1.4;
  color: var(--text);
  word-break: break-all;
}

.cv-font-sizes {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.cv-font-size-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.cv-font-size-lbl {
  font-size: var(--text-xs, 0.75rem);
  color: var(--muted);
  min-width: 2.5rem;
  flex-shrink: 0;
}

.cv-font-size-txt {
  color: var(--text);
  line-height: 1.2;
  word-break: break-word;
}

/* ── iframe (PDF desktop + HTML sandboxed) ───────────────────── */
.cv-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.cv-iframe--sandboxed {
  background: #fff;
}

/* ── Code / text pre ─────────────────────────────────────────── */
.cv-code {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 1rem;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  white-space: pre;
  overflow: auto;
  box-sizing: border-box;
  tab-size: 2;
}

.cv-code code {
  display: block;
  width: 100%;
}

/* ── Plain text (prose) — wraps, readable font ───────────────── */
.cv-text {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 1.25rem 1.5rem;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Line numbers via CSS counter */
.cv-code--ln {
  padding-left: 0;
}

.cv-code--ln code {
  counter-reset: cv-ln;
}

.cv-ln {
  display: block;
  counter-increment: cv-ln;
  padding-left: 3.5rem;
  position: relative;
  white-space: pre;
}

.cv-ln::before {
  content: counter(cv-ln);
  position: absolute;
  left: 0;
  width: 2.75rem;
  text-align: right;
  padding-right: 0.75rem;
  color: var(--muted);
  opacity: 0.5;
  user-select: none;
  font-size: 0.85em;
}

.cv-ln:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ── JSON pretty preview ─────────────────────────────────────── */
.cv-json-preview {
  /* same as cv-code but with slightly more padding */
}

/* ── Markdown ────────────────────────────────────────────────── */
.cv-md {
  width: 100%;
  height: 100%;
  padding: 1.5rem;
  overflow-y: auto;
  box-sizing: border-box;
  color: var(--text);
  font-size: var(--text-base);
  line-height: 1.7;
}

.cv-md h1,
.cv-md h2,
.cv-md h3,
.cv-md h4,
.cv-md h5,
.cv-md h6 {
  margin: 1.5em 0 0.5em;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.cv-md h1 {
  font-size: 1.6em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3em;
}

.cv-md h2 {
  font-size: 1.3em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3em;
}

.cv-md h3 {
  font-size: 1.1em;
}

.cv-md p {
  margin: 0.75em 0;
}

.cv-md a {
  color: var(--accent);
  text-decoration: none;
}

.cv-md a:hover {
  text-decoration: underline;
}

.cv-md ul,
.cv-md ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.cv-md li {
  margin: 0.25em 0;
}

.cv-md blockquote {
  margin: 0.75em 0;
  padding: 0.5em 1em;
  border-left: 3px solid var(--border-md);
  color: var(--muted);
}

.cv-md hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5em 0;
}

.cv-md pre.cv-md-code {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 0.75em 1em;
  overflow-x: auto;
  margin: 0.75em 0;
  font-family: var(--mono);
  font-size: var(--text-sm);
  line-height: 1.5;
}

code.cv-md-inline-code {
  background: var(--surface2);
  border-radius: 3px;
  padding: 0.1em 0.35em;
  font-family: var(--mono);
  font-size: 0.9em;
}

.cv-md strong {
  font-weight: 600;
}

.cv-md em {
  font-style: italic;
}

.cv-md del {
  text-decoration: line-through;
  opacity: 0.6;
}

/* ── CSV / TSV table ─────────────────────────────────────────── */
.cv-csv-wrap {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 0;
}

.cv-csv-note {
  font-size: var(--text-xs, 0.75rem);
  color: var(--muted);
  padding: 0.5rem 1rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.cv-csv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  color: var(--text);
}

.cv-csv-table th {
  position: sticky;
  top: 0;
  background: var(--surface2);
  font-weight: 600;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--border-md);
  white-space: nowrap;
}

.cv-csv-table td {
  padding: 0.4rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cv-csv-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

/* ── Hex view ────────────────────────────────────────────────── */
.cv-hex-wrap {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.cv-hex-note {
  font-size: var(--text-xs, 0.75rem);
  color: var(--muted);
  padding: 0.5rem 1rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.cv-hex {
  margin: 0;
  padding: 1rem;
  font-family: var(--mono);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text);
  white-space: pre;
  overflow: auto;
  flex: 1;
}

/* ── Binary fallback card ────────────────────────────────────── */
.cv-binary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.cv-binary-icon {
  font-size: 2.5rem;
}

.cv-binary-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.cv-binary-name {
  font-size: var(--text-sm);
  color: var(--text);
  font-weight: 500;
  word-break: break-word;
}

.cv-binary-hint {
  font-size: var(--text-xs, 0.75rem);
  color: var(--muted);
}

.cv-binary-dl {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--surface2);
  border: 1px solid var(--border-md);
  color: var(--text);
  font-size: var(--text-sm);
  font-family: var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
}

.cv-binary-dl:hover {
  background: var(--surface3);
}

/* ── Error state ─────────────────────────────────────────────── */
.cv-error {
  font-size: var(--text-sm);
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

/* ── Unsupported type — no preview available ─────────────────── */
.cv-unsupported {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 180px;
}

.cv-unsupported-msg {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ── Stub — waiting for user to trigger load ─────────────────── */
.cv-stub {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 180px;
}

.cv-stub-btn {
  height: 34px;
  padding: 0 1.1rem;
  background: var(--surface2);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: var(--text-sm);
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s;
}

.cv-stub-btn:hover {
  background: var(--surface3);
}