/* THC Care 0.12.0: Keeper's Log, import section styles ("Bring records in from a spreadsheet (CSV)" on Export).
   Colours only through the --kl-* variables (logs.css), so Dark and High contrast carry through. Phone first: one
   column; the preview table scrolls inside its own box, never the page; nothing floats. */

.thc-care-logs__im { display: grid; gap: .75rem; min-width: 0; }
.thc-care-logs__im > * { margin-bottom: 0; margin-top: 0; min-width: 0; }
.thc-care-logs__im-file { background: var(--kl-raised); border: 1px solid var(--kl-border); border-left: 4px solid var(--kl-leaf); border-radius: var(--kl-radius); padding: .6rem .9rem; }
.thc-care-logs__im-alert { background: var(--kl-flag-bg); border: 1.5px solid var(--kl-flag-line); border-radius: var(--kl-radius); font-weight: 600; padding: .6rem .9rem; }
.thc-care-logs__im-paste { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; white-space: pre; }
.thc-care-logs__im-last { background: var(--kl-raised); border: 1px solid var(--kl-border); border-radius: var(--kl-radius); justify-content: space-between; padding: .5rem .9rem; }

/* column matching: one field per line on a phone, two or three across when there is room */
.thc-care-logs__im-map { background: var(--kl-raised); border: 1px solid var(--kl-border); border-radius: var(--thc-radius-lg, 16px); display: grid; gap: .75rem .9rem; grid-template-columns: minmax(0, 1fr); padding: .9rem; }
@media (min-width: 560px) { .thc-care-logs__im-map { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); } }
.thc-care-logs__im-map .thc-care-logs__field { align-content: start; min-width: 0; }
.thc-care-logs__im-need select { border-color: var(--kl-flag-line) !important; border-width: 2px !important; }
.thc-care-logs__im-need .thc-care-logs__hint { font-weight: 600; opacity: 1; }

.thc-care-logs__im-unknown p { margin: 0; }
.thc-care-logs__im-names { font-weight: 600; }
.thc-care-logs__im-counts { font-weight: 600; }

/* preview: the table scrolls sideways inside this box */
.thc-care-logs__im-scroll { border: 1px solid var(--kl-border); border-radius: var(--kl-radius); max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.thc-care-logs__im-table { border-collapse: collapse; font-size: .92rem; min-width: 100%; width: max-content; }
.thc-care-logs__im-table caption { caption-side: top; font-size: .92rem; opacity: .85; padding: .4rem .6rem; text-align: left; }
.thc-care-logs__im-table th, .thc-care-logs__im-table td { border-top: 1px solid var(--kl-border); max-width: 16rem; overflow-wrap: anywhere; padding: .4rem .6rem; text-align: left; vertical-align: top; }
.thc-care-logs__im-table th { background: var(--kl-muted); white-space: nowrap; }
.thc-care-logs__im-skips { margin: 0 0 .5rem; padding-left: 1.2rem; }
.thc-care-logs__im-skips li { margin: .15rem 0; }

/* where the file is from: the note after a file is recognized, and the folded list of known apps */
.thc-care-logs__im-source { background: var(--kl-raised); border: 1px solid var(--kl-border); border-left: 4px solid var(--kl-leaf); border-radius: var(--kl-radius); overflow-wrap: anywhere; padding: .6rem .9rem; }
.thc-care-logs__im-apps { display: grid; gap: .35rem; margin: .25rem 0 .5rem; padding-left: 1.2rem; }
.thc-care-logs__im-apps li { overflow-wrap: anywhere; }
.thc-care-logs__im-known .thc-care-logs__hint { margin: 0; }

.thc-care-logs__im-undo p { margin: 0; }

/* "Which of these are feedings?": one ticked value per line */
.thc-care-logs__im-pick { background: var(--kl-raised); border: 1px solid var(--kl-border); border-radius: var(--kl-radius); display: grid; gap: .1rem; margin: 0; min-width: 0; padding: .6rem .9rem; }
.thc-care-logs__im-pick legend { font-weight: 600; padding: 0 .3rem; }
.thc-care-logs__im-pick .thc-care-logs__check { overflow-wrap: anywhere; }
.thc-care-logs__im-pick .thc-care-logs__hint { margin: .2rem 0 0; }
