/* Admin > Import (rebrandly-import module): file + brand + actions row, summary tags, preview table
   (desktop) that becomes a stacked list on phones. Builds on admin.css tokens and classes. */
.rbi-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rbi-form .table-btn { height: var(--ctl-h); white-space: nowrap; }
.rbi-form [hidden] { display: none !important; } /* .admin-primary-btn sets display */
.rbi-file-btn { display: inline-flex; align-items: center; cursor: pointer; }
.rbi-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rbi-file-input:focus-visible + .rbi-file-name { outline: 2px solid var(--accent); outline-offset: 2px; }
.rbi-file-name { font-size: 12px; color: var(--text-muted); min-width: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbi-brand { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.rbi-brand select {
    height: var(--ctl-h); min-width: 140px; padding: 0 8px; border-radius: var(--radius-sm);
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-main);
    /* Same type as the buttons beside it (.table-btn); phones get 16px from tokens.css (no iOS zoom). */
    font-family: 'Inter', 'Inter Fallback', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 11px; font-weight: 600;
}
.rbi-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.rbi-summary[hidden] { display: none; }
.rbi-summary-total { color: var(--text-main); font-weight: 700; margin-right: 4px; }
.rbi-summary-domains { flex-basis: 100%; color: var(--text-muted); overflow-wrap: anywhere; }
.rbi-tag {
    display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
    padding: 2px 7px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap;
}
.rbi-tag.new { color: var(--success-text); border-color: rgba(16, 185, 129, 0.35); }
.rbi-tag.conflict { color: var(--warning-text); border-color: rgba(245, 158, 11, 0.35); }
.rbi-tag.invalid { color: var(--danger-text); border-color: rgba(239, 68, 68, 0.35); }
.rbi-table-wrap { max-height: 60vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.rbi-table-wrap[hidden] { display: none; }
.rbi-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.rbi-table th {
    position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--text-muted);
    font-weight: 600; text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border);
}
.rbi-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); color: var(--text-main); vertical-align: top; overflow: hidden; text-overflow: ellipsis; }
.rbi-table tr:last-child td { border-bottom: none; }
.rbi-table th:nth-child(1) { width: 52px; }
.rbi-table th:nth-child(2) { width: 16%; }
.rbi-table th:nth-child(4) { width: 18%; }
.rbi-table th:nth-child(5) { width: 80px; }
.rbi-table th:nth-child(6) { width: 26%; }
.rbi-line { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rbi-slug { font-weight: 600; overflow-wrap: anywhere; }
.rbi-dest, .rbi-title { white-space: nowrap; }
.rbi-type { color: var(--text-muted); }
.rbi-reason { display: block; margin-top: 3px; color: var(--text-muted); font-size: 11px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
.rbi-more td { color: var(--text-muted); text-align: center; }
@media (max-width: 600px) {
    .rbi-file-name { flex: 1 1 0; max-width: none; }
    .rbi-brand { flex: 1 1 100%; }
    .rbi-brand select { flex: 1; min-width: 0; }
    .rbi-form .table-btn:not(.rbi-file-btn) { flex: 1 1 0; justify-content: center; }
    /* Phones: the select must stay at 16px (tokens.css; smaller makes iOS zoom in on focus), so the
       buttons and labels of this row use the same size and weight instead of 11px. */
    .rbi-form .table-btn, .rbi-brand, .rbi-brand select, .rbi-file-name { font-size: 16px; font-weight: 600; }
    .rbi-table-wrap { max-height: none; border: none; overflow: visible; }
    .rbi-table, .rbi-table tbody { display: block; table-layout: auto; }
    .rbi-table thead { display: none; }
    .rbi-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 10px; margin-bottom: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
    .rbi-table td { display: block; padding: 0; border: none; min-width: 0; }
    .rbi-table .rbi-line { display: none; }
    .rbi-table .rbi-slug { grid-column: 1; grid-row: 1; }
    .rbi-table td.rbi-status { display: contents; }
    .rbi-table .rbi-status .rbi-tag { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
    .rbi-table .rbi-dest, .rbi-table .rbi-title, .rbi-table .rbi-type { grid-column: 1 / -1; color: var(--text-muted); font-size: 11px; }
    .rbi-table .rbi-reason { grid-column: 1 / -1; margin-top: 2px; }
    .rbi-more td { grid-column: 1 / -1; }
}
