/*
 * Free tools (/tools). Uses only the theme tokens from theme.css so it follows
 * the site palette: flat surfaces, hairline borders, solid fills, no gradients.
 */
.vt-banner { padding-bottom: 40px !important; }
.vt-page { padding-bottom: 24px; }

/* Breadcrumbs */
.vt-crumbs { margin-bottom: 18px; }
.vt-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: .86rem; color: var(--ve-text-faint); }
.vt-crumbs li + li:before { content: "/"; margin-right: 6px; color: var(--ve-text-faint); }
.vt-crumbs a { color: var(--ve-text-muted); }
.vt-crumbs a:hover { color: var(--ve-accent-fg); }
.vt-crumbs [aria-current] { color: var(--ve-text); }

/* Trust row */
.vt-trust { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 22px 0 0; font-size: .88rem; color: var(--ve-text-muted); }
.vt-trust li { display: flex; align-items: center; gap: 8px; }
.vt-trust i { color: var(--ve-accent-fg); }

/* Hub */
.vt-search { position: relative; max-width: 460px; margin: 32px 0 20px; }
.vt-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ve-text-faint); pointer-events: none; }
.vt-search .form-control { padding-left: 40px; height: 46px; background: var(--ve-surface); border: 1px solid var(--ve-line-strong); color: var(--ve-text); }
.vt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 14px; margin-bottom: 8px; }
.vt-grid [hidden] { display: none !important; }
.vt-card { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; column-gap: 12px; row-gap: 0; padding: 12px 14px; min-width: 0; background: var(--ve-surface); border: 1px solid var(--ve-line); border-radius: var(--ve-radius); color: var(--ve-text); font-weight: 600; text-decoration: none; transition: border-color .15s, background .15s; }
.vt-card:hover { border-color: var(--ve-accent); background: var(--ve-surface-2); color: var(--ve-text); text-decoration: none; }
.vt-card > i { grid-row: 1 / span 2; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--ve-radius); background: var(--ve-accent-soft); color: var(--ve-accent-fg); font-size: 1.05rem; }
.vt-card > span { grid-column: 2; min-width: 0; overflow-wrap: anywhere; hyphens: auto; line-height: 1.25; }
.vt-card > em { grid-column: 2; justify-self: start; margin-top: 6px; font-style: normal; font-size: .66rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; background: var(--ve-accent-soft); color: var(--ve-accent-fg); }
.vt-group { position: relative; content-visibility: auto; contain-intrinsic-size: auto 420px; }
.vt-tg { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.vt-cut .vt-card:nth-child(n+13) { display: none; }
.vt-tg:checked ~ .vt-cut .vt-card:nth-child(n+13), .vt-searching .vt-cut .vt-card:nth-child(n+13) { display: grid; }
.vt-showall { display: inline-block; margin: 10px 0 4px; padding: 8px 16px; font-size: .88rem; font-weight: 600; color: var(--ve-accent-fg); background: var(--ve-surface); border: 1px solid var(--ve-line-strong); border-radius: var(--ve-radius-sm); cursor: pointer; }
.vt-showall:hover { border-color: var(--ve-accent); }
.vt-tg:focus-visible ~ .vt-showall { outline: 2px solid var(--ve-accent); outline-offset: 2px; }
.vt-showall span + span, .vt-tg:checked ~ .vt-showall span:first-child { display: none; }
.vt-tg:checked ~ .vt-showall span + span { display: inline; }
.vt-searching .vt-showall { display: none; }
.vt-chip { font-size: .68rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; background: var(--ve-accent-soft); color: var(--ve-accent-fg); }
.vt-empty { color: var(--ve-text-muted); margin: 16px 0; }
.vt-h2 { font-size: 1.25rem; margin: 32px 0 14px; }
.vt-more { margin: 16px 0 0; }

/* Tool surface */
.vt-tool { margin-top: 28px; padding: 24px; }
.vt-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 240px; margin: 0; padding: 28px 16px; text-align: center; cursor: pointer; border: 1px dashed var(--ve-line-strong); border-radius: var(--ve-radius); background: var(--ve-canvas); transition: border-color .15s, background .15s; }
.vt-drop:hover, .vt-drop:focus, .vt-drop.is-over { border-color: var(--ve-accent); background: var(--ve-accent-soft); outline: none; }
.vt-drop-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 50%; background: var(--ve-accent-soft); color: var(--ve-accent-fg); font-size: 1.5rem; margin-bottom: 8px; }
.vt-drop-title { font-size: 1.1rem; font-weight: 600; color: var(--ve-text); }
.vt-drop-hint { font-size: .86rem; color: var(--ve-text-muted); }

