/* Page-only layout for /colocar-legenda-no-video/. Encoder stays in legenda-video.mjs. */

body.page-colocar-legenda-no-video .lgv-page {
  --vl-blue: #2563eb;
  --vl-ink: #172033;
  --vl-muted: #64748b;
  --vl-line: #e3e9f1;
}
body.page-colocar-legenda-no-video .article .lgv-page p { margin: 0; }
body.page-colocar-legenda-no-video .article .lgv-page .conv-title {
  color: #172033;
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  letter-spacing: -0.045em;
  line-height: 1.08;
}
body.page-colocar-legenda-no-video .article .lgv-page .conv-lede {
  margin: 0 0 18px;
  color: #5346c7;
  font-size: 1.02rem;
  line-height: 1.4;
}
body.page-colocar-legenda-no-video .lgv-page .conv-perks strong { color: #1d4ed8; }
body.page-colocar-legenda-no-video .lgv-mascot {
  position: relative;
  width: min(100%, 210px);
  margin: 10px 0 0;
  padding: 8px 0 4px;
}
body.page-colocar-legenda-no-video .lgv-mascot::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 6%;
  bottom: 10%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 48%, #dbeafe 0%, #eef5ff 58%, rgba(238, 245, 255, 0) 76%);
}
body.page-colocar-legenda-no-video .article .lgv-page .lgv-mascot img.conv-art {
  position: relative;
  width: 100%;
  max-width: none;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
@media (max-width: 980px) {
  body.page-colocar-legenda-no-video .lgv-mascot { display: none; }
}

body.page-colocar-legenda-no-video #lgv-tool { min-width: 0; }
body.page-colocar-legenda-no-video #lgv-tool [hidden] { display: none !important; }
body.page-colocar-legenda-no-video #lgv-editor { display: none; }
body.page-colocar-legenda-no-video #lgv-editor.is-open { display: contents; }
body.page-colocar-legenda-no-video #lgv-tool:has(#lgv-editor.is-open) .lgv-upload { display: none; }
body.page-colocar-legenda-no-video #lgv-tool:not(:has(#lgv-editor.is-open)) #lgv-reset { display: none; }
body.page-colocar-legenda-no-video #lgv-change { display: none; }
body.page-colocar-legenda-no-video #lgv-tool:has(#lgv-editor.is-open) #lgv-change { display: inline-flex; }

body.page-colocar-legenda-no-video .lgv-page .conv-card,
body.page-colocar-legenda-no-video .lgv-page .conv-steps { border-radius: 16px; }
body.page-colocar-legenda-no-video .article .lgv-page h2.conv-card-title { margin: 0; }
body.page-colocar-legenda-no-video .lgv-n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--vl-blue);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  vertical-align: middle;
}

body.page-colocar-legenda-no-video .lgv-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  padding: 28px 16px;
  border: 1.5px dashed #93c5fd;
  border-radius: 16px;
  background: #f5f9ff;
  color: var(--vl-ink);
  text-align: center;
  cursor: pointer;
}
body.page-colocar-legenda-no-video .lgv-drop.is-dragover { background: #e0ecff; }
body.page-colocar-legenda-no-video .article .lgv-page .lgv-drop-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}
body.page-colocar-legenda-no-video .lgv-drop-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
body.page-colocar-legenda-no-video .article .lgv-page .lgv-limits {
  margin: 0;
  color: var(--vl-muted);
  font-size: 0.82rem;
}
body.page-colocar-legenda-no-video .lgv-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

