/* =========================================================
   Chat · Atelierul De Roti — bulele și lista de conversații.
   Culorile, butoanele și temele (inclusiv modul întunecat) vin
   din webmail.css; aici e doar ce ține de chat.
   ========================================================= */

.app { min-height: 100dvh; display: flex; flex-direction: column; }
.bar--chat { flex-wrap: nowrap; }
.chat-ecran {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
  width: 100%; max-width: 760px; margin: 0 auto;
}

/* ---------- lista de conversații ---------- */
.conv-lista { flex: 1; overflow-y: auto; padding: .5rem .6rem 1rem; }
.conv-rand {
  display: flex; align-items: center; gap: .75rem; width: 100%;
  background: var(--card); border: 1px solid var(--line); cursor: pointer;
  border-radius: var(--radius-sm); padding: .65rem .8rem; margin-bottom: .45rem;
  text-align: left; font-family: var(--ff-body); color: var(--text);
  transition: border-color .15s ease;
}
.conv-rand:hover { border-color: var(--red); }
.conv-avatar {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--ff-head); font-weight: 700; font-size: 1.1rem;
}
.conv-avatar--canal { background: var(--ink); color: var(--bg); }
.conv-mijloc { flex: 1; min-width: 0; }
.conv-mijloc b {
  display: block; font-family: var(--ff-head); font-weight: 600; font-size: .95rem;
  color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conv-mijloc small {
  display: block; color: var(--muted); font-size: .84rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conv-dreapta { flex: 0 0 auto; text-align: right; }
.conv-dreapta time { display: block; color: var(--muted); font-size: .76rem; }
.conv-badge {
  display: inline-block; margin-top: .25rem; background: var(--red); color: #fff;
  border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1.5;
  padding: .05em .55em; font-family: var(--ff-head);
}

/* ---------- conversația deschisă ---------- */
.conv-cap {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .8rem; background: var(--card); border-bottom: 1px solid var(--line);
}
.conv-inapoi {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; width: 38px; height: 38px; cursor: pointer;
  font-size: 1.1rem; line-height: 1; flex: 0 0 auto;
}
.conv-inapoi:hover { border-color: var(--red); color: var(--red); }
.conv-cap .conv-avatar { width: 38px; height: 38px; font-size: .95rem; }
.conv-cine { min-width: 0; }
.conv-cine b {
  display: block; font-family: var(--ff-head); font-weight: 700; color: var(--ink);
  font-size: .98rem; line-height: 1.2;
}
.conv-cine small { color: var(--muted); font-size: .78rem; }

.mesaje-zona {
  flex: 1; overflow-y: auto; padding: .9rem .8rem;
  display: flex; flex-direction: column; gap: .35rem;
  background: var(--bg-alt);
}
.zi-sep {
  align-self: center; background: var(--card); border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px; font-size: .72rem; font-weight: 600;
  font-family: var(--ff-head); padding: .15em .8em; margin: .5rem 0;
}
.bula {
  max-width: 82%; border-radius: 16px; padding: .5rem .8rem .35rem;
  font-size: .95rem; line-height: 1.45; overflow-wrap: break-word;
  align-self: flex-start; background: var(--card); border: 1px solid var(--line);
  color: var(--text);
}
.bula--eu {
  align-self: flex-end; background: var(--red); border-color: var(--red); color: #fff;
}
.bula__cine {
  display: block; font-family: var(--ff-head); font-weight: 700; font-size: .78rem;
  margin-bottom: .1rem;
}
.bula__text { white-space: pre-wrap; }
.bula__original {
  display: block; margin-top: .3rem; padding-top: .3rem;
  border-top: 1px dashed rgba(128, 128, 128, .35);
  font-size: .8rem; opacity: .75; white-space: pre-wrap;
}
.bula--eu .bula__original { border-top-color: rgba(255, 255, 255, .4); }
.bula time {
  display: block; text-align: right; font-size: .68rem; opacity: .65; margin-top: .15rem;
}
.bula img {
  display: block; max-width: 100%; max-height: 320px; border-radius: 10px;
  margin: .15rem 0; cursor: pointer;
}

/* ---------- compunerea ---------- */
.compunere {
  display: flex; align-items: flex-end; gap: .5rem;
  padding: .55rem .7rem; background: var(--card); border-top: 1px solid var(--line);
}
.poza-btn {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--card); cursor: pointer;
  font-size: 1.15rem;
}
.poza-btn:hover { border-color: var(--red); }
/* webmail.css dă textarea-urilor 9rem înălțime minimă — aici e un rând */
.compunere textarea.compunere__text {
  flex: 1; min-height: 42px; height: 42px; max-height: 130px; resize: none;
  border-radius: 21px; padding: .5em 1em; line-height: 1.4; font-size: .95rem;
}
.compunere__trimite {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  padding: 0; font-size: 1.05rem;
}

.gol { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }

/* iconițele SVG din chat: roata canalului pe pastila închisă + butoanele */
.conv-avatar .icoinline { width: 1.35em; height: 1.35em; vertical-align: middle; }
.conv-avatar--canal .ico .s { stroke: var(--card); }
.poza-btn .icoinline { width: 22px; height: 22px; vertical-align: middle; }
/* iconița stă singură în butonul rotund — fără marginea de „aer" din
   webmail.css, altfel săgeata iese din centru */
.compunere .compunere__trimite .icoinline {
  width: 20px; height: 20px; vertical-align: middle; margin: 0;
}

@media (min-width: 761px) {
  /* pe PC lista și conversația stau în aceeași coloană centrată; nimic special */
  .conv-lista { padding-top: 1rem; }
}