/* Workspace */
.vt-work { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 24px; }
.vt-stage { background: #000; border: 1px solid var(--ve-line); border-radius: var(--ve-radius); overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 200px; }
.vt-stage video, .vt-stage img, .vt-stage canvas { display: block; max-width: 100%; max-height: 420px; width: auto; height: auto; }
.vt-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.vt-field label, .vt-label { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 6px; font-size: .86rem; font-weight: 600; color: var(--ve-text); }
.vt-field label output, .vt-val { font-weight: 500; color: var(--ve-accent-fg); font-variant-numeric: tabular-nums; }
.vt-field .form-control, .vt-field select.form-control { height: 40px; }
.vt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vt-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.vt-seg button { flex: 1 1 auto; padding: 7px 10px; font-size: .86rem; font-weight: 600; cursor: pointer; background: var(--ve-surface-2); color: var(--ve-text-muted); border: 1px solid var(--ve-line-strong); border-radius: var(--ve-radius-sm); }
.vt-seg button:hover { color: var(--ve-text); }
.vt-seg button.is-on { background: var(--ve-accent-soft); border-color: var(--ve-accent); color: var(--ve-accent-fg); }
.vt-switch { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--ve-text); cursor: pointer; margin: 0; }
.vt-switch input { accent-color: var(--ve-fill); width: 16px; height: 16px; }

/* Range inputs */
.vt-tool input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; margin: 0; }
.vt-tool input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--ve-line-strong); }
.vt-tool input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--ve-line-strong); }
.vt-tool input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--ve-accent); border: 2px solid var(--ve-canvas); }
.vt-tool input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ve-accent); border: 2px solid var(--ve-canvas); }
.vt-tool input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--ve-accent); }

/* Trim timeline */
.vt-trim { position: relative; height: 34px; margin-top: 12px; }
.vt-trim-track { position: absolute; left: 0; right: 0; top: 14px; height: 6px; border-radius: 3px; background: var(--ve-line-strong); }
.vt-trim-sel { position: absolute; top: 14px; height: 6px; background: var(--ve-accent); border-radius: 3px; }
.vt-trim input[type=range] { position: absolute; left: 0; top: 6px; pointer-events: none; }
.vt-trim input[type=range]::-webkit-slider-runnable-track { background: transparent; }
.vt-trim input[type=range]::-moz-range-track { background: transparent; }
.vt-trim input[type=range]::-webkit-slider-thumb { pointer-events: auto; cursor: grab; }
.vt-trim input[type=range]::-moz-range-thumb { pointer-events: auto; cursor: grab; }
.vt-trim-meta { display: flex; justify-content: space-between; font-size: .82rem; color: var(--ve-text-muted); font-variant-numeric: tabular-nums; margin-top: 2px; }

