@import "/shared.css";

/* Single-column layout — no sidebar */
.app {
  grid-template-columns: 1fr;
}

.toolbar-title {
  font-weight: 600;
  font-size: 16px;
  flex: 1;
}

/* Centre the voice panel within the scrollable content area */
#data-view {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 20px;
}

.voice-panel {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Status text */
#status-message {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin: 0;
}

/* Model loading section */
#model-loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#model-progress-label {
  font-size: 13px;
  color: #666;
  margin: 0;
  text-align: center;
}

#model-progress {
  width: 100%;
  height: 8px;
  appearance: none;
  border: none;
  border-radius: 4px;
  background: #e2e8f0;
  overflow: hidden;
}

#model-progress::-webkit-progress-bar {
  background: #e2e8f0;
  border-radius: 4px;
}

#model-progress::-webkit-progress-value {
  background: #4b8df8;
  border-radius: 4px;
  transition: width 0.2s ease;
}

#model-progress::-moz-progress-bar {
  background: #4b8df8;
  border-radius: 4px;
}

/* Button row */
.button-row {
  display: flex;
  justify-content: center;
  gap: 24px;
}

#mic-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: none;
  background: #e53e3e;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s, transform 0.1s;
}

#mic-btn svg[hidden] {
  display: none;
}

#mic-btn:hover {
  background: #c53030;
}

#mic-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#mic-btn:focus-visible {
  outline: 2px solid #4b8df8;
  outline-offset: 3px;
}

#mic-btn.recording {
  background: #718096;
  animation: mic-pulse 1.5s ease-in-out infinite;
}

#mic-btn.recording:hover {
  background: #4a5568;
}

@keyframes mic-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.45);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 10px rgba(229, 62, 62, 0);
  }
}

/* Transcribing indicator */
#transcribing-indicator {
  text-align: center;
  color: #666;
  font-size: 14px;
  font-style: italic;
}

/* Controls row (model selector) */
.controls-row {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.model-select-label {
  font-size: 13px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 6px;
}

#model-select {
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

#model-select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Transcript container with header */
.transcript-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.transcript-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.transcript-label {
  font-size: 13px;
  font-weight: 600;
  color: #666;
}

.copy-btn {
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #333;
}

.copy-btn:hover { background: #f1f3f4; }

/* Transcript output box */
#transcript-output {
  border: 1px solid #ddd;
  border-radius: 8px;
  min-height: 120px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  color: #1a1a1a;
  outline: none;
}

#transcript-output:focus {
  border-color: #4b8df8;
  box-shadow: 0 0 0 2px rgba(75, 141, 248, 0.2);
}

#transcript-output:empty::before {
  content: "Transcript will appear here…";
  color: #aaa;
  font-style: italic;
}
