/* Image Core Workspace Styles - NOVA FORGE */

.image-workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: var(--space-xl);
  height: calc(100vh - 64px - 36px - 4rem); /* Header, Ticker, padding margin */
  min-height: 500px;
}

/* Left panel: Generation Controls */
.image-controls-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding-right: var(--space-xs); /* Scroll offset space */
}

/* Right panel: Preview & Asset Output */
.image-preview-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  gap: var(--space-md);
}

/* Image preview box in the preview panel */
.image-preview-container {
  flex: 1;
  min-height: 320px;
  background: rgba(4, 6, 10, 0.4);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.image-preview-container.active {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.05);
}

.image-preview-container.error {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.02);
}

/* Image display frame */
.generated-image-frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.generated-image-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-radius: var(--border-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  animation: scaleUp var(--transition-slow);
}

/* Preview states overlays */
.preview-state-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-xl);
}

.preview-state-idle svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted-dark);
}

.preview-state-active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  max-width: 320px;
  padding: var(--space-xl);
  text-align: center;
  z-index: 2;
}

/* Glowing spinner */
.spinner-glow {
  width: 50px;
  height: 50px;
  border: 2px solid transparent;
  border-top-color: var(--color-primary);
  border-bottom-color: var(--color-secondary);
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.status-log-console {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-color);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-md);
  width: 100%;
  text-align: left;
  max-height: 120px;
  overflow-y: auto;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
}

.status-log-line {
  margin-bottom: 2px;
}

.status-log-line.highlight {
  color: var(--color-primary);
}

.status-log-line.error {
  color: var(--color-danger);
}

.status-log-line.success {
  color: var(--color-success);
}

/* Validation error text labels */
.validation-error {
  color: var(--color-danger);
  font-size: 0.8rem;
  margin-top: 4px;
  font-weight: 500;
  display: none;
}

/* Seed Input Wrapper */
.seed-wrapper {
  display: flex;
  gap: var(--space-xs);
}

.seed-wrapper input {
  flex: 1;
}

/* Asset Detail overlay at the bottom */
.asset-detail-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.asset-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--space-sm);
}

.asset-id-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-main);
}

.asset-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-muted-dark);
  text-transform: uppercase;
  font-weight: 700;
}

.meta-val {
  font-size: 0.85rem;
  word-break: break-all;
}

.meta-val.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
