/* ═══════════════════════════════════════════════════════════════
   ACQUIRE VIEW — federated search, source connectors, drag-drop
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout ─────────────────────────────────────────────────── */
.acquire-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--cream);
}

/* ── Header ─────────────────────────────────────────────────── */
.acquire-header {
  flex-shrink: 0;
  padding: 16px 28px 14px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Search bar ─────────────────────────────────────────────── */
.acquire-search-bar {
  display: flex;
  align-items: center;
  max-width: 600px;
  gap: 0;
  margin: 0 0 12px;
  flex-wrap: nowrap;
  min-width: 0;
}
.acquire-search-input {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 12px;
  font-size: 0.86rem;
  font-family: var(--sans);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 5px 0 0 5px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.acquire-search-input:focus {
  border-color: var(--accent);
}
.acquire-search-input::placeholder {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.acquire-search-btn {
  padding: 7px 12px;
  font-size: 0.78rem;
  font-family: var(--sans);
  font-weight: 600;
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.acquire-search-btn:hover {
  background: var(--accent-light);
}

/* ── Tabs ──────────────────────────────────────────────────── */
.acquire-tabs {
  display: flex;
  gap: 0;
  padding: 0 28px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.acquire-tab {
  padding: 10px 18px 8px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.acquire-tab:hover { color: var(--text); }
.acquire-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Tab panels ────────────────────────────────────────────── */
.acquire-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Body ───────────────────────────────────────────────────── */
.acquire-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Section layout ────────────────────────────────────────── */
.acquire-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.acquire-section-header {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-light);
}

/* ── Source connector cards (compact row) ───────────────────── */
.acquire-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.acquire-source-card {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  padding: 6px 14px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
  user-select: none;
}
.acquire-source-card:hover {
  box-shadow: 0 1px 4px var(--shadow);
}
.acquire-source-card.active {
  border-color: var(--gold);
  opacity: 1;
}
.acquire-source-card.off {
  opacity: 0.45;
  border-color: var(--border);
  background: var(--cream);
}
.acquire-source-card.off .acquire-source-icon {
  color: var(--text-muted);
}
.acquire-source-icon {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
}
.acquire-source-name {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--brown);
  white-space: nowrap;
}
.acquire-source-desc {
  display: none;
}
.acquire-source-status {
  font-size: 0;
  display: flex;
  align-items: center;
}
.acquire-source-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.acquire-source-dot.ready   { background: #4CAF50; }
.acquire-source-dot.disabled { background: #BDBDBD; }

/* ── Search results ─────────────────────────────────────────── */
.acquire-results {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.acquire-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}
.acquire-results-heading h3 {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--brown);
  margin: 0;
}
.acquire-results-clear {
  font-size: 0.78rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--sans);
  padding: 0;
}
.acquire-results-clear:hover {
  color: var(--brown);
}
.acquire-result-group {
  margin-bottom: 8px;
}
.acquire-result-group-title {
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}
.acquire-result-group-error {
  font-size: 0.76rem;
  color: #c62828;
  font-style: italic;
  margin-bottom: 6px;
}
.acquire-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 5px;
  margin-bottom: 4px;
  transition: background 0.12s;
}
.acquire-result-item:hover {
  background: var(--cream-dark);
}
.acquire-result-body {
  flex: 1;
  min-width: 0;
}
.acquire-result-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--brown);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acquire-result-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acquire-import-btn {
  flex-shrink: 0;
  padding: 5px 14px;
  font-size: 0.76rem;
  font-family: var(--sans);
  font-weight: 500;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.acquire-import-btn:hover {
  background: var(--accent);
  color: var(--white);
}

/* ── Loading indicator ──────────────────────────────────────── */
.acquire-search-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.acquire-search-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: acquire-spin 0.6s linear infinite;
}
@keyframes acquire-spin {
  to { transform: rotate(360deg); }
}

/* ── Drop zone ──────────────────────────────────────────────── */
.acquire-import {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.acquire-dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: border-color 0.2s, background 0.2s;
  cursor: default;
}
.acquire-dropzone.drag-over {
  border-color: var(--gold);
  background: rgba(158, 122, 60, 0.06);
}
.acquire-dropzone-text {
  font-size: 0.88rem;
  color: var(--text);
}
.acquire-dropzone-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}
.acquire-browse-btn {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  padding: 0;
}
.acquire-browse-btn:hover {
  color: var(--brown);
}

/* ── Progress list ──────────────────────────────────────────── */
.acquire-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* FIX 1: card sits directly below the dropzone, full panel width,
   * and must NEVER cause horizontal scroll regardless of filename
   * length or file count. */
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.acquire-progress-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brown);
  margin-bottom: 4px;
}
.acquire-progress-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.acquire-progress-name {
  font-size: 0.8rem;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acquire-progress-bar {
  width: 120px;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.acquire-progress-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.acquire-progress-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 60px;
  text-align: right;
  flex-shrink: 0;
}
.acquire-progress-status.done {
  color: #4CAF50;
  font-weight: 600;
}

/* ── Advanced filter toggle (inline in search bar) ───────── */
.acquire-filter-toggle {
  font-size: 0.72rem;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--text-muted);
  background: var(--cream);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 5px 5px 0;
  padding: 7px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.acquire-filter-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.acquire-filter-toggle.active {
  color: var(--accent);
  background: rgba(158, 122, 60, 0.1);
  border-color: var(--accent);
}

/* ── Filter drawer (below search bar) ────────────────────── */
.acquire-filter-drawer {
  max-width: 600px;
  padding: 10px 0 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: acquire-drawer-slide 0.2s ease;
}
@keyframes acquire-drawer-slide {
  from { max-height: 0; opacity: 0; }
  to { max-height: 200px; opacity: 1; }
}
.acquire-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.acquire-filter-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  width: 50px;
  flex-shrink: 0;
}
.acquire-filter-input {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-family: var(--sans);
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.acquire-filter-input:focus {
  border-color: var(--accent);
}
.acquire-filter-input::placeholder {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.acquire-filter-year-row {
  gap: 6px;
}
.acquire-filter-year {
  width: 80px;
  padding: 6px 10px;
  font-size: 0.82rem;
  font-family: var(--sans);
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.acquire-filter-year:focus {
  border-color: var(--accent);
}
.acquire-filter-year::placeholder {
  color: var(--text-muted);
  font-size: 0.78rem;
}
.acquire-filter-year-sep {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.acquire-filter-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
}
.acquire-filter-clear {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  padding: 0;
  text-decoration: underline;
}
.acquire-filter-clear:hover {
  color: var(--accent);
}

/* ── Sort control ────────────────────────────────────────── */
.acquire-sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.acquire-sort-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  font-family: var(--sans);
}
.acquire-sort-select {
  padding: 3px 8px;
  font-size: 0.76rem;
  font-family: var(--sans);
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  outline: none;
}
.acquire-sort-select:focus {
  border-color: var(--accent);
}

/* ── Load more button ────────────────────────────────────── */
.acquire-load-more {
  display: block;
  width: 100%;
  padding: 10px;
  font-size: 0.82rem;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: center;
  margin-top: 8px;
}
.acquire-load-more:hover {
  background: rgba(158, 122, 60, 0.06);
  border-color: var(--accent);
}
.acquire-load-more:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── Source chips (toggle pills) ───────────────────────────── */
.acquire-source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.acquire-source-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  user-select: none;
}
.acquire-source-chip:hover {
  border-color: var(--gold);
}
.acquire-source-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}
.acquire-source-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.acquire-source-chip.active .acquire-source-chip-dot {
  background: var(--white);
}

