/* editor.css — só para o Editor de vídeo. A caixa de envio (.drop), os botões (.btn / .btn ghost), o estado (.status),
   a barra (.bar) e as cores vêm do tk.css (família da página); aqui só o que é próprio do editor, com os tokens do site
   (--line, --bg, --surface, --muted, --ink, --fam-bg, --fam-fg, --err) para o modo escuro funcionar. */
.ed { --ed-acc: var(--fam-fg); container-type: inline-size; }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
@container (min-width: 640px) { .ed-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.ed-col { min-width: 0; display: grid; gap: 12px; }
.ed-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 12px; min-width: 0; }
.ed-panel > h2, .ed-panel > h3 { margin: 0 0 10px; font-size: 16px; font-weight: 650; letter-spacing: 0; }
.ed-panel > h3 span { font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
details.ed-panel > summary { font-weight: 650; cursor: pointer; padding: 2px 0; }
details.ed-panel[open] > summary { margin-bottom: 8px; }
.ed .drop { padding: 20px 12px; }
.ed .drop strong { font-size: 17px; }
.ed .btn.ed-small { min-height: 38px; padding: 7px 12px; font-size: 14px; }
.ed .btn.ghost { color: var(--ink); }
.ed-file { position: relative; overflow: hidden; }
.ed-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ed-file:focus-within { outline: 2px solid var(--ed-acc); outline-offset: 2px; }
.ed-clips { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.ed-clip { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px; cursor: pointer; background: var(--surface); }
.ed-clip img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: #000; }
.ed-clip.ed-sel { border-color: var(--ed-acc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--fam-bg) 70%, transparent); }
.ed-ci { min-width: 0; display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; }
.ed-ci b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.ed-ci span { color: var(--muted); font-size: 13px; }
.ed-cb { display: flex; gap: 2px; }
.ed-cb button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; font: inherit; padding: 0; }
.ed-tr { text-align: center; font-size: 13px; color: var(--muted); }
.ed-empty { color: var(--muted); text-align: center; margin: 10px 0 0; font-size: 14px; }
.ed-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0; font-size: 15px; }
.ed-row label { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ed-row input[type=number] { width: 5.5em; }
.ed-row input[type=number], .ed-row select, .ed-sub input, .ed-sub textarea { min-height: 38px; padding: 6px 8px; border-radius: 8px; background: var(--surface); }
.ed-row select { max-width: 100%; }
.ed-row input[type=range], .ed-row input[type=checkbox], .ed-progress { accent-color: var(--ed-acc); }
.ed-row input[type=range] { max-width: 150px; }
.ed-row input[type=color] { width: 40px; height: 32px; padding: 0 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.ed-src { width: 100%; max-height: 260px; background: #000; border-radius: 10px; display: block; }
.ed-stage { position: relative; width: min(100%, 360px); margin: 0 auto; background: #000; border-radius: 12px; overflow: hidden; container-type: inline-size; }
.ed-stage video#pv-main { position: absolute; inset: 0; width: 100%; height: 100%; }
.ed-stage video#pv-ov { position: absolute; z-index: 2; }
.ed-pvsub { position: absolute; left: 50%; z-index: 3; max-width: 88%; text-align: center; font-weight: 700; padding: .15em .4em; border-radius: .2em; white-space: pre-line; line-height: 1.2; font-family: Inter, system-ui, sans-serif; }
.ed-pvbar { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 10px 0 4px; }
.ed-note { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.ed-sub { display: grid; grid-template-columns: 5.5em 5.5em minmax(0, 1fr) auto; grid-template-areas: "s e . x" "t t t t"; gap: 4px; margin: 8px 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ed-sub [data-k=start] { grid-area: s; } .ed-sub [data-k=end] { grid-area: e; } .ed-sub [data-k=text] { grid-area: t; } .ed-sub [data-act=delsub] { grid-area: x; }
.ed-sub input, .ed-sub textarea { width: 100%; min-width: 0; }
.ed-sub textarea { resize: vertical; min-height: 38px; }
.ed-sub button { width: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.ed-progress { margin-top: 12px; display: grid; gap: 4px; }
.ed .bar { height: 10px; }
.ed-result { width: 100%; max-height: 420px; background: #000; border-radius: 10px; margin: 10px 0 0; display: block; }
.ed .status:empty { min-height: 0; margin: 0; }
/* "Pronto!" do Ko-fi ao lado do botão de baixar: a coluna é estreita, por isso o cartão quebra como no celular */
.ed .tk-done-slot .kofi { flex-wrap: wrap; align-items: flex-start; }
.ed .tk-done-slot .kofi-tx { flex: 1 1 calc(100% - 70px); }
.ed .tk-done-slot .kofi-cta { margin-left: 70px; }

/* logo, marca d'água e etiquetas (05/11) */
.ed-sub3 { font-size: 15px; margin: 14px 0 4px; }
.ed-stage .ed-pvlayer { position: absolute; z-index: 3; pointer-events: none; max-width: none; height: auto; }
.ed-stage .ed-pvwm { font-weight: 700; white-space: pre; line-height: 1.1; font-family: Inter, system-ui, sans-serif; text-shadow: 0 0 .08em rgba(0,0,0,.35); }
.ed-stage #pv-logo { z-index: 4; }
.ed-pvlb { position: absolute; z-index: 5; font-weight: 700; padding: .45em .55em; line-height: 1.2; white-space: pre-wrap; max-width: 86%; font-family: Inter, system-ui, sans-serif; }
.ed-lb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ed-lb [data-k=text] { flex: 1 1 100%; width: 100%; min-width: 0; min-height: 38px; padding: 6px 8px; border-radius: 8px; }
.ed-lb label { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); }
.ed-lb input[type=number] { width: 4.8em; min-height: 36px; padding: 4px 6px; border-radius: 8px; }
.ed-lb select { min-height: 36px; padding: 4px 6px; border-radius: 8px; max-width: 100%; }
.ed-lb input[type=color] { width: 36px; height: 32px; padding: 0 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.ed-lb button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }

/* guardar o projeto (05/11): pergunta de restauro por cima da grelha, aviso de guardado e "Novo projeto" com confirmação na página */
.ed-restore { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 14px; border-color: var(--ed-acc); background: color-mix(in srgb, var(--fam-bg) 35%, var(--bg)); font-size: 15px; }
.ed-restore > span:first-child { flex: 1 1 18em; min-width: 0; }
.ed-restorebtns { display: flex; flex-wrap: wrap; gap: 8px; }
.ed-saverow { justify-content: space-between; border-top: 1px solid var(--line); padding-top: 8px; margin-bottom: 0; }
.ed-saverow #ed-saved { flex: 1 1 12em; min-width: 0; }
.ed-saverow #ed-saved.ed-err { color: var(--err); }
.ed-newq { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: 14px; }
