/* LeadCanal file tools. Builds on the lookup tool styles (.lct-*). */
.lcft { position: relative; }
.lcft .lcft-boot { margin: 0; color: var(--lct-muted); }
.lcft > * + * { margin-top: 14px; }
.lcft [hidden] { display: none !important; }

/* Drop zone */
.lcft-drop-wrap { display: grid; gap: 8px; }
.lcft-drop {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
	min-height: 168px; padding: 26px 18px; text-align: center; cursor: pointer;
	background: #fff; border: 2px dashed #B9CDBF; border-radius: 18px;
	transition: border-color .15s, background-color .15s, transform .15s;
}
.lcft-drop:hover, .lcft-drop.is-over { border-color: var(--lct-primary); background: #F3FAF4; }
.lcft-drop.is-over { transform: scale(1.005); }
.lcft-drop:focus-within { outline: 3px solid var(--lct-mint); outline-offset: 3px; }
.lcft-drop-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--lct-mint); color: var(--lct-primary); margin-bottom: 4px; }
.lcft-drop-t { font-family: var(--f-display, Manrope, sans-serif); font-weight: 800; font-size: 18px; color: var(--lct-ink); }
.lcft-drop-hint { font-size: 14px; color: var(--lct-muted); max-width: 46ch; }
.lcft-drop-types { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--lct-muted); background: var(--lct-paper); padding: 3px 10px; border-radius: 999px; margin-top: 4px; white-space: pre-wrap; }
.lcft-file { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.lcft-reject { margin: 0; padding: 10px 14px; border-radius: 12px; background: #FBF1EF; border: 1px solid #EBC6C0; color: #7A2A20; font-size: 14px; }

/* File list */
.lcft-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lcft-files:empty { display: none; }
.lcft-files li { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--lct-line); border-radius: 12px; padding: 8px 8px 8px 14px; font-size: 14.5px; overflow-wrap: anywhere; }
.lcft-x { width: 30px; height: 30px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--lct-paper); color: var(--lct-ink); font-size: 18px; line-height: 1; cursor: pointer; }
.lcft-x:hover { background: #F7E2DF; color: var(--lct-fail); }
.lcft-picked { margin: 0; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }

/* Text input and output */
.lcft-input, .lcft-output {
	width: 100%; padding: 14px 16px; border: 1.5px solid var(--lct-line); border-radius: 14px; background: #fff;
	font: 13.5px/1.55 ui-monospace, Menlo, Consolas, monospace; color: var(--lct-ink); resize: vertical; box-sizing: border-box;
}
.lcft-input:focus, .lcft-output:focus { outline: none; border-color: var(--lct-primary); box-shadow: 0 0 0 3px rgba(30,71,56,.12); }
.lcft-output { background: #FBFCFB; min-height: 180px; }

/* Options */
.lcft-more { background: #fff; border: 1px solid var(--lct-line); border-radius: 14px; }
.lcft-more > summary { cursor: pointer; padding: 12px 16px; font-family: var(--f-display, Manrope, sans-serif); font-weight: 700; font-size: 14.5px; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.lcft-more > summary::-webkit-details-marker { display: none; }
.lcft-more > summary::after { content: "+"; font-size: 20px; color: var(--lct-primary); line-height: 1; }
.lcft-more[open] > summary::after { content: "\2212"; }
.lcft-more > :not(summary) { padding: 0 16px 16px; }
.lcft-more > .lcft-output, .lcft-more > .lct-code { margin: 0 16px 16px; width: calc(100% - 32px); }
.lcft-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }
.lcft-opt { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lcft-opt.is-wide { grid-column: 1 / -1; }
.lcft-opt label { font-family: var(--f-display, Manrope, sans-serif); font-weight: 700; font-size: 13.5px; color: var(--lct-ink); }
.lcft-opt select, .lcft-opt input:not([type=range]):not([type=checkbox]):not([type=color]) {
	width: 100%; min-height: 44px; padding: 8px 12px; border: 1.5px solid var(--lct-line); border-radius: 12px; background: #fff; font: inherit; font-size: 15px; color: var(--lct-ink); box-sizing: border-box;
}
.lcft-opt input[type=color] { width: 64px; height: 40px; padding: 2px; border: 1.5px solid var(--lct-line); border-radius: 10px; background: #fff; }
.lcft-opt input[type=range] { width: 100%; accent-color: var(--lct-primary); }
.lcft-opt select:focus, .lcft-opt input:focus { outline: none; border-color: var(--lct-primary); box-shadow: 0 0 0 3px rgba(30,71,56,.12); }
.lcft-opt small { font-size: 12.5px; color: var(--lct-muted); }
.lcft-checks { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 16px; }
.lcft-sub { margin: 0 0 8px; font-size: 14px; color: var(--lct-muted); }

/* Actions */
.lcft-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lcft-ghost { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--lct-line); border-radius: 999px; background: #fff; color: var(--lct-ink); font-family: var(--f-display, Manrope, sans-serif); font-weight: 700; font-size: 14px; cursor: pointer; }
.lcft-ghost:hover { border-color: var(--lct-primary); color: var(--lct-primary); }
.lcft-ghost:focus-visible, .lcft-link:focus-visible { outline: 3px solid var(--lct-mint); outline-offset: 2px; }
.lcft-link { background: none; border: 0; padding: 0; color: var(--lct-primary); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.lcft-bar { height: 8px; border-radius: 999px; background: #E3ECE5; overflow: hidden; }
.lcft-bar > span { display: block; height: 100%; width: 0; background: var(--lct-primary); transition: width .2s; }
.lcft-private { margin: 0; font-size: 13px; color: var(--lct-muted); display: flex; align-items: center; gap: 6px; }
.lcft-private span { display: inline-flex; color: var(--lct-pass); }

/* Results */
.lcft-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.lcft-card-head .lct-name { font-size: 18px; overflow-wrap: anywhere; }
.lcft-list { display: grid; gap: 10px; }
.lcft-out { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #EEF2EF; }
.lcft-out:last-of-type { border-bottom: 0; }
.lcft-out-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lcft-out-meta strong { overflow-wrap: anywhere; }
.lcft-out-meta span { font-size: 13.5px; color: var(--lct-muted); }
.lcft-warn { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px; background: #FBF2DF; color: #6B4A10; font-size: 14.5px; }
.lcft-next { margin: 14px 0 0; font-size: 14px; color: var(--lct-muted); }
.lcft-next a { color: var(--lct-primary); font-weight: 600; }
.lcft-table-wrap { max-height: 420px; overflow: auto; border: 1px solid var(--lct-line); border-radius: 12px; margin-top: 0; }
.lcft-table { font-size: 13.5px; }
.lcft-table th { position: sticky; top: 0; background: #F6F9F6; color: var(--lct-ink); font-weight: 700; }
.lcft-table td, .lcft-table th { white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.lcft-table td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.lcft-split { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
.lcft-thumb { width: 100%; max-width: 220px; height: auto; border-radius: 10px; border: 1px solid var(--lct-line); background: #fff; }
.lcft-gallery { display: flex; flex-wrap: wrap; gap: 10px; }
.lcft-gallery .lcft-thumb { width: 140px; }

/* Password prompt */
.lcft-pw { background: #fff; border: 1.5px solid var(--lct-primary); border-radius: 14px; padding: 14px; display: grid; gap: 8px; }
.lcft-pw label { font-weight: 700; font-size: 14.5px; }
.lcft-pw-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lcft-pw-row input { flex: 1; min-width: 180px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--lct-line); border-radius: 12px; font: inherit; }
.lcft-pw small { color: var(--lct-muted); font-size: 12.5px; }

/* Image ordering */
.lcft-thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.lcft-thumbs:empty { display: none; }
.lcft-thumb-item { position: relative; background: #fff; border: 1px solid var(--lct-line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; cursor: grab; }
.lcft-thumb-item img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--lct-paper); border-radius: 8px; }
.lcft-thumb-n { position: absolute; top: 12px; left: 12px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--lct-primary); color: #fff; font-weight: 800; font-size: 12.5px; display: grid; place-items: center; }
.lcft-thumb-name { font-size: 12px; color: var(--lct-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lcft-thumb-ctrl { display: flex; gap: 4px; }
.lcft-thumb-ctrl button { flex: 1; min-height: 32px; border: 1px solid var(--lct-line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 14px; }
.lcft-thumb-ctrl button:hover:not(:disabled) { border-color: var(--lct-primary); color: var(--lct-primary); }
.lcft-thumb-ctrl button:disabled { opacity: .35; cursor: default; }

/* Column mapping */
.lcft-map { background: #fff; border: 1px solid var(--lct-line); border-radius: 14px; padding: 16px; }
.lcft-map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; margin-bottom: 12px; }

/* Crop editor */
.lcft-crop { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 20px; align-items: start; background: #fff; border: 1px solid var(--lct-line); border-radius: 18px; padding: 16px; }
.lcft-crop-stage { display: flex; justify-content: center; }
.lcft-crop-canvas { max-width: 100%; border-radius: 12px; touch-action: none; cursor: grab; background: #E9EFE9; }
.lcft-crop-canvas:active { cursor: grabbing; }
.lcft-crop-canvas:focus-visible { outline: 3px solid var(--lct-mint); outline-offset: 3px; }
.lcft-crop-side { display: grid; gap: 12px; }
.lcft-crop-prev { display: grid; gap: 8px; }
.lcft-crop-row { display: flex; gap: 8px; align-items: center; }
.lcft-crop-row canvas { border-radius: 4px; background: repeating-conic-gradient(#EEF2EF 0 25%, #fff 0 50%) 0 0 / 12px 12px; }

/* Hidden render frame for PDF output */
.lcft-render-frame { position: fixed; left: -12000px; top: 0; border: 0; background: #fff; visibility: hidden; pointer-events: none; }

@media (max-width: 760px) {
	.lcft-crop { grid-template-columns: 1fr; }
	.lcft-table td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.lcft-split { grid-template-columns: 1fr; }
	.lcft-out { flex-direction: column; align-items: stretch; }
	.lcft-actions .lct-btn, .lcft-actions .lcft-ghost { flex: 1 1 auto; }
	.lcft-drop { min-height: 140px; }
}
@media (prefers-reduced-motion: reduce) { .lcft-drop, .lcft-bar > span { transition: none; } }