/* ── Result cover thumbnails ──────────────────────────────── */
.acquire-result-cover {
  width: 50px;
  height: 70px;
  border-radius: 3px;
  object-fit: cover;
  background: var(--border-light);
  flex-shrink: 0;
}
.acquire-result-nocover {
  width: 50px;
  height: 70px;
  border-radius: 3px;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 0.58rem;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Result action buttons (Import + View pair) ───────────── */
.acquire-result-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.acquire-view-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 0.76rem;
  font-family: var(--sans);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.acquire-view-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Library folder UI ────────────────────────────────────── */
.acquire-library-folder {
  padding: 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--white);
}
.acquire-folder-desc {
  font-size: 0.84rem;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.5;
}
.acquire-folder-pick-btn {
  padding: 7px 18px;
  font-size: 0.82rem;
  font-family: var(--sans);
  font-weight: 600;
  background: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s;
}
.acquire-folder-pick-btn:hover {
  background: var(--accent-light);
}
.acquire-folder-status {
  display: flex;
  align-items: center;
  gap: 10px;
}
.acquire-folder-path {
  font-size: 0.82rem;
  font-family: var(--mono, monospace);
  color: var(--brown);
  background: var(--cream);
  padding: 5px 10px;
  border-radius: 4px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acquire-folder-change-btn {
  font-size: 0.76rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--sans);
  padding: 0;
  flex-shrink: 0;
}
.acquire-folder-change-btn:hover {
  color: var(--brown);
}

