/* GenAI Modal Styles */

.genai-modal-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.genai-label {
  display: block;
  color: var(--color-text-dark);
}

/* Composes the shared textarea base (common/style.css); prompt deltas only. */
.form-inst-prompt {
  resize: vertical;
  line-height: 1.4;
  transition: border-color 0.15s ease;
}

.form-inst-prompt::placeholder {
  color: var(--color-text-dark);
}

.form-inst-prompt:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Progress indicator */
.genai-progress-container {
  display: flex;
  flex-direction: column;
  padding: var(--space-2);
  background: var(--color-surface);
  border: var(--border-width) var(--border-style) var(--color-border);
  border-radius: var(--radius-sm);
}

.genai-progress-status {
  color: var(--color-text);
  text-align: center;
  margin-bottom: var(--space-2);
}

.genai-progress-bar-outer {
  width: 100%;
  height: 8px;
  background: var(--color-surface-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.genai-progress-bar-inner {
  height: 100%;
  background: var(--color-accent);
  width: 0%;
  transition: width 0.25s ease;
}

/* Status message (root level) */
.genai-status-message {
  color: var(--color-text);
}

/* Preview image (root level) */
.genai-preview-image {
  width: 100%;
  object-fit: contain;
  display: block;
  border: var(--border-width) var(--border-style) var(--color-border);
  border-radius: var(--radius-sm);
}

/* Cardinal views (3D result): front/right/back/left under the main preview.
   Part of the same section as the big preview, so they sit --space-1 below
   it: pull back the column gap and add the tighter one. */
.genai-preview-views {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-1);
  margin-top: calc(var(--space-1) - var(--space-2));
}

.genai-preview-views img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  display: block;
  border: var(--border-width) var(--border-style) var(--color-border);
  border-radius: var(--radius-sm);
}

/* Image drop zone (3D): supply an image instead of generating one */
.genai-image-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border: var(--border-width) dashed var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-dark);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.25s ease,
    color 0.25s ease;
}

:where(html[data-pointer='mouse']) .genai-image-drop:hover,
.genai-image-drop.drag-over {
  border-color: var(--color-accent);
  color: var(--color-text);
}

.genai-image-drop.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.genai-image-drop-thumb {
  max-width: 100%;
  max-height: 100px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.genai-image-drop-clear {
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text-dark);
  text-decoration: underline;
  cursor: pointer;
}

:where(html[data-pointer='mouse']) .genai-image-drop-clear:hover {
  color: var(--color-text);
}
