/* ============================================================
   Bulk Upload page styles
   ============================================================ */

/* ── Page layout ── */
.bulk-upload-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* Tab bar when embedded above index hero section */
.index-upload-tabs {
  padding: 0 24px;
  background: var(--white);
  border-bottom: 2px solid var(--border);
}

[data-theme="dark"] .index-upload-tabs {
  background: #0f0f1a;
  border-bottom-color: #374151;
}

/* ── Tab navigation ── */
.upload-tabs {
  margin-bottom: 28px;
  border-bottom: 2px solid var(--border);
}

.nav-tabs {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin: 0;
}

.nav-tab-link {
  display: inline-block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  border-radius: 4px 4px 0 0;
  transition: color 0.15s, border-color 0.15s;
}

.nav-tab-link:hover {
  color: var(--brand-2);
  border-bottom-color: var(--border);
}

.nav-tab-link.active {
  color: var(--brand-2);
  border-bottom-color: var(--brand-2);
  font-weight: 600;
}

[data-theme="dark"] .nav-tab-link.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* ── Header ── */
.bulk-upload-header {
  margin-bottom: 24px;
}

.bulk-upload-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

[data-theme="dark"] .bulk-upload-title {
  color: #f9fafb;
}

.bulk-upload-subtitle {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Drop zone ── */
.bulk-dropzone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  outline: none;
  box-sizing: border-box;
  max-width: 420px;
  margin: 0 auto;
}

.bulk-dropzone:hover,
.bulk-dropzone:focus-visible {
  border-color: var(--brand-2);
  background: var(--brand-light);
}

.bulk-dropzone.drag-over {
  border-color: var(--brand-2);
  background: var(--brand-light);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

[data-theme="dark"] .bulk-dropzone {
  background: var(--bg);
  border-color: var(--border);
}

[data-theme="dark"] .bulk-dropzone:hover,
[data-theme="dark"] .bulk-dropzone:focus-visible,
[data-theme="dark"] .bulk-dropzone.drag-over {
  border-color: var(--brand);
  background: var(--brand-light);
}

.bulk-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}

.bulk-dropzone-icon {
  color: var(--brand-2);
  opacity: 0.6;
}

[data-theme="dark"] .bulk-dropzone-icon {
  color: var(--brand);
}

.bulk-dropzone-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.bulk-dropzone-primary {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.bulk-dropzone-browse {
  color: var(--brand-2);
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-theme="dark"] .bulk-dropzone-browse {
  color: var(--brand);
}

.bulk-dropzone-secondary {
  font-size: 13px;
  color: var(--muted);
}

.bulk-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* ── File list ── */
.bulk-file-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bulk-file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  transition: border-color 0.15s;
}

[data-theme="dark"] .bulk-file-row {
  background: var(--ink-2, #1f1f2e);
}

.bulk-file-row.status-completed {
  border-color: #bbf7d0;
}

[data-theme="dark"] .bulk-file-row.status-completed {
  border-color: #166534;
}

.bulk-file-row.status-failed,
.bulk-file-row.status-error {
  border-color: #fecaca;
}

[data-theme="dark"] .bulk-file-row.status-failed,
[data-theme="dark"] .bulk-file-row.status-error {
  border-color: #7f1d1d;
}

.bulk-file-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  font-weight: 500;
}

.bulk-file-size {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* Status badge */
.bulk-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bulk-status-badge.badge-queued {
  background: #e0e7ff;
  color: #3730a3;
}

[data-theme="dark"] .bulk-status-badge.badge-queued {
  background: #312e81;
  color: #c7d2fe;
}

.bulk-status-badge.badge-processing {
  background: #fef3c7;
  color: #92400e;
}

[data-theme="dark"] .bulk-status-badge.badge-processing {
  background: #451a03;
  color: #fde68a;
}

.bulk-status-badge.badge-completed {
  background: #dcfce7;
  color: #166534;
}

[data-theme="dark"] .bulk-status-badge.badge-completed {
  background: #14532d;
  color: #86efac;
}

.bulk-status-badge.badge-uploaded {
  background: #e0f2fe;
  color: #075985;
}

[data-theme="dark"] .bulk-status-badge.badge-uploaded {
  background: #0c4a6e;
  color: #7dd3fc;
}

.bulk-status-badge.badge-failed,
.bulk-status-badge.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

[data-theme="dark"] .bulk-status-badge.badge-failed,
[data-theme="dark"] .bulk-status-badge.badge-error {
  background: #7f1d1d;
  color: #fca5a5;
}

/* Remove button */
.bulk-file-remove {
  background: none;
  border: none;
  padding: 4px 6px;
  cursor: pointer;
  color: var(--muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
}

.bulk-file-remove:hover {
  color: #ef4444;
  background: #fee2e2;
}

[data-theme="dark"] .bulk-file-remove:hover {
  background: #7f1d1d;
  color: #fca5a5;
}

/* ── Upload controls ── */
.bulk-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.bulk-controls-info {
  font-size: 13px;
  color: var(--muted);
}

.bulk-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.bulk-upload-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* btn-primary is defined in base.css — reuse it */

/* Per-file detail level select */
.bulk-file-detail { font-size:12px; padding:3px 8px; border:1px solid var(--border); border-radius:6px; background:var(--white); color:var(--text); cursor:pointer; }
[data-theme='dark'] .bulk-file-detail { background:var(--ink-2,#1f1f2e); }
