/* ═══════════════════════════════════════════════════════════
   PUBLISHER.CSS — tela "Publicar anúncio" (Módulo principal,
   preservado integralmente do v19): título, fotos, descrição,
   preço/estoque, resultado da publicação.
   ═══════════════════════════════════════════════════════════ */

/* ── IDENTIFICAÇÃO AUTOMÁTICA ── */
.ai-in { border-color: var(--green) !important; background: #091408 !important; }
.aitag { display: none; align-items: center; gap: 3px; font-size: 10px; color: var(--green); margin-top: 3px; }
.aitag.on { display: flex; }
.warn-tag { display: none; align-items: center; gap: 3px; font-size: 10px; color: var(--amber); margin-top: 3px; }
.warn-tag.on { display: flex; }
.nwrap { position: relative; }
.nwrap input { padding-right: 120px; }
.nscan {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  display: none; align-items: center; gap: 5px; font-size: 11px; color: var(--green);
  pointer-events: none; background: var(--s2); padding: 2px 8px; border-radius: 4px;
}
.nscan.on { display: flex; }

/* ── PRÉVIA DO TÍTULO ── */
.titulo-box {
  background: var(--s3); border: 1px solid var(--bd); border-radius: 7px;
  padding: 11px 13px; font-size: 13px; font-weight: 500; color: var(--tx);
  min-height: 40px; word-break: break-word; line-height: 1.4;
}
.titulo-box.empty { color: #333; font-weight: 400; }
.titulo-bar { height: 2px; background: var(--bd); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.titulo-fill { height: 100%; border-radius: 2px; transition: width .25s, background .25s; }
.titulo-meta { display: flex; justify-content: space-between; font-size: 10px; color: #3a3a3a; margin-top: 3px; }

/* ── CÓDIGO DA PEÇA (prefixo) ── */
.pwrap { display: flex; }
.ppfx {
  background: var(--s3); border: 1px solid var(--bd); border-right: none;
  border-radius: 7px 0 0 7px; padding: 9px 11px; font-size: 13px; color: var(--mu); white-space: nowrap;
}
.pwrap input { border-radius: 0 7px 7px 0; }

/* ── TOGGLE FRETE FLEX ── */
.flex-row {
  display: flex; align-items: center; justify-content: space-between; padding: 11px 13px;
  background: var(--s2); border: 1px solid var(--bd); border-radius: 7px; cursor: pointer;
  transition: border-color .2s, background .2s; user-select: none;
}
.flex-row:hover { border-color: #3a3a3a; }
.flex-row.on { border-color: var(--green); background: #091408; }
.flex-left { display: flex; align-items: center; gap: 10px; }
.flex-ico { width: 28px; height: 28px; border-radius: 6px; background: #1a2a1a; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.flex-info { font-size: 12px; font-weight: 500; color: var(--tx); }
.flex-row.on .flex-info { color: var(--green); }
.flex-sub { font-size: 10px; color: var(--mu); margin-top: 1px; }
.tswitch { width: 34px; height: 18px; background: var(--bd); border-radius: 9px; position: relative; flex-shrink: 0; transition: background .2s; }
.flex-row.on .tswitch { background: var(--green); }
.tswitch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .2s; }
.flex-row.on .tswitch::after { left: 19px; }

/* ── FOTOS ── */
.parea { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.pslot {
  width: 96px; height: 96px; border-radius: 8px; border: 1.5px dashed var(--bd);
  background: var(--s2); display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; position: relative; overflow: hidden; flex-shrink: 0; transition: border-color .2s;
}
.pslot:hover { border-color: var(--or); }
.pslot img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; border-radius: 7px; }
.pslot .slbl { font-size: 10px; color: var(--mu); margin-top: 5px; z-index: 1; }
.pslot .sico { z-index: 1; }
.pslot .xbtn {
  position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; background: rgba(0,0,0,.8);
  border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2; border: none; cursor: pointer;
}
.pslot .ulov { position: absolute; inset: 0; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; z-index: 3; border-radius: 7px; }
.pinfo { font-size: 10px; color: #3a3a3a; margin-top: 3px; }

/* ── DESCRIÇÃO ── */
.desc-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.desc-lbl { font-size: 10px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--mu); }
.btn-edit {
  background: none; border: 1px solid var(--bd); border-radius: 5px; color: var(--mu);
  font-family: 'Inter', sans-serif; font-size: 11px; padding: 3px 9px; cursor: pointer;
  display: flex; align-items: center; gap: 4px; transition: all .2s;
}
.btn-edit:hover { color: var(--or); border-color: var(--or); }
.dprev {
  background: var(--s3); border: 1px solid var(--bd); border-radius: 7px; padding: 13px;
  font-size: 13px; line-height: 1.9; color: var(--tx); min-height: 110px; white-space: pre-wrap; word-break: break-word;
}
.darea { display: none; }
.darea textarea {
  width: 100%; background: var(--s2); border: 1px solid var(--or); border-radius: 7px;
  color: var(--tx); font-family: 'Inter', sans-serif; font-size: 13px; padding: 13px;
  outline: none; resize: vertical; min-height: 110px; line-height: 1.9;
}

/* ── BOTÃO PUBLICAR ── */
.bpub {
  width: 100%; background: var(--or); color: #fff; border: none; border-radius: 8px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 17px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; padding: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .2s, transform .1s; margin-top: 4px;
}
.bpub:hover { background: var(--or2); }
.bpub:active { transform: scale(.99); }
.bpub:disabled { background: #1e1e1e; color: #3a3a3a; cursor: not-allowed; transform: none; }

/* ── RESULTADO DA PUBLICAÇÃO ── */
.rbox { background: var(--s2); border: 1px solid var(--bd); border-radius: var(--rad); overflow: hidden; margin-top: 12px; animation: fup .3s ease; }
@keyframes fup { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rhd { background: var(--s1); border-bottom: 1px solid var(--bd); padding: 9px 15px; }
.rlbl { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.rlbl.ok { color: var(--green); } .rlbl.err { color: var(--red); } .rlbl.info { color: var(--blue); }
.rbdy { padding: 15px; font-size: 13px; line-height: 1.75; color: #ccc; }
.rlink { color: var(--or); text-decoration: none; font-weight: 500; }
.rlink:hover { text-decoration: underline; }
.steps { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.st { font-size: 11px; color: var(--mu); padding: 3px 8px; background: var(--s3); border-radius: 20px; }
.st.act { color: var(--or); } .st.done { color: var(--green); }
