/* =========================================================
   mural.css — a tela "Mural".
   Feed de rede social limpo: uma coluna central, publicações separadas
   por linhas finas, avatares redondos, tipografia a fazer o trabalho.
   Usa as variáveis do tema (--branco, --tinta, --acento...), por isso
   segue a cor escolhida e o modo noturno sem regras extra.
   ========================================================= */

.mural-topo {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  max-width: 640px; margin: 0 auto 24px;
}
.mural-topo h1 { font-size: clamp(2rem, 3.4vw, 2.6rem); }

/* "Aberto · fecha em 7:28" / "Fechado" */
.mural-estado {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--branco);
  box-shadow: 0 0 0 1.5px var(--linha);
  color: var(--tinta-suave);
  font-size: .9rem; font-weight: 600;
  white-space: nowrap;
}
.mural-estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--linha); }
.mural-estado--aberto { color: var(--tinta); }
.mural-estado--aberto::before { background: #3fb46a; box-shadow: 0 0 0 3px rgb(63 180 106 / .2); }
.mural-estado strong { font-variant-numeric: tabular-nums; }

/* Uma só coluna, com cartão único: compositor no topo, feed por baixo. */
.mural-coluna {
  max-width: 640px; margin: 0 auto;
  background: var(--branco);
  border-radius: var(--raio-g);
  box-shadow: 0 0 0 1.5px var(--linha), 0 18px 40px -24px rgb(0 0 0 / .25);
  overflow: hidden;
}

/* ---------- Avatar (mascote num círculo) ---------- */
.post-avatar {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--acento-suave);
  overflow: hidden;
  display: grid; place-items: center;
}
.post-avatar svg { width: 100%; height: 100%; display: block; margin-top: 5px; }

/* ---------- Compositor ---------- */
.mural-postar {
  display: flex; gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1.5px solid var(--linha);
}
.postar-corpo { flex: 1; min-width: 0; display: grid; gap: 12px; }
.mural-postar textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 0 4px;
  border: 0;
  resize: none;
  overflow: hidden;
  background: transparent;
  color: var(--tinta);
  font-size: 1.1rem; line-height: 1.45;
}
.mural-postar textarea::placeholder { color: var(--tinta-suave); }
.mural-postar textarea:focus { outline: none; }
.mural-postar:focus-within { background: color-mix(in srgb, var(--acento-suave) 35%, var(--branco)); }

.postar-resumo { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--tinta-suave); cursor: pointer; }
.postar-resumo input { width: 16px; height: 16px; accent-color: var(--acento-tinta); }
.postar-resumo-texto { font-variant-numeric: tabular-nums; }

.postar-rodape { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.postar-rodape .link-cara { margin-right: auto; }
.postar-conta { font-size: .82rem; color: var(--tinta-suave); font-variant-numeric: tabular-nums; }
.postar-rodape .botao { min-height: 40px; padding: 6px 20px; font-size: .95rem; }

/* ---------- Publicações ---------- */
.posts { list-style: none; margin: 0; padding: 0; }
.post {
  display: flex; gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--linha);
}
.post:last-child { border-bottom: 0; }
.post-corpo { flex: 1; min-width: 0; display: grid; gap: 6px; }
.post-topo { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.post-nome { font-weight: 800; }
.post-quando { color: var(--tinta-suave); font-size: .92rem; white-space: nowrap; }
.post-apagar {
  margin-left: auto;
  border: 0; background: none; padding: 2px 4px;
  color: var(--tinta-suave); font-size: .85rem; cursor: pointer;
  opacity: 0; transition: opacity var(--rapido);
}
.post:hover .post-apagar, .post-apagar:focus-visible { opacity: 1; }
.post-apagar:hover { color: var(--tinta); text-decoration: underline; }
.post-texto { margin: 0; font-size: 1.04rem; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-line; }

.post-resumo { margin: 0; color: var(--tinta-suave); font-size: .88rem; font-variant-numeric: tabular-nums; }

.mural-mais { display: block; width: 100%; border-radius: 0; border-top: 1px solid var(--linha); }
.mural-vazio { margin: 0; padding: 36px 24px; text-align: center; color: var(--tinta-suave); }

/* ---------- Mural fechado ---------- */
.mural-fechado {
  display: grid; justify-items: center; gap: 10px;
  padding: 40px 28px 36px;
  text-align: center;
}
.mural-fechado-icone {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--acento-suave);
  color: var(--acento-tinta);
}
.mural-fechado-icone svg { width: 26px; height: 26px; }
.mural-fechado h2 { font-size: 1.35rem; margin-top: 4px; }
.mural-fechado > p { margin: 0; max-width: 42ch; }

