/* Preview toolbar — label + minimize. Sits over the iframe. */
#preview .label {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  background: rgba(8, 9, 11, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: var(--fs-xs);
  font-family: var(--font-mono);
  z-index: 10;
  max-width: calc(100% - 130px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
#preview .toolbar {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  display: flex;
  gap: var(--space-1);
  z-index: 10;
}
#preview .toolbar button {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(8, 9, 11, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 16px;
  line-height: 1;
  transition:
    background var(--t-fast),
    transform var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
#preview .toolbar button:hover {
  background: rgba(20, 22, 26, 0.85);
}
#preview .toolbar button:active {
  transform: scale(0.95);
}

/* Pill at top of chat column when user minimized the preview but the
   server still has a URL queued. Tap to restore. */
.preview-pill {
  flex: 0 0 auto;
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: 8px var(--space-4);
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-1);
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--fg-1);
  user-select: none;
  transition: background var(--t-fast);
}
.preview-pill.show {
  display: flex;
}
.preview-pill:hover {
  background: var(--bg-2);
  color: var(--fg-0);
}
.preview-pill .icon {
  color: var(--fg-1);
  font-size: var(--fs-md);
  display: inline-flex;
  align-items: center;
}
.preview-pill .label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.preview-pill .hint {
  color: var(--fg-2);
  font-size: var(--fs-xs);
}
