.tooltip-viewer {
  display: flex;
  height: calc(100dvh - var(--header-height) - var(--footer-height));
  width: 100%;
  overflow: hidden;
}

.tooltip-viewer .sidebar,
.tooltip-viewer .preview {
  height: 100%;
}

.tooltip-viewer .sidebar input {
  width: 100%;
  margin-bottom: var(--space-md);
}

.tooltip-viewer .preview {
  flex: 1;
  padding: var(--space-md);
  overflow-y: auto;
}

.copy-buttons {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.copy-buttons button.copied {
  animation: copyFlash 0.3s ease-in-out;
}

@keyframes copyFlash {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
}

.preview-container {
  max-height: 300px;
  overflow: hidden;
}

.preview-container.expanded {
  max-height: none;
}

.preview-toggle {
  margin-top: var(--space-sm);
}

.preview-warning {
  color: #c62828;
  margin-top: var(--space-sm);
}

.fade-in {
  animation: fadeIn 0.1s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .tooltip-viewer {
    flex-direction: column;
  }
}