/* ── Source badge on result items ──────────────────────────── */
.acquire-result-source {
  display: inline-block;
  margin-top: 3px;
  padding: 1px 8px;
  font-size: 0.64rem;
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--border-light);
  border-radius: 3px;
}

/* ── Find Full Text button (plugin-only) ─────────────────── */
.acquire-find-fulltext-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-family: var(--sans);
  font-weight: 500;
  border: 1px dashed var(--gold);
  border-radius: 4px;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.acquire-find-fulltext-btn:hover {
  background: rgba(158, 122, 60, 0.08);
}
.acquire-find-fulltext-btn.done {
  border-color: #4CAF50;
  border-style: solid;
  color: #4CAF50;
}

/* ── Mirror/repository popup ─────────────────────────────── */
.acquire-mirror-popup {
  position: absolute;
  right: 0;
  bottom: 100%;
  z-index: 20;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shadow);
  padding: 10px 0;
  margin-bottom: 4px;
}
.acquire-mirror-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 14px 8px;
  border-bottom: 1px solid var(--border-light);
}
.acquire-mirror-link {
  display: block;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  transition: background 0.12s;
}
.acquire-mirror-link:hover {
  background: var(--cream);
}
.acquire-mirror-close {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.acquire-mirror-close:hover {
  color: var(--text);
}

/* ── Availability badges ─────────────────────────────────── */
.acquire-result-ref-badge {
  display: inline-block;
  margin-top: 2px;
  margin-left: 4px;
  padding: 1px 7px;
  font-size: 0.62rem;
  font-family: var(--sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #8d6e63;
  background: #efebe9;
  border-radius: 3px;
}
.acquire-import-btn.done {
  border-color: #4CAF50;
  color: #4CAF50;
  cursor: default;
}

/* ── Pagination ───────────────────────────────────────────── */
.acquire-page-info {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-family: var(--sans);
  margin-bottom: 6px;
}
.acquire-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 0 4px;
  flex-wrap: wrap;
}
.acquire-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  font-size: 0.82rem;
  font-family: var(--sans);
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.acquire-page-btn:hover:not(:disabled):not(.active) {
  border-color: var(--gold);
  background: var(--cream);
}
.acquire-page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  font-weight: 700;
  cursor: default;
}
.acquire-page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.acquire-page-dots {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0 2px;
  user-select: none;
}

