/* contacts.css — Excel ↔ Rehber (js/local/contacts-page.js): the chosen file and the column mapping in the selection
   area (one row per column: letter, header + sample values, role), the country-code field, the result box (first
   contacts beside the big number; unreadable numbers and the import steps under it). Builds on tool.css + local.css. */
.ctc__opts { display: grid; gap: 14px; }
.ctc__ccw { display: flex; align-items: stretch; }
.ctc__ccw b { display: grid; place-items: center; min-width: 40px; border: 1px solid var(--ink); border-inline-end: 0; font: 600 17px/1 var(--f-mono); background: var(--paper-2); }
.ctc__ccw .lfield__i { max-width: 110px; font-variant-numeric: tabular-nums; }
.ctc__cc small { margin-top: 2px; }
.seg__o:has(input:disabled) { cursor: default; }

/* selection area: the file row, the status line, the mapping */
.ctc-f { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 14px 18px 18px; border: 1px solid var(--ink); background: var(--paper); }
.ctc-f__m { min-width: 0; }
.ctc-f .chip__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctc-st { font-size: 15px; font-weight: 560; min-height: 1.4em; }
.ctc-st.is-bad { color: var(--signal-ink); }
.ctc-map { display: grid; gap: 8px; min-width: 0; }
.ctc-map:empty { display: none; }
.ctc-sheet { max-width: 320px; margin-bottom: 8px; }
.ctc-map__h { margin-top: 6px; }
.ctc-map__l { margin-top: 6px; border-top: 1px solid var(--ink); counter-reset: none; }
.ctc-map__r { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px); gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); transition: background .3s; }
.ctc-map__r:hover { background: var(--paper-2); }
.ctc-map__lab { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: center; min-width: 0; cursor: pointer; }
.ctc-map__c { display: grid; place-items: center; height: 30px; border: 1px solid var(--rule); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ctc-map__r:not([data-role="skip"]) .ctc-map__c { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.ctc-map__r[data-role="phone"] .ctc-map__c, .ctc-map__r[data-role="phone2"] .ctc-map__c { background: var(--ok); border-color: var(--ok); }
.ctc-map__t { display: grid; min-width: 0; }
.ctc-map__n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctc-map__s { font-size: var(--t-meta); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctc-map__r[data-role="skip"] .ctc-map__n { color: var(--ink-3); font-weight: 500; }
.ctc-map__sel { min-height: 42px; padding: 6px 10px; font-size: 15px; }

/* result: under the big number (a 4–5 digit count fills column 1 and beyond): the first contacts, the notes, then the
   unreadable numbers and the import steps */
.res--local .lbox:has(.ctc-res), .ctc-res { display: contents; }
.ctc-res__head { grid-column: 1 / -1; margin-top: 28px; display: grid; gap: 10px; min-width: 0; }
.ctc-res__more { grid-column: 1 / -1; display: grid; gap: 18px; margin-top: 26px; min-width: 0; }
.ctc-tb { width: 100%; border-collapse: collapse; border-top: 1px solid var(--ink); font-size: 15px; }
.ctc-tb td { padding: 7px 0; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.ctc-tb td + td { padding-inline-start: 12px; text-align: end; white-space: nowrap; font-size: 14px; }
.ctc-bad { margin: 0; }
.ctc-bad__l { margin: 8px 0 4px; }
.ctc-bad__l li { display: flex; gap: 10px; padding: 3px 0; font-size: var(--t-meta); }
.ctc-bad__l .mono { flex: none; min-width: 6.5em; color: var(--ink-3); }
.ctc-imp { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.45; }

@media (max-width: 719.98px) {
  .ctc-map__r { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ctc-res__head { grid-column: 1; margin-top: 14px; }
  .ctc-res__more { grid-column: 1; margin-top: 18px; }
}
