/* contents.css — Contents Tagger page styles */

/* ─── CONTENTS TAGGER PAGE ─── */
.ct-layout { display: grid; grid-template-columns: 55% 45%; gap: 0; height: calc(100vh - 120px); min-height: 500px; }
.ct-photo-panel { display: flex; flex-direction: column; border-right: 1px solid var(--gray-200); background: #fafbfc; padding: 12px; overflow: hidden; }
.ct-viewer { flex: 1; display: flex; align-items: center; justify-content: center; background: #000; border-radius: 8px; overflow: hidden; position: relative; min-height: 0; margin-bottom: 8px; }
.ct-viewer img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ct-counter { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.65); color: #fff; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.ct-nav { display: flex; gap: 8px; margin-bottom: 8px; }
.ct-thumbs { display: flex; gap: 4px; overflow-x: auto; padding: 6px 0; height: 80px; flex-shrink: 0; }
.ct-thumb { flex-shrink: 0; width: 64px; height: 64px; border-radius: 4px; overflow: hidden; cursor: pointer; border: 2px solid var(--gray-200); position: relative; }
.ct-thumb.active { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59,130,246,0.3); }
.ct-thumb.tagged { border-color: var(--green); }
.ct-thumb.untagged { border-color: var(--red); opacity: 0.5; }
.ct-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ct-thumb-dot { position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; border-radius: 50%; }
.ct-thumb.tagged .ct-thumb-dot { background: var(--green); }
.ct-thumb.untagged .ct-thumb-dot { background: var(--red); }
.ct-assign-panel { display: flex; flex-direction: column; padding: 16px; overflow-y: auto; }
.ct-assign-panel h3 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.ct-combo-wrap { position: relative; margin-bottom: 12px; }
.ct-combo-input { width: 100%; padding: 8px 10px; border: 1px solid var(--gray-200); border-radius: 6px; font-size: 13px; }
.ct-combo-drop { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--gray-200); border-top: none; border-radius: 0 0 6px 6px; max-height: 220px; overflow-y: auto; z-index: 100; display: none; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.ct-combo-drop.open { display: block; }
.ct-combo-opt { padding: 8px 10px; cursor: pointer; font-size: 12px; border-bottom: 1px solid var(--gray-100); }
.ct-combo-opt:hover { background: var(--gray-50); }
.ct-combo-opt.selected { background: var(--blue); color: #fff; }
.ct-field { margin-bottom: 10px; }
.ct-field label { display: block; font-size: 11px; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.ct-field input { width: 100%; padding: 7px 10px; border: 1px solid var(--gray-200); border-radius: 6px; font-size: 13px; }
.ct-field input[readonly] { background: var(--gray-50); color: var(--gray-500); }
.ct-actions { display: flex; gap: 8px; margin-top: 12px; }
.ct-actions .btn { flex: 1; }
.ct-export-row { display: flex; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--gray-200); flex-wrap: wrap; }
.ct-export-row .btn { font-size: 11px; padding: 6px 12px; }
.ct-keys { font-size: 11px; color: var(--gray-400); margin-top: 12px; line-height: 1.7; }
.ct-keys kbd { background: var(--gray-100); padding: 1px 5px; border-radius: 3px; font-family: monospace; font-size: 11px; }
/* Photo filter bar */
.ct-filter-bar { display: flex; gap: 6px; align-items: center; padding: 6px 0; }
.ct-filter-bar .ct-filter-btn { font-size: 11px; padding: 3px 10px; border: 1px solid var(--gray-200); border-radius: 12px; background: transparent; color: var(--gray-500); cursor: pointer; transition: all 0.15s; }
.ct-filter-bar .ct-filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.ct-filter-bar .ct-filter-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.ct-thumb.ct-hidden { display: none; }
/* Unmatched panel */
#ct-unmatched-panel { border-top: 1px solid var(--gray-200); margin-top: 10px; padding-top: 4px; }
#ct-unmatched-list { max-height: 300px; overflow-y: auto; }
#ct-unmatched-list.collapsed { max-height: 0 !important; overflow: hidden; }
.ct-unmatched-item { display: flex; gap: 8px; align-items: center; padding: 4px 6px; font-size: 11px; border-bottom: 1px solid var(--gray-100); cursor: pointer; }
.ct-unmatched-item:hover { background: var(--gray-50); }
.ct-unmatched-item .ct-um-est { font-weight: 700; color: var(--blue); min-width: 36px; }
.ct-unmatched-item .ct-um-room { color: var(--gray-400); min-width: 60px; }
.ct-unmatched-item .ct-um-desc { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-ai-badge { display: inline-block; font-size: 9px; background: #dbeafe; color: var(--blue); padding: 1px 5px; border-radius: 3px; margin-left: 4px; font-weight: 600; vertical-align: middle; }
/* Session history items */
.ct-sess-item { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--gray-200); border-radius: 6px; margin-bottom: 6px; cursor: pointer; transition: all 0.15s; }
.ct-sess-item:hover { border-color: var(--blue); background: #f8fafc; }
.ct-sess-info { flex: 1; min-width: 0; }
.ct-sess-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-sess-meta { font-size: 10px; color: var(--gray-400); }
.ct-sess-badge { font-size: 10px; padding: 2px 6px; border-radius: 3px; font-weight: 600; white-space: nowrap; }
.ct-sess-del { color: var(--gray-300); font-size: 16px; padding: 2px 6px; border: none; background: none; cursor: pointer; border-radius: 4px; }
.ct-sess-del:hover { color: var(--red); background: #fee2e2; }
.ct-success { background: #d1fae5; border: 1px solid var(--green); border-radius: 4px; padding: 6px 10px; font-size: 12px; color: #047857; margin-bottom: 8px; display: none; }
.ct-success.show { display: block; }
/* Contents setup */
.ct-setup { max-width: 580px; margin: 0 auto; }
.ct-setup-card { background: #fff; border: 1px solid var(--gray-200); border-radius: 8px; padding: 16px; margin-bottom: 12px; }
.ct-setup-card h3 { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.ct-setup-card .hint { font-size: 11px; color: var(--gray-400); margin-bottom: 10px; }
.ct-drop-zone { border: 2px dashed var(--gray-200); border-radius: 8px; padding: 24px 12px; text-align: center; cursor: pointer; transition: all 0.2s; }
.ct-drop-zone:hover { border-color: var(--blue); background: #f8fafc; }
.ct-drop-zone.drag-over { border-color: var(--blue); background: #eff6ff; }
.ct-drop-zone.loaded { border-color: var(--green); border-style: solid; background: #f0fdf4; }
.ct-drop-icon { font-size: 24px; margin-bottom: 4px; }
.ct-drop-text { font-size: 12px; color: var(--gray-500); line-height: 1.5; }
.ct-drop-text strong { color: var(--blue); }
.ct-drop-ok { font-size: 13px; color: var(--green); font-weight: 600; }
.ct-drop-sub { font-size: 10px; color: var(--gray-400); margin-top: 4px; }
.ct-photo-opts { display: flex; gap: 8px; margin-top: 8px; }
.ct-photo-opts .btn { flex: 1; font-size: 11px; padding: 5px; }
.ct-status { margin-top: 6px; padding: 5px 8px; border-radius: 4px; font-size: 11px; display: none; }
.ct-status.ok { display: block; background: #d1fae5; border: 1px solid var(--green); color: #047857; }
.ct-status.err { display: block; background: #fee2e2; border: 1px solid var(--red); color: #dc2626; }
