/* Video-to-GIF Converter tool styles. Unique "vg-" class prefix to avoid
   collisions with other Media Tools pages. Uses the shared --site-dark /
   --site-dark-2 / --site-light tokens from content/assets/common.css for
   all color - only layout/spacing here is tool-specific. */
:root { }

.vg-card { padding: 28px; }
.vg-title-bar { background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 100%); border-radius: 10px 10px 0 0; padding: 18px 24px; margin: -28px -28px 24px; }
.vg-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; }

/* ===== Dropzone ===== */
.vg-dropzone { border: 2px dashed #cbd5e1; border-radius: 10px; padding: 36px 20px; text-align: center; color: #6b7280; cursor: pointer; transition: all .15s ease; }
.vg-dropzone:hover { border-color: var(--site-light); }
.vg-dropzone.dragover { border-color: var(--site-light); background: #f0fdfa; }
.vg-dropzone i { font-size: 2.3em; margin-bottom: 10px; display: block; color: var(--site-light); }
.vg-dropzone p { margin: 0 0 4px; font-weight: 600; color: #374151; }
.vg-dropzone .vg-hint { font-size: .82em; color: #9ca3af; }
.vg-dropzone input[type="file"] { display: none; }

.vg-hint { font-size: .82em; color: #9ca3af; margin: 8px 0 0; }

.vg-error { color: var(--site-danger); background: var(--site-danger-bg); border: 1px solid var(--site-danger-border); border-radius: 8px; padding: 12px 16px; font-size: .9em; margin: 16px 0 0; }
.vg-error.hide { display: none; }

/* ===== Workspace ===== */
.vg-workspace { margin-top: 22px; }
.vg-change-file { background: none; border: none; color: var(--site-dark); font-weight: 600; font-size: .88em; cursor: pointer; padding: 0 0 16px; display: inline-flex; align-items: center; gap: 6px; }
.vg-change-file:hover { color: var(--site-dark); }

.vg-video-wrap { background: #111827; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.vg-video-wrap video { width: 100%; max-height: 360px; display: block; background: #111827; }
.vg-video-meta { font-size: .82em; color: #6b7280; text-align: center; margin: 0 0 20px; }

/* ===== Controls ===== */
.vg-controls { border: 1px solid #eee; border-radius: 10px; padding: 18px 20px; background: #fafbfc; margin-bottom: 18px; }
.vg-field { margin-bottom: 16px; }
.vg-field:last-child { margin-bottom: 0; }
.vg-field label { display: block; font-size: .85em; font-weight: 600; color: #374151; margin-bottom: 6px; }
.vg-field label span { color: var(--site-dark); font-weight: 700; }
.vg-field select, .vg-field input[type="number"] { width: 100%; border: 1px solid #ddd; border-radius: 7px; padding: 9px 10px; font-size: .92em; box-sizing: border-box; background: #fff; color: #23272f; }
.vg-field input[type="range"] { width: 100%; accent-color: var(--site-light); }
.vg-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.vg-field-row:last-child { margin-bottom: 0; }
.vg-field-row.vg-field-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.vg-clip-hint { font-size: .84em; color: #6b7280; margin: 0 0 4px; text-align: center; font-weight: 600; }
.vg-clip-hint strong { color: var(--site-dark); }

/* ===== Buttons ===== */
.vg-btn { border: none; border-radius: 8px; padding: 13px 26px; font-weight: 700; cursor: pointer; font-size: .98em; display: flex; align-items: center; gap: 8px; background: var(--site-light); color: #fff; width: 100%; justify-content: center; transition: filter .15s ease; }
.vg-btn:disabled { opacity: .45; cursor: not-allowed; }
.vg-btn:not(:disabled):hover { filter: brightness(1.08); }
.vg-btn-download { background: var(--site-dark); margin-top: 16px; }

/* ===== Progress ===== */
.vg-progress-wrap { margin-top: 18px; }
.vg-progress-wrap.hide { display: none; }
.vg-progress-track { background: #eef0f3; border-radius: 999px; height: 12px; overflow: hidden; }
.vg-progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--site-light), var(--site-dark)); border-radius: 999px; transition: width .2s ease; }
.vg-progress-label { text-align: center; font-size: .85em; color: #6b7280; margin: 8px 0 0; }

/* ===== Result ===== */
.vg-result { margin-top: 22px; border-top: 1px solid #eee; padding-top: 20px; }
.vg-result.hide { display: none; }
.vg-result-preview { background: repeating-conic-gradient(#f1f3f6 0% 25%, #fff 0% 50%) 50% / 20px 20px; border: 1px solid #e5e7eb; border-radius: 10px; min-height: 160px; max-height: 320px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 8px; }
.vg-result-preview img { max-width: 100%; max-height: 300px; object-fit: contain; display: block; }
.vg-result-meta { font-size: .85em; color: #6b7280; text-align: center; margin: 10px 0 0; }

.vg-status { text-align: center; color: #6b7280; font-size: .88em; margin-top: 12px; min-height: 1.3em; }
.vg-status:empty { display: none; }

@media (max-width: 640px) {
    .vg-field-row, .vg-field-row.vg-field-row-3 { grid-template-columns: 1fr; }
}
