/* Upload Modal Styles */

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

/* The dimension a sound is uploaded as: a label and its select on one row */
.upload-dimension-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
}

.upload-dimension-row select {
  flex: 1;
}

/* Drop zone */
.upload-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 2px dashed var(--color-border);
  background: var(--color-background);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

:where(html[data-pointer='mouse']) .upload-drop-zone:hover {
  border-color: var(--color-accent);
  background: var(--color-surface);
}

.upload-drop-zone-active {
  border-color: var(--color-accent);
  background: var(--color-surface);
}

.upload-drop-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-dark);
}

.upload-drop-icon svg {
  width: 48px;
  height: 48px;
}

.upload-drop-text {
  color: var(--color-text);
  text-align: center;
}

.upload-drop-subtext {
  color: var(--color-text-dark);
  font-size: var(--font-size-sm);
  text-align: center;
}

/* File info */
.upload-file-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border: var(--border-width) var(--border-style) var(--color-border);
}

.upload-file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-accent);
}

.upload-file-icon svg {
  width: 32px;
  height: 32px;
}

.upload-file-details {
  flex: 1;
  min-width: 0;
}

.upload-file-name {
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-size {
  color: var(--color-text-dark);
  font-size: var(--font-size-sm);
}

.upload-file-remove {
  flex-shrink: 0;
}

/* Uploading state - matches GenAI progress styling */
.upload-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);
}

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

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

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

/* Server-side texture optimization phase (after the transfer completes) -
   a second inset box below the upload progress box. Shares the
   upload-progress-container box styling; this modifier only hides it until
   the transfer completes. */
.upload-optimize-section {
  display: none;
}

/* Hint sits directly under the status text, above the bar */
.upload-optimize-status {
  margin-bottom: var(--space-1);
}

.upload-optimize-hint {
  color: var(--color-text);
  opacity: 0.7;
  font-size: 0.85em;
  text-align: center;
  margin-bottom: var(--space-2);
}

/* Indeterminate bar uses the shared .loading-bar-indeterminate (common/style.css);
   it runs for the full server encode wait. */

/* Status message */
.upload-status-message {
  color: var(--color-text);
  text-align: center;
}

.upload-status-error {
  color: var(--color-error);
  text-align: left;
}
