/* ═══════════════════════════════════════════════
   upload.css — Upload page only
   Style.css handles base styles and responsive.
═══════════════════════════════════════════════ */

/* ── Drop zone ───────────────────────────────── */
.upload-zone {
  position: relative;
  border: 2px dashed rgba(99,120,200,0.3);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-2);
  overflow: hidden;
}

.upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: rgba(245,166,35,0.5);
  background: rgba(245,166,35,0.04);
  box-shadow: 0 0 0 4px rgba(245,166,35,0.06);
}

.upload-zone.drag-over .upload-icon { transform: scale(1.2) rotate(-5deg); }

.upload-zone.has-file {
  border-color: rgba(52,211,153,0.45);
  background: var(--green-dim);
}

.upload-icon {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
  display: block;
  transition: transform var(--transition);
}

.upload-zone h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: var(--text-1);
}

.upload-zone p {
  font-size: 0.82rem;
  color: var(--text-2);
}

/* ── Upload stages ───────────────────────────── */
.upload-stages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Progress bar ────────────────────────────── */
.progress-wrap {
  background: var(--bg-3);
  border-radius: 99px;
  height: 5px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #f0b84a);
  border-radius: 99px;
  transition: width 0.35s ease;
  box-shadow: 0 0 10px rgba(245,166,35,0.4);
}

@keyframes pulse-bar {
  0%,100% { opacity:1; }
  50%      { opacity: 0.3; }
}

/* ── Result card ─────────────────────────────── */
#result-card {
  border-color: rgba(52,211,153,0.3);
  background: linear-gradient(135deg, var(--bg-2), rgba(52,211,153,0.04));
}

/* ── Pipeline accent text ────────────────────── */
.text-accent {
  color: var(--amber);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════
   RESPONSIVE — UPLOAD SPECIFIC
══════════════════════════════════════════════ */

@media (max-width: 900px) {
  /* Stack the two-col grids */
  #tab-upload > div,
  #tab-debug > div {
    grid-template-columns: 1fr !important;
  }

  .upload-zone { padding: 2rem 1.5rem; }
  .upload-icon { font-size: 2.4rem; }
}

@media (max-width: 600px) {
  .upload-zone { padding: 1.75rem 1rem; }
  .upload-icon { font-size: 2rem; margin-bottom: 0.5rem; }
  .upload-zone h3 { font-size: 0.95rem; }

  /* Debug fields 3-col → 1-col */
  #tab-debug .card div[style*="1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Stage items compact */
  .stage-item { padding: 8px 10px; gap: 8px; font-size: 0.8rem; }
  .stage-icon { width: 24px; height: 24px; font-size: 0.8rem; }

  /* Result card actions stack */
  #result-card > div:last-of-type {
    flex-direction: column;
  }
  #result-card .btn { width: 100%; }

  /* Progress label truncate */
  #progress-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
  }
}

@media (max-width: 400px) {
  .upload-zone { padding: 1.25rem 0.875rem; }
  .upload-icon { font-size: 1.75rem; }
}