/* AI inventory from room photos — the progress card (every page), the strip and
   modal on the Items & Lists tab. */

/* floating cards, bottom-right, above the dock tabs (34px bar) */
#aiInvCards { position: fixed; right: 18px; bottom: 58px; z-index: 1040; /* under any modal backdrop (1050) */ display: flex; flex-direction: column; gap: 8px; width: 320px; max-width: calc(100vw - 36px); }
.ai-inv-card { background: #fff; border: 1px solid #dfe3ea; border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 30, 60, .16); padding: 10px 12px 9px; font-size: .8rem; animation: aiInvIn .25s ease-out; }
.ai-inv-card.is-done { border-color: #cfe7d8; }
.ai-inv-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.ai-inv-card-head .btn-close { margin-left: auto; font-size: .6rem; }
.ai-inv-card-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-inv-card-title a { color: inherit; text-decoration: underline dotted; }
.ai-inv-card-line { color: #5b6b86; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-inv-card-pct { font-weight: 600; min-width: 3.5ch; text-align: right; font-variant-numeric: tabular-nums; }
.ai-inv-card-foot { display: flex; justify-content: space-between; margin-top: 6px; font-size: .74rem; }
.ai-inv-bar { height: 7px; border-radius: 4px; background: #e9edf3; }
.ai-inv-bar-lg { height: 10px; }
@keyframes aiInvIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* strip under the Items toolbar */
.ai-inv-strip { font-size: .8rem; background: rgba(55, 98, 234, .06); }
.ai-inv-strip .progress { max-width: 360px; }

/* modal */
.ai-inv-rooms { max-height: 280px; overflow-y: auto; border: 1px solid #e3e7ee; border-radius: 8px; }
.ai-inv-room { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 0; border-bottom: 1px solid #eef1f5; cursor: pointer; font-size: .84rem; }
.ai-inv-room:last-child { border-bottom: 0; }
.ai-inv-room.is-off { color: #98a2b3; cursor: default; }
.ai-inv-room-name { flex: 1; font-weight: 500; }
.ai-inv-room .form-check-input { flex: 0 0 auto; }
.ai-inv-roomlist { max-height: 300px; overflow-y: auto; }
.ai-inv-roomrow { display: grid; grid-template-columns: 20px 1fr auto; column-gap: 8px; row-gap: 3px; align-items: center; padding: 6px 0; border-bottom: 1px solid #eef1f5; font-size: .84rem; }
.ai-inv-roomrow:last-child { border-bottom: 0; }
.ai-inv-roomrow .progress { grid-column: 2 / 4; }
.ai-inv-roomstate { width: 20px; text-align: center; }

[data-bs-theme="dark"] .ai-inv-card { background: #23272e; border-color: #3a4049; color: #e4e6eb; }
[data-bs-theme="dark"] .ai-inv-card-line { color: #aab3c2; }
[data-bs-theme="dark"] .ai-inv-bar { background: #353b45; }
[data-bs-theme="dark"] .ai-inv-rooms, [data-bs-theme="dark"] .ai-inv-room, [data-bs-theme="dark"] .ai-inv-roomrow { border-color: #3a4049; }
[data-bs-theme="dark"] .ai-inv-strip { background: rgba(55, 98, 234, .14); }

/* review list: one row per proposed item, photo + editable fields */
.ai-inv-card.needs-review { border-color: #b9c9f5; }
.ai-inv-review { max-height: 52vh; overflow-y: auto; border: 1px solid #e3e7ee; border-radius: 8px; }
.ai-inv-rev-room { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: #f4f6fa; border-bottom: 1px solid #e3e7ee; font-size: .82rem; position: sticky; top: 0; z-index: 1; }
.ai-inv-rev-row { display: grid; grid-template-columns: 18px 46px 1fr; grid-template-rows: auto auto; column-gap: 10px; row-gap: 3px; align-items: center; padding: 7px 10px; border-bottom: 1px solid #eef1f5; }
.ai-inv-rev-row:last-child { border-bottom: 0; }
.ai-inv-rev-row .ai-inv-rev-check { grid-row: 1 / 3; margin: 0; }
.ai-inv-rev-thumb { grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 6px; overflow: hidden; background: #e9edf3; display: flex; align-items: center; justify-content: center; color: #98a2b3; }
.ai-inv-rev-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai-inv-rev-fields { display: grid; grid-template-columns: 110px 1fr 110px 54px; gap: 6px; }
.ai-inv-rev-fields .form-control { font-size: .8rem; padding: 3px 6px; height: 28px; }
.ai-inv-rev-meta { font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-inv-rev-row:has(.ai-inv-rev-check:not(:checked)) .ai-inv-rev-fields, .ai-inv-rev-row:has(.ai-inv-rev-check:not(:checked)) .ai-inv-rev-meta, .ai-inv-rev-row:has(.ai-inv-rev-check:not(:checked)) .ai-inv-rev-thumb { opacity: .45; }
@media (max-width: 575px) { .ai-inv-rev-fields { grid-template-columns: 1fr 1fr; } }
[data-bs-theme="dark"] .ai-inv-review, [data-bs-theme="dark"] .ai-inv-rev-row, [data-bs-theme="dark"] .ai-inv-rev-room { border-color: #3a4049; }
[data-bs-theme="dark"] .ai-inv-rev-room { background: #2b3038; }
[data-bs-theme="dark"] .ai-inv-rev-thumb { background: #353b45; }
