[data-c42-image-viewer] {
  position: relative;
  overflow: hidden;
  border-radius: var(--c42-radius, 0.75rem);
  background: var(--c42-color-surface, #f9fafb);
}

[data-c42-image-viewer][data-state='expanded'] {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.95);
  border-radius: 0;
}

[data-c42-viewer-content] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 20rem;
  transition: transform 200ms ease;
}

[data-c42-image-viewer][data-state='expanded'] [data-c42-viewer-content] {
  height: 100vh;
}

[data-c42-viewer-content] img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.c42-viewer-controls {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  gap: 0.375rem;
  z-index: 10;
}

.c42-viewer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: rgba(255, 255, 255, 0.85);
  border: 0;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--c42-color-fg, #1f2937);
  backdrop-filter: blur(4px);
  transition: background 150ms;
}

.c42-viewer-btn:hover {
  background: var(--c42-color-bg, #ffffff);
}

[data-c42-viewer-indicator] {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  z-index: 10;
}