body.page-colocar-legenda-no-video .lgv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--vl-line);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}
body.page-colocar-legenda-no-video .lgv-btn:hover { border-color: #93c5fd; color: var(--vl-blue); }
body.page-colocar-legenda-no-video .lgv-btn-primary {
  border: 0;
  background: var(--vl-blue);
  color: #fff;
}
body.page-colocar-legenda-no-video .lgv-btn-primary:hover { color: #fff; }
body.page-colocar-legenda-no-video #lgv-save { width: 100%; min-height: 46px; }
body.page-colocar-legenda-no-video #lgv-save:disabled {
  background: #e8eef9;
  color: #94a3b8;
  cursor: not-allowed;
}

body.page-colocar-legenda-no-video .lgv-cues {
  width: 100%;
  min-height: 140px;
  padding: 10px 12px;
  border: 1px solid var(--vl-line);
  border-radius: 12px;
  background: #fff;
  color: var(--vl-ink);
  font: 0.84rem/1.45 ui-monospace, "Cascadia Mono", Consolas, monospace;
  resize: vertical;
}
body.page-colocar-legenda-no-video .lgv-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
body.page-colocar-legenda-no-video .lgv-places { display: flex; gap: 8px; }
body.page-colocar-legenda-no-video .lgv-places button.is-selected {
  border-color: #93c5fd;
  background: #f5f9ff;
  color: var(--vl-blue);
}
body.page-colocar-legenda-no-video .article .lgv-page .lgv-meta {
  color: var(--vl-muted);
  font-size: 0.82rem;
  line-height: 1.35;
}
body.page-colocar-legenda-no-video .lgv-field label {
  display: block;
  color: var(--vl-muted);
  font-size: 0.78rem;
  font-weight: 700;
}
body.page-colocar-legenda-no-video .lgv-field input {
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--vl-line);
  border-radius: 10px;
  background: #fff;
  color: var(--vl-ink);
  font: inherit;
}
body.page-colocar-legenda-no-video .lgv-actions { display: grid; }

body.page-colocar-legenda-no-video .lgv-progress-wrap { display: none; align-items: center; gap: 10px; }
body.page-colocar-legenda-no-video .lgv-progress-wrap.is-visible { display: flex; }
body.page-colocar-legenda-no-video .lgv-progress-main { flex: 1; min-width: 0; }
body.page-colocar-legenda-no-video .lgv-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
body.page-colocar-legenda-no-video .lgv-progress-fill { width: 0; height: 100%; background: var(--vl-blue); }
body.page-colocar-legenda-no-video .article .lgv-page .lgv-progress-text {
  margin: 6px 0 0;
  color: var(--vl-muted);
  font-size: 0.8rem;
}
body.page-colocar-legenda-no-video #lgv-status:empty { display: none; }
body.page-colocar-legenda-no-video .article .lgv-page .lgv-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.84rem;
  line-height: 1.35;
}

