/* ── Transcription Card ─────────────────────────────────────────── */

.transcribe-card,
.transcribe-card * {
  box-sizing: border-box;
}

.transcribe-card {
  width: 100%;
  max-width: 760px;
  margin: 1.5rem auto;
  background-color: #121212;
  border: 1px solid #262626;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px -1px rgba(0,0,0,0.1);
  font-family: inherit;
  display: flex;
  flex-direction: column;
}

.transcribe-card h2 {
  font-size: 1rem;
  color: #fafafa;
  margin: 0 0 1.5rem 0;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.transcribe-card h2 .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: #dc2828;
}

.transcribe-card h2 .icon svg {
  width: 100%;
  height: 100%;
}

/* ── Drop Zone ─────────────────────────────────────────────────── */

.drop-zone {
  border: 1px dashed #262626;
  background-color: transparent;
  border-radius: 0.75rem;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.drop-zone:hover {
  background-color: #262626;
}

.drop-zone.dragover {
  border-color: #dc2828;
  background-color: rgba(220, 40, 40, 0.05);
}

.drop-zone.has-file {
  border-color: #21c45d;
  background-color: rgba(33, 196, 93, 0.04);
}

.drop-zone-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a3a3a3;
}

.drop-zone-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #fafafa;
  margin-bottom: 0.5rem;
}

.drop-zone-subtext {
  font-size: 0.75rem;
  color: #a3a3a3;
}

.drop-zone-text .browse-link {
  color: #dc2828;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  transition: color 0.15s ease;
}

.drop-zone-text .browse-link:hover {
  color: #ef4343;
}

.drop-zone-formats {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: #a3a3a3;
}

/* ── Selected File Info ────────────────────────────────────────── */

.file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 1rem;
  background-color: transparent;
  border: 1px solid #262626;
  border-radius: 0.5rem;
  max-width: 100%;
}

.file-info-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #262626;
  border-radius: 0.375rem;
  color: #fafafa;
  flex-shrink: 0;
}

.file-info-details {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.file-info-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: #fafafa;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.125rem;
  width: 100%;
}

.file-info-size {
  font-size: 0.75rem;
  color: #a3a3a3;
}

.file-remove {
  background: none;
  border: none;
  color: #a3a3a3;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-remove:hover {
  color: #ef4343;
  background-color: rgba(239, 67, 67, 0.1);
}

/* ── Transcribe Button ─────────────────────────────────────────── */

.btn-transcribe {
  width: 100%;
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #dc2828;
  color: #fafafa;
  border: none;
  border-radius: 10px;
  padding: 0 1rem;
  height: 2.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
  white-space: nowrap;
}

.btn-transcribe:hover:not(:disabled) {
  background-color: rgb(220 40 40 / 0.9);
}

.btn-transcribe:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-transcribe svg {
  width: 20px;
  height: 20px;
}

/* ── Progress ──────────────────────────────────────────────────── */

.transcribe-progress {
  margin-top: 1.25rem;
  background-color: transparent;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid #262626;
}

.progress-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.progress-title {
  font-weight: 500;
  color: #fafafa;
  font-size: 0.875rem;
  margin: 0;
}

.tv-progress-bar-wrap {
  height: 0.5rem;
  background-color: #262626;
  border-radius: 9999px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.tv-progress-bar {
  height: 100%;
  background-color: #dc2828;
  border-radius: 9999px;
  width: 0%;
  transition: width 0.4s ease;
}

.tv-progress-text {
  display: block;
  font-size: 0.75rem;
  color: #a3a3a3;
  text-align: right;
}

/* ── Result ─────────────────────────────────────────────────────── */

.transcribe-result {
  margin-top: 1.25rem;
  background-color: transparent;
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid #262626;
}

.transcribe-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.transcribe-result-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #21c45d;
  margin: 0;
}

.transcribe-result-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-download-srt,
.btn-download-txt,
.btn-new-transcribe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1rem;
  background-color: transparent;
  color: #fafafa;
  border: 1px solid #262626;
  border-radius: 10px;
  height: 2.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}

.btn-download-srt,
.btn-download-txt {
  flex: 1;
  min-width: 0;
}

.btn-download-srt:hover,
.btn-download-txt:hover,
.btn-new-transcribe:hover {
  background-color: #262626;
}

.btn-new-transcribe {
  width: 100%;
  margin-top: 0.5rem;
}

/* ── Spinner ────────────────────────────────────────────────────── */

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spinner-icon {
  animation: spin 1s linear infinite;
}

/* ── Error ──────────────────────────────────────────────────────── */

.transcribe.tv-error-msg {
  color: #ef4343;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: rgba(239,67,67,0.1);
  border-radius: 0.5rem;
  border-left: 3px solid #ef4343;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tv-warning-msg {
  color: #eab308;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: rgba(250,204,21,0.1);
  border-radius: 0.5rem;
  border-left: 3px solid #eab308;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tr-hidden {
  display: none !important;
}

/* ── Responsive ─────────────────────────────────────────────────── */

@media (max-width: 540px) {
  .transcribe-card { padding: 1.25rem; }
  .transcribe-result-buttons { flex-direction: column; gap: 0.5rem; }
  .btn-download-srt, 
  .btn-download-txt { width: 100%; }
}
