/* The guest import (idea 12): column matching, the preview as cards, the confirm bar.
 * Tokens only. Fields are 16px so a phone does not zoom, and every tappable thing is 44px high there. */

.gi { display: flex; flex-direction: column; gap: var(--space-16); }
.gi-lead { margin: 0; font-size: 15px; line-height: 1.55; }
.gi-help, .gi-sub, .gi-note { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.gi-note { padding: var(--space-8) var(--space-16); background: var(--info-soft); color: var(--text); border-radius: var(--radius); }
.gi-choose { display: flex; flex-wrap: wrap; gap: var(--space-8); margin-top: var(--space-4); }
.gi textarea { width: 100%; font-size: 16px; line-height: 1.5; }
.gi select { font-size: 16px; max-width: 100%; }
.gi-field { margin: 0; min-width: 0; }
.gi-field select { width: 100%; }

.gi-file { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-8) var(--space-8); }
.gi-file strong { overflow-wrap: anywhere; }
.gi-file .btn { margin-left: auto; }

.gi-h { margin: var(--space-16) 0 0; font-family: var(--font-display); font-size: 18px; font-weight: 500; }

.gi-check { display: flex; align-items: flex-start; gap: var(--space-8); min-height: 44px; padding: var(--space-8) 0; font-size: 14.5px; line-height: 1.5; cursor: pointer; }
.gi-check input { flex: none; width: 22px; height: 22px; margin-top: 0; accent-color: var(--accent); }

/* Columns: a table-like grid on a laptop, stacked cards on a phone. */
.gi-cols { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius); }
.gi-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: var(--space-4) var(--space-16); padding: var(--space-8) var(--space-16); }
.gi-col + .gi-col { border-top: 1px solid var(--border); }
.gi-col-name { display: flex; flex-direction: column; min-width: 0; }
.gi-col-name strong { overflow-wrap: anywhere; }
.gi-col-sample { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.gi-col-note { font-size: 12.5px; font-weight: 700; color: var(--warning); }
.gi-unmatched { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-8) var(--space-16); padding: var(--space-8) var(--space-16); background: var(--warning-soft); border-radius: var(--radius); }
.gi-unmatched p { margin: 0; flex: 1 1 240px; font-size: 14px; line-height: 1.5; }

/* The preview: one card a row. */
.gi-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-8); }
.gi-card { padding: var(--space-16) var(--space-16); border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); display: flex; flex-direction: column; gap: var(--space-8); }
.gi-card.is-skipped { background: var(--surface); }
.gi-card.is-skipped .gi-card-name { text-decoration: line-through; text-decoration-thickness: 1px; }
.gi-card-top { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-8) var(--space-8); }
.gi-card-n { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 48px; }
.gi-card-name { font-size: 15.5px; overflow-wrap: anywhere; }
.gi-card-bits { font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.gi-card-chips { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.gi-problem { display: flex; align-items: flex-start; gap: var(--space-8); margin: 0; padding: var(--space-8) var(--space-8); border-radius: var(--radius); background: var(--info-soft); font-size: 13.5px; line-height: 1.5; }
.gi-problem.warning { background: var(--warning-soft); }
.gi-problem.error { background: var(--error-soft); }
.gi-problem .material-symbols-rounded { flex: none; font-size: 18px; margin-top: 0; }
.gi-choice { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-8) var(--space-8); font-size: 13.5px; }

.gi-foot { align-items: center; }
.gi-summary { margin: 0; flex: 1 1 260px; font-size: 15px; font-weight: 700; line-height: 1.4; }

@media (max-width: 640px) {
  .gi-col { grid-template-columns: minmax(0, 1fr); padding: var(--space-16); }
  .gi select, .gi .btn, .gi-foot .btn { min-height: 44px; }
  .gi-choose .btn, .gi-unmatched .btn { width: 100%; justify-content: center; }
  .gi-file .btn { margin-left: 0; }
  /* Summary on a line of its own, then the two buttons side by side, so the bar stays short on a small screen. */
  .gi-foot { flex-wrap: wrap; gap: var(--space-8); }
  .gi-foot .spacer { display: none; }
  .gi-summary { flex: 1 1 100%; font-size: 14.5px; }
  .gi-foot .btn { flex: 1 1 0; justify-content: center; }
  .gi-foot .btn.primary { order: 2; flex-grow: 2; }
}