body.page-colocar-legenda-no-video .lgv-result { display: none; }
body.page-colocar-legenda-no-video .lgv-result.is-visible { display: grid; gap: 10px; }
body.page-colocar-legenda-no-video .lgv-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
body.page-colocar-legenda-no-video .lgv-result-name {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.page-colocar-legenda-no-video .lgv-result-sub { color: var(--vl-muted); font-size: 0.8rem; line-height: 1.35; }
body.page-colocar-legenda-no-video #lgv-result-video,
body.page-colocar-legenda-no-video #lgv-video {
  display: block;
  width: 100%;
  max-height: 320px;
  background: #000;
}
body.page-colocar-legenda-no-video #lgv-result-video { border-radius: 12px; }
body.page-colocar-legenda-no-video .lgv-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--vl-line);
}
body.page-colocar-legenda-no-video .lgv-next span { color: var(--vl-muted); font-size: 0.78rem; }
body.page-colocar-legenda-no-video .lgv-next a {
  padding: 6px 10px;
  border: 1px solid var(--vl-line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
}

body.page-colocar-legenda-no-video .lgv-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
body.page-colocar-legenda-no-video .lgv-stage {
  display: grid;
  place-items: center;
  min-height: 168px;
  overflow: hidden;
  border: 1px dashed #d5deea;
  border-radius: 14px;
  background: #f8fafc;
}
body.page-colocar-legenda-no-video .article .lgv-page .lgv-stage-empty {
  margin: 0;
  color: var(--vl-muted);
  font-size: 0.86rem;
}
body.page-colocar-legenda-no-video .lgv-preview { display: none; position: relative; width: 100%; }
body.page-colocar-legenda-no-video #lgv-tool:has(#lgv-editor.is-open) .lgv-stage {
  border-style: solid;
  border-color: #0f172a;
  background: #0f172a;
}
body.page-colocar-legenda-no-video #lgv-tool:has(#lgv-editor.is-open) .lgv-preview { display: block; }
body.page-colocar-legenda-no-video #lgv-tool:has(#lgv-editor.is-open) .lgv-stage-empty { display: none; }
body.page-colocar-legenda-no-video .lgv-preview canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
body.page-colocar-legenda-no-video .lgv-facts { display: grid; margin: 0; }
body.page-colocar-legenda-no-video .lgv-facts div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--vl-line);
}
body.page-colocar-legenda-no-video .lgv-facts dt { color: var(--vl-muted); font-size: 0.78rem; }
body.page-colocar-legenda-no-video .lgv-facts dd {
  margin: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.page-colocar-legenda-no-video .article .lgv-formats p { margin: 0 0 8px; line-height: 1.45; }
body.page-colocar-legenda-no-video .lgv-tips ol { margin: 0; padding-left: 1.1rem; }
body.page-colocar-legenda-no-video .lgv-tips li { margin: 0 0 6px; }

html[data-theme="dark"] body.page-colocar-legenda-no-video .article .lgv-page .conv-title { color: #f8fafc; }
html[data-theme="dark"] body.page-colocar-legenda-no-video .article .lgv-page .conv-lede { color: #c4b5fd; }
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-page .conv-perks strong { color: #93c5fd; }
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-mascot::before { display: none; }
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-drop,
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-cues,
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-field input,
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-btn,
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-next a {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-places button.is-selected { background: #172554; color: #93c5fd; }
html[data-theme="dark"] body.page-colocar-legenda-no-video #lgv-save:disabled { background: #1e293b; color: #64748b; }
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-facts div { border-bottom-color: #334155; }
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-btn-primary { background: #2563eb; color: #fff; border-color: transparent; }

/* Legenda automática, ajuste de tempo e estilo */
body.page-colocar-legenda-no-video .lgv-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
body.page-colocar-legenda-no-video .lgv-auto {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
body.page-colocar-legenda-no-video #lgv-auto:disabled {
  background: #e8eef9;
  color: #94a3b8;
  cursor: not-allowed;
}
body.page-colocar-legenda-no-video .lgv-select {
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--vl-line);
  border-radius: 12px;
  background: #fff;
  color: var(--vl-ink);
  font: inherit;
  font-size: 0.9rem;
}
body.page-colocar-legenda-no-video .lgv-btn:disabled { opacity: 0.55; cursor: not-allowed; }
body.page-colocar-legenda-no-video .lgv-btn-ghost { border-style: dashed; }
body.page-colocar-legenda-no-video .lgv-stepper {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 6px;
  margin-top: 4px;
}
body.page-colocar-legenda-no-video .lgv-stepper .lgv-btn { padding: 0; }
body.page-colocar-legenda-no-video .lgv-field .lgv-stepper input {
  margin-top: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

body.page-colocar-legenda-no-video .lgv-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
body.page-colocar-legenda-no-video .lgv-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px;
  border: 1px solid var(--vl-line);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
body.page-colocar-legenda-no-video .lgv-preset.is-selected {
  border-color: var(--vl-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
  color: var(--vl-blue);
}
body.page-colocar-legenda-no-video .lgv-swatch {
  display: grid;
  place-items: center;
  width: 100%;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #64748b, #334155);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  -webkit-text-stroke: 1px #000;
}
body.page-colocar-legenda-no-video .lgv-swatch.is-box {
  -webkit-text-stroke: 0;
  background:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)) center / 60% 55% no-repeat,
    linear-gradient(135deg, #64748b, #334155);
}
body.page-colocar-legenda-no-video .lgv-swatch.is-yellow { color: #facc15; }
body.page-colocar-legenda-no-video .lgv-swatch.is-reels {
  font-family: "Arial Black", Impact, system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.05rem;
  -webkit-text-stroke: 1.5px #000;
}
body.page-colocar-legenda-no-video .lgv-places button { flex: 1 1 0; }
body.page-colocar-legenda-no-video .lgv-style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  align-items: end;
}
body.page-colocar-legenda-no-video .lgv-field input[type="range"] {
  width: 100%;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: var(--vl-blue);
}
body.page-colocar-legenda-no-video .lgv-field .lgv-select { width: 100%; margin-top: 4px; }
body.page-colocar-legenda-no-video .lgv-field input[type="color"] {
  height: 42px;
  padding: 4px;
  cursor: pointer;
}
body.page-colocar-legenda-no-video .lgv-checks {
  display: grid;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
}
body.page-colocar-legenda-no-video .lgv-checks label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
body.page-colocar-legenda-no-video .lgv-checks input { width: 18px; height: 18px; accent-color: var(--vl-blue); }
body.page-colocar-legenda-no-video .article .lgv-page .lgv-status.is-info {
  background: #eff6ff;
  color: #1e40af;
}
body.page-colocar-legenda-no-video #lgv-recents {
  margin: 16px 0 0;
  width: 100%;
  min-width: 0;
}
body.page-colocar-legenda-no-video #lgv-recents:not([hidden]) { display: block; }
body.page-colocar-legenda-no-video #lgv-recents .vhist {
  margin: 0;
  padding: 16px 18px 14px;
  border: 1px solid #e8edf5;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03), 0 8px 24px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
}
body.page-colocar-legenda-no-video #lgv-recents .vhist-head {
  align-items: center;
  margin-bottom: 12px;
}
body.page-colocar-legenda-no-video #lgv-recents .vhist-label {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #0f172a;
}
body.page-colocar-legenda-no-video #lgv-recents .vhist-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: #94a3b8;
}
body.page-colocar-legenda-no-video #lgv-recents .vhist-clear {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
}
body.page-colocar-legenda-no-video #lgv-recents .vhist-list {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)) !important;
  gap: 8px;
}
body.page-colocar-legenda-no-video #lgv-recents .vhist-item {
  background: #f8fafc;
  border-color: #eef2f7;
}
body.page-colocar-legenda-no-video #lgv-recents .vhist-item:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}
@media (max-width: 480px) {
  body.page-colocar-legenda-no-video .lgv-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.page-colocar-legenda-no-video .lgv-style-grid { grid-template-columns: 1fr; }
}