/* Actions, progress, result */
.vt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.vt-actions .btn { flex: 1 1 auto; }
.vt-progress { display: none; }
.vt-progress.is-on { display: block; }
.vt-bar { height: 6px; border-radius: 3px; background: var(--ve-line-strong); overflow: hidden; }
.vt-bar > span { display: block; height: 100%; width: 0; background: var(--ve-accent); transition: width .15s linear; }
.vt-progress-text { display: flex; justify-content: space-between; margin-top: 6px; font-size: .82rem; color: var(--ve-text-muted); }
.vt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.vt-stat { padding: 10px 12px; background: var(--ve-canvas); border: 1px solid var(--ve-line); border-radius: var(--ve-radius-sm); }
.vt-stat b { display: block; font-size: 1.05rem; color: var(--ve-text); }
.vt-stat span { font-size: .76rem; color: var(--ve-text-muted); text-transform: uppercase; letter-spacing: .03em; }
.vt-note { font-size: .84rem; color: var(--ve-text-muted); margin: 0; }
.vt-warn { font-size: .86rem; padding: 10px 12px; border-radius: var(--ve-radius-sm); border: 1px solid rgba(var(--ve-danger-rgb,255,123,120),.4); background: rgba(var(--ve-danger-rgb,255,123,120),.08); color: var(--ve-danger-soft,#ff9a97); }
.vt-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--ve-canvas); border: 1px solid var(--ve-line); border-radius: var(--ve-radius-sm); font-size: .88rem; }
.vt-file b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.vt-file span { color: var(--ve-text-muted); }
.vt-file button { background: none; border: 0; color: var(--ve-text-muted); cursor: pointer; padding: 2px 6px; }
.vt-file button:hover { color: var(--ve-text); }

/* Batch list */
.vt-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.vt-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--ve-canvas); border: 1px solid var(--ve-line); border-radius: var(--ve-radius-sm); }
.vt-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 3px; background: var(--ve-surface-2); }
.vt-item-main { flex: 1; min-width: 0; }
.vt-item-main b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.vt-item-main span { font-size: .8rem; color: var(--ve-text-muted); }

/* Prose / content */
.vt-prose { padding: 28px; }
.vt-prose h2 { font-size: 1.35rem; margin-bottom: 14px; }
.vt-prose h3 { font-size: 1.05rem; margin: 22px 0 8px; }
.vt-prose p { color: var(--ve-text-muted); line-height: 1.7; margin-bottom: 0; }
.vt-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; counter-reset: s; }
.vt-steps li { display: flex; gap: 14px; align-items: flex-start; color: var(--ve-text-muted); line-height: 1.6; }
.vt-step-n { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ve-accent-soft); color: var(--ve-accent-fg); font-weight: 700; font-size: .85rem; }