.aberturas {
  list-style: none; margin: 14px 0 8px; padding: 0;
  display: grid; gap: 8px;
  width: min(100%, 380px);
  text-align: left;
}
.abertura {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: var(--raio-p);
  box-shadow: 0 0 0 1.5px var(--linha);
}
.abertura-icone {
  flex: none; width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--papel);
  color: var(--tinta-suave);
}
.abertura-icone svg { width: 16px; height: 16px; }
.abertura-texto { display: grid; font-size: .92rem; }
.abertura-texto span { color: var(--tinta-suave); }
.abertura--liberada { box-shadow: 0 0 0 1.5px var(--acento-tinta); }
.abertura--liberada .abertura-icone { background: var(--acento-tinta); color: var(--branco); }
.abertura--usada { opacity: .55; }
.mural-nota { margin: 4px 0 0; font-size: .92rem; }

/* ---------- Avatar do compositor = botão para escolher a cara ---------- */
.post-avatar--botao { border: 0; padding: 0; cursor: pointer; transition: transform var(--rapido) var(--mola); }
.post-avatar--botao:hover { transform: scale(1.06); box-shadow: 0 0 0 2px var(--acento-tinta); }
.link-cara {
  border: 0; background: none; padding: 4px 0; cursor: pointer;
  color: var(--acento-tinta); font-weight: 700; font-size: .88rem;
}
.link-cara:hover { text-decoration: underline; }

/* ---------- Seletor de olhos + boca ---------- */
.cara-seletor { display: grid; gap: 10px; padding: 12px; border-radius: var(--raio-p); background: var(--papel); }
.cara-grupo { display: grid; gap: 6px; }
.cara-rotulo { font-size: .8rem; font-weight: 700; color: var(--tinta-suave); text-transform: uppercase; letter-spacing: .06em; }
.cara-pecas { display: flex; flex-wrap: wrap; gap: 6px; }
.cara-peca {
  width: 46px; height: 46px; padding: 3px;
  border: 1.5px solid var(--linha); border-radius: 12px;
  background: var(--branco); cursor: pointer; overflow: hidden;
}
.cara-peca:hover { border-color: var(--tinta-suave); }
.cara-peca[aria-pressed="true"] { border-color: var(--acento-tinta); box-shadow: 0 0 0 3px var(--acento-suave); }
.cara-peca svg { width: 100%; height: 100%; }
/* nos botões, aproxima a zona dos olhos / da boca */
.cara-zoom-olhos { transform: scale(1.6); transform-origin: 50% 55%; }
.cara-zoom-boca { transform: scale(1.6); transform-origin: 50% 72%; }

/* ---------- Reações e respostas ---------- */
.post-reacoes { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 4px; }
.reacao {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--acento-suave); overflow: hidden; display: grid; place-items: center;
}
.reacao svg { width: 100%; height: 100%; margin-top: 4px; }
.reacao--pequena { width: 26px; height: 26px; }
.reagir {
  margin-left: 4px; min-height: 30px; padding: 2px 12px;
  border: 1.5px dashed var(--linha); border-radius: 999px;
  background: transparent; color: var(--tinta-suave);
  font-size: .85rem; font-weight: 700; cursor: pointer;
}
.reagir:hover, .reagir[aria-expanded="true"] { border-style: solid; border-color: var(--acento-tinta); color: var(--tinta); }

.respostas { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.resposta { display: flex; gap: 8px; align-items: flex-start; }
.resposta p { margin: 2px 0 0; font-size: .95rem; line-height: 1.4; overflow-wrap: anywhere; }

.reagir-painel { display: grid; gap: 10px; margin-top: 8px; padding: 12px; border-radius: var(--raio-m); box-shadow: 0 0 0 1.5px var(--linha); }
.reagir-topo { display: flex; gap: 10px; align-items: center; }
.reagir-preview { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--acento-suave); overflow: hidden; display: grid; place-items: center; }
.reagir-preview svg { width: 100%; height: 100%; margin-top: 6px; }
.reagir-texto {
  flex: 1; min-width: 0; min-height: 42px; padding: 8px 12px;
  border: 1.5px solid var(--linha); border-radius: 999px;
  background: var(--branco);
}
.reagir-texto:focus { outline: none; border-color: var(--acento-tinta); box-shadow: 0 0 0 3px var(--acento-suave); }
.reagir-acoes { display: flex; justify-content: flex-end; gap: 8px; }
.reagir-acoes .botao { min-height: 38px; padding: 6px 16px; font-size: .92rem; }

/* Telas estreitas */
@media (max-width: 620px) {
  .mural-topo { align-items: flex-start; flex-direction: column; gap: 10px; }
  .mural-postar, .post { padding-left: 16px; padding-right: 16px; gap: 12px; }
  .post-avatar { width: 38px; height: 38px; }
  .post-apagar { opacity: 1; } /* sem rato não há "hover" */
}