/* ── Real-time import progress ──────────────────────────────── */
.import-progress-list {
  /* FIX 1: responsive grid — wraps to as many columns as fit, each
   * cell at least min(100%, 320px) so on narrow panels it collapses
   * to a single full-width column and NEVER overflows horizontally.
   * Accommodates 1..N files as grid cells. */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.import-progress-item {
  /* Vertical stack: header row + pipeline bar row. Was display:flex
   * (incorrect for the stacked markup) — now a contained grid cell. */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}
.import-progress-item.import-status-pending {
  background: var(--cream-light, #faf8f4);
}
.import-progress-item.import-status-done {
  background: rgba(76, 175, 80, 0.06);
}
.import-progress-item.import-status-error {
  background: rgba(198, 40, 40, 0.06);
}

/* Spinner for pending files */
.import-progress-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-light);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: import-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes import-spin {
  to { transform: rotate(360deg); }
}

/* Done icon (checkmark) */
.import-progress-icon-done {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  position: relative;
}
.import-progress-icon-done::after {
  content: "\2713";
  color: #4CAF50;
  font-size: 14px;
  font-weight: 700;
  line-height: 14px;
}

/* Error icon (X) */
.import-progress-icon-error {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  position: relative;
}
.import-progress-icon-error::after {
  content: "\2717";
  color: #c62828;
  font-size: 14px;
  font-weight: 700;
  line-height: 14px;
}

.import-progress-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.import-progress-size {
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 55px;
  text-align: right;
  flex-shrink: 0;
}
.import-progress-status {
  font-size: 0.72rem;
  color: var(--text-muted);
  width: 90px;
  text-align: right;
  flex-shrink: 0;
}
.import-status-done .import-progress-status {
  color: #4CAF50;
  font-weight: 600;
}
.import-status-error .import-progress-status {
  color: #c62828;
  font-weight: 500;
}

.import-progress-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

/* Auto-collapse animation */
.import-progress-collapsed {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0;
  margin: 0;
  transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.3s ease;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 680px) {
  .acquire-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }
  .acquire-search-bar {
    max-width: 100%;
  }
  .acquire-body {
    padding: 14px 16px;
  }
  .acquire-sources {
    flex-wrap: wrap;
  }
  .acquire-filter-drawer {
    max-width: 100%;
  }
}