/* Video downloader */
.vt-dl-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; }
.vt-dl-row .form-control { height: 52px; font-size: 1rem; background: var(--ve-canvas); border: 1px solid var(--ve-line-strong); color: var(--ve-text); }
.vt-dl-row .btn { height: 52px; padding: 0 22px; white-space: nowrap; }
.vt-dl-card { display: grid; grid-template-columns: minmax(0, 280px) 1fr; gap: 20px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--ve-line); }
.vt-dl-thumb { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--ve-line); border-radius: var(--ve-radius); overflow: hidden; display: grid; place-items: center; color: var(--ve-text-faint); font-size: 2rem; }
.vt-dl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vt-dl-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 3px; background: rgba(var(--ve-scrim-rgb,0,0,0),.75); color: var(--ve-text-strong,#fff); font-size: .78rem; font-variant-numeric: tabular-nums; }
.vt-dl-title { font-size: 1.1rem; line-height: 1.4; margin: 0 0 4px; }
.vt-dl-opts { display: grid; gap: 8px; margin: 14px 0; }
.vt-dl-opt { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; text-align: left; background: var(--ve-surface-2); color: var(--ve-text); border: 1px solid var(--ve-line-strong); border-radius: var(--ve-radius-sm); transition: border-color .15s, background .15s; }
.vt-dl-opt:hover:not(:disabled) { border-color: var(--ve-accent); background: var(--ve-accent-soft); }
.vt-dl-opt:disabled { opacity: .6; cursor: default; }
.vt-dl-ext { color: var(--ve-text-muted); font-size: .8rem; font-weight: 600; }
.vt-dl-size { color: var(--ve-text-muted); font-size: .86rem; white-space: nowrap; }
.vt-dl-opt .fa-download { color: var(--ve-accent-fg); }

@media (max-width: 860px) {
    .vt-work { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .vt-dl-row { grid-template-columns: 1fr 1fr; }
    .vt-dl-row .form-control { grid-column: 1 / -1; }
    .vt-dl-card { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .vt-tool { padding: 14px; }
    .vt-prose { padding: 20px 16px; }
    .vt-drop { min-height: 190px; }
    .vt-row { grid-template-columns: 1fr; }
}

/* Supported sites chips */
.vt-sites { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.vt-site { padding: 6px 12px; font-size: .86rem; font-weight: 600; color: var(--ve-text-muted); background: var(--ve-surface-2); border: 1px solid var(--ve-line-strong); border-radius: var(--ve-radius-sm); text-decoration: none; transition: border-color .15s, color .15s; }
.vt-site:hover { color: var(--ve-accent-fg); border-color: var(--ve-accent); text-decoration: none; }

/* ===== Funnel: "Upload and share" calls to action (app/tools_funnel.php, assets/js/tools/funnel.js) ===== */
.vt-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 4px; padding: 14px 16px; background: var(--ve-surface-2); border: 1px solid var(--ve-line-strong); border-radius: var(--ve-radius); }
.vt-cta[hidden] { display: none; }
.vt-cta__mark { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--ve-radius); background: var(--ve-accent-soft); color: var(--ve-accent-fg); font-size: 1.05rem; }
.vt-cta__body { flex: 1 1 220px; min-width: 0; }
.vt-cta__title { margin: 0 0 2px; font-size: .98rem; font-weight: 700; color: var(--ve-text); line-height: 1.35; overflow-wrap: anywhere; }
.vt-cta__text { margin: 0; font-size: .86rem; color: var(--ve-text-muted); line-height: 1.5; overflow-wrap: anywhere; }
.vt-cta__msg { margin-top: 8px; font-size: .84rem; color: var(--ve-danger-soft, #ff9a97); line-height: 1.5; }
.vt-cta__msg[hidden] { display: none; }
.vt-cta__link { margin-inline-start: 4px; color: var(--ve-accent-fg); font-weight: 600; }
.vt-cta__btn { flex: 0 0 auto; max-width: 100%; white-space: normal; }
.vt-cta--card { margin: 24px 0 0; padding: 18px 20px; }
.vt-cta--card .vt-cta__title { font-size: 1.05rem; }
@media (max-width: 575.98px) {
    .vt-cta, .vt-cta--card { padding: 14px; }
    .vt-cta__btn { flex: 1 1 100%; }
}

/* Supported-site icons inside the downloader card: one row, extra icons are clipped */
.vt-sites-wrap{margin-top:22px;padding-top:18px;border-top:1px solid var(--ve-line,rgba(255,255,255,.1));text-align:center}
.vt-sites-icons{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;height:44px;overflow:hidden}
.vt-site-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;border-radius:var(--ve-radius-sm,8px);background:var(--ve-surface-2,rgba(255,255,255,.04));border:1px solid var(--ve-line,rgba(255,255,255,.1));color:var(--ve-text-muted,#8d919b);transition:color .15s,border-color .15s,background .15s}
.vt-site-icon:hover,.vt-site-icon:focus-visible{color:var(--ve-text-strong,#fff);border-color:var(--ve-accent,#4a7dff);background:var(--ve-accent-soft,rgba(74,125,255,.12));text-decoration:none}
.vt-site-icon svg{display:block;width:22px;height:22px}
.vt-sites-note{margin:12px 0 0;font-size:.875rem;color:var(--ve-text-muted,#8d919b)}
.vt-sites-note b{color:var(--ve-text-strong,inherit);font-weight:600}
@media (max-width:575.98px){.vt-sites-icons{gap:8px;height:40px}.vt-site-icon{width:40px;height:40px}}
