/* Simulatorul chatului de pe psymep.ro.
   Fereastra imita widget-ul „Maia Chat" — colt dreapta-jos, antet cu avatar,
   bule pe doua culori — ca sa recunosti pe loc ce vede vizitatorul. */

.wc-wrap {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.4rem;
  align-items: start;
}

.wc-widget {
  display: flex;
  flex-direction: column;
  height: 560px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--rule);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.wc-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem .9rem;
  background: var(--accent, #12a594);
  color: #fff;
}
.wc-head b { display: block; font-size: .92rem; line-height: 1.2; }
.wc-sub { font-size: .74rem; opacity: .85; }

.wc-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  display: grid; place-items: center;
  font-weight: 600; font-size: .9rem;
}

.wc-log {
  flex: 1;
  overflow-y: auto;
  padding: .9rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  /* min-height: 0 — altfel flex-ul refuza sa micsoreze zona si bara de derulare
     nu apare deloc, la fel ca la coloanele de kanban. */
  min-height: 0;
}

.wc-msg { display: flex; flex-direction: column; max-width: 82%; }
.wc-msg.from-agent { align-self: flex-start; align-items: flex-start; }
.wc-msg.from-visitor { align-self: flex-end; align-items: flex-end; }

.wc-bubble {
  padding: .5rem .7rem;
  border-radius: 12px;
  font-size: .84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.from-agent .wc-bubble { background: var(--bg-soft, rgba(127, 127, 127, .14)); border-bottom-left-radius: 4px; }
.from-visitor .wc-bubble { background: var(--accent, #12a594); color: #fff; border-bottom-right-radius: 4px; }

.wc-time { font-size: .64rem; opacity: .55; margin-top: .15rem; }

.wc-typing {
  padding: .1rem .95rem .5rem;
  font-size: .74rem;
  opacity: .65;
  font-style: italic;
}

.wc-composer {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  padding: .6rem .7rem;
  border-top: 1px solid var(--rule);
}
.wc-input {
  flex: 1;
  resize: none;
  border-radius: 18px;
  padding: .5rem .8rem;
  font-size: .84rem;
  min-height: 36px;
}
.wc-send {
  width: 36px; height: 36px;
  flex: 0 0 36px;
  border: 0;
  border-radius: 50%;
  background: var(--accent, #12a594);
  color: #fff;
  cursor: pointer;
  font-size: .95rem;
}
.wc-send:disabled { opacity: .45; cursor: default; }

.wc-caption { text-align: center; margin-top: .5rem; }

@media (max-width: 1100px) {
  .wc-wrap { grid-template-columns: 1fr; }
  .wc-widget { max-width: 380px; }
}
