.studio-insertion-popup {
  position: fixed;
  z-index: 1200;
  width: 280px;
  max-width: calc(100vw - 32px);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  pointer-events: auto;
}

.studio-insertion-popup.is-expanded {
  width: min(420px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
}

.studio-insertion-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-sm);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: grab;
  user-select: none;
}

.studio-insertion-popup__header:active {
  cursor: grabbing;
}

.studio-insertion-popup__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.studio-insertion-popup__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.studio-insertion-popup__btn {
  padding: 2px 8px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  background: var(--color-bg-secondary);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

.studio-insertion-popup__btn:hover {
  border-color: var(--color-accent);
  color: var(--color-text-primary);
}

.studio-insertion-popup__btn--close {
  font-size: 1rem;
  line-height: 1;
  padding: 0 6px;
}

.studio-insertion-popup__body {
  padding: var(--spacing-sm);
  overflow: auto;
  font-size: 0.75rem;
}

.studio-insertion-popup.is-expanded .studio-insertion-popup__body {
  flex: 1;
  min-height: 0;
}

.studio-insertion-popup__preview {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-insertion-popup__field-label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

.studio-insertion-popup__field-value {
  font-size: 0.8rem;
  color: var(--color-text-primary);
  line-height: 1.4;
}

.studio-insertion-popup__full {
  margin: 0;
  padding: var(--spacing-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-tertiary);
  white-space: pre-wrap;
  font-size: 0.72rem;
  max-height: none;
}