html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-stage {
  background: #0f172a;
  border-color: #334155;
}
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-select,
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-preset {
  background: #1e293b;
  color: #e2e8f0;
  border-color: #334155;
}
html[data-theme="dark"] body.page-colocar-legenda-no-video .lgv-preset.is-selected { border-color: #60a5fa; color: #93c5fd; }
html[data-theme="dark"] body.page-colocar-legenda-no-video #lgv-auto:disabled { background: #1e293b; color: #64748b; }
html[data-theme="dark"] body.page-colocar-legenda-no-video .article .lgv-page .lgv-status { background: #3b0d0d; color: #fecaca; }
html[data-theme="dark"] body.page-colocar-legenda-no-video .article .lgv-page .lgv-status.is-info { background: #172554; color: #bfdbfe; }

/* Uma coluna: a prévia do vídeo sobe para logo depois dos passos,
   para o estilo mudar com o vídeo à vista. */
@media (max-width: 1100px) {
  body.page-colocar-legenda-no-video .lgv-page .conv-board > .conv-stack { display: contents; }
  body.page-colocar-legenda-no-video .lgv-page .conv-steps { order: -2; }
  body.page-colocar-legenda-no-video #lgv-tool:has(#lgv-editor.is-open) .lgv-info { order: -1; }
}

@media (max-width: 560px) {
  body.page-colocar-legenda-no-video #lgv-recents .vhist {
    padding: 14px 12px 12px;
  }
  body.page-colocar-legenda-no-video #lgv-recents .vhist-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

html[data-theme="dark"] body.page-colocar-legenda-no-video #lgv-recents .vhist {
  background: #1a2030;
  border-color: #2a3344;
  box-shadow: none;
}
html[data-theme="dark"] body.page-colocar-legenda-no-video #lgv-recents .vhist-label {
  color: #f1f5f9;
}
html[data-theme="dark"] body.page-colocar-legenda-no-video #lgv-recents .vhist-item {
  background: #151b28;
  border-color: #2a3344;
}
html[data-theme="dark"] body.page-colocar-legenda-no-video #lgv-recents .vhist-item:hover {
  background: #1c2434;
  border-color: #3a4558;
}