/* ── Batch Summary Dialog ─────────────────────────────────── */
.batch-summary-overlay { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; }
.batch-summary-dialog { background: var(--bg-primary, #faf3e0); border: 1px solid var(--border-color, #d4c5a9); border-radius: 8px; padding: 24px 28px; max-width: 440px; width: 90%; box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.batch-summary-title { margin: 0 0 16px; font-size: 1.1rem; color: var(--primary-dark, #5d4e37); }
.batch-summary-stat { font-size: 0.88rem; color: var(--text-secondary, #6b5b4a); margin-bottom: 4px; }
.batch-summary-times { background: var(--bg-muted, #f0e8d8); border-radius: 6px; padding: 12px 14px; margin: 14px 0; }
.batch-time-row { display: flex; justify-content: space-between; margin: 4px 0; }
.batch-time-label { font-weight: 600; color: var(--primary-dark, #5d4e37); }
.batch-time-value { color: var(--text-primary, #3e3225); }
.batch-summary-steps { font-size: 0.84rem; color: var(--text-secondary, #6b5b4a); margin: 10px 0 6px; }
.batch-summary-note { font-size: 0.78rem; color: var(--muted-text, #999); font-style: italic; margin: 8px 0 14px; }
.batch-summary-buttons { display: flex; gap: 8px; margin-top: 18px; }
.batch-btn { padding: 8px 16px; border-radius: 5px; border: 1px solid var(--border-color, #d4c5a9); font-size: 0.88rem; cursor: pointer; }
.batch-btn-local { background: var(--accent-gold, #c9a84c); color: #fff; border-color: var(--accent-gold, #c9a84c); font-weight: 600; }
.batch-btn-local:hover { background: var(--accent-gold-dark, #b8973e); }
.batch-btn-remote { background: var(--bg-primary, #faf3e0); color: var(--primary-dark, #5d4e37); }
.batch-btn-remote:hover { background: var(--bg-muted, #f0e8d8); }
.batch-btn-cancel { background: transparent; color: var(--muted-text, #999); border-color: transparent; }
.batch-btn-cancel:hover { color: var(--text-secondary, #6b5b4a); }

/* ── Step Tracker ─────────────────────────────────────── */
.step-tracker { margin: 6px 0 4px; }
.step-tracker-steps { display: flex; align-items: center; gap: 4px; font-size: 0.82rem; }
.step-tracker-step { display: inline-flex; align-items: center; gap: 3px; }
.step-tracker-icon { font-size: 0.9rem; width: 1em; text-align: center; }
.step-icon-done { color: var(--accent-green, #4a7c59); }
.step-icon-active { color: var(--accent-gold, #c9a84c); animation: pulse-step 1.2s infinite; }
.step-icon-pending { color: var(--muted-text, #999); }
.step-icon-error { color: var(--error-red, #c0392b); }
.step-tracker-label { color: var(--text-secondary, #6b5b4a); }
.step-done .step-tracker-label { color: var(--accent-green, #4a7c59); }
.step-active .step-tracker-label { color: var(--accent-gold, #c9a84c); font-weight: 600; }
.step-error .step-tracker-label { color: var(--error-red, #c0392b); }
.step-tracker-sep { color: var(--muted-text, #bbb); margin: 0 2px; font-size: 0.75rem; }
.step-tracker-bar { position: relative; height: 6px; background: var(--bg-muted, #e8ddd0); border-radius: 3px; margin: 6px 0 4px; overflow: hidden; }
.step-tracker-fill { height: 100%; background: var(--accent-gold, #c9a84c); border-radius: 3px; transition: width 0.3s ease; }
.step-tracker-pct { position: absolute; right: 0; top: -16px; font-size: 0.72rem; color: var(--text-secondary, #6b5b4a); }
.step-tracker-detail { font-size: 0.78rem; color: var(--text-secondary, #6b5b4a); margin-top: 2px; }
.step-tracker-complete { color: var(--accent-green, #4a7c59); }
.step-tracker-held { color: var(--muted-text, #999); font-style: italic; }
@keyframes pulse-step { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── Progress enhancements ────────────────────────────── */
.import-file-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; }
/* FIX 1: filename ellipsizes, never forces cell width to overflow. */
.import-file-header .import-progress-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-progress-meta { flex: 0 0 auto; font-size: 0.78rem; color: var(--muted-text, #999); white-space: nowrap; }
/* Live pipeline progress (replaces static time estimates) */
.import-pipeline-progress { margin-top: 4px; display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; box-sizing: border-box; }
.pipeline-progress-label { flex: 0 1 auto; min-width: 0; font-size: 0.78rem; color: var(--text-secondary, #6b5b4a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pipeline-progress-done { color: var(--success-green, #27ae60); font-weight: 500; }
.pipeline-progress-bar { flex: 1 1 auto; height: 6px; background: var(--border-color, #d4c5a9); border-radius: 3px; position: relative; min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; }
.pipeline-progress-fill { height: 100%; background: var(--accent-gold, #c9a84c); border-radius: 3px; transition: width 0.3s ease; }
.pipeline-progress-pct { position: absolute; right: 4px; top: -1px; font-size: 0.65rem; color: var(--text-secondary, #6b5b4a); line-height: 6px; }

.acquire-process-actions { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-color, #d4c5a9); text-align: right; }

/* ── Data-allowance badge (Linked Folders desc inline link) ──
 * 2026-05-09: warm-brown (--accent #7A3A10) instead of browser link blue;
 * underline only on hover; data-tip tooltip styled in palette. */
.data-allowance-link {
  position: relative;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
}
.data-allowance-link:hover,
.data-allowance-link:focus {
  color: var(--accent);
  text-decoration: underline;
}
.data-allowance-link[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #35201A;
  color: #FAF6F0;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s;
  z-index: 100;
}
.data-allowance-link[data-tip]:hover::after {
  opacity: .96;
}

/* ── Segmented control: Search + Advanced share visual seam ──
 * 2026-05-09: unified height/border so the gap reads as a divider,
 * not a chasm. Cream-tinted bg with brown text default; both buttons
 * round on the OUTSIDE only — Search left, Advanced right. */
.acquire-search-bar .acquire-search-btn {
  /* override accent fill above so the two buttons match visually */
  background: var(--cream);
  color: var(--brown-dark, #35201A);
  border: 1px solid var(--border);
  border-radius: 5px 0 0 5px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  height: auto;
  transition: background .12s, border-color .12s, color .12s;
}
.acquire-search-bar .acquire-search-btn:hover {
  background: var(--cream-dark, #F0EBE3);
  border-color: var(--border);
  color: var(--accent);
}
.acquire-search-bar .acquire-filter-toggle {
  background: var(--cream);
  color: var(--brown-dark, #35201A);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 5px 5px 0;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background .12s, border-color .12s, color .12s;
}
.acquire-search-bar .acquire-filter-toggle:hover {
  background: var(--cream-dark, #F0EBE3);
  border-color: var(--border);
  color: var(--accent);
}
.acquire-search-bar .acquire-filter-toggle.active {
  background: var(--cream-dark, #F0EBE3);
  border-color: var(--border);
  color: var(--accent);
}
