/* Visitor chat card — shared by the home page Contact section and /build */
.talk__card [hidden] { display: none !important; }
.talk__card {
  position: relative;
  padding: 26px;
  background: #fffdf8;
  border: 2.5px solid var(--ink);
  border-radius: 22px 26px 20px 28px;
  box-shadow: 8px 10px 0 var(--coral);
}
.talk__start { display: flex; flex-direction: column; gap: 16px; }
.talk__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.talk__attach { display: flex; align-items: center; gap: 8px; font-family: var(--hand); font-weight: 700; font-size: 18px; cursor: pointer; }
.talk__attach input { width: 18px; height: 18px; accent-color: #d9525a; }
.talk__send { align-self: flex-start; cursor: pointer; }
.talk__status { margin: 0; min-height: 1.3em; font-family: var(--hand); font-weight: 700; font-size: 17px; color: var(--ink-dim); }
.talk__status.is-error { color: #c23b3b; }
.talk__offline { margin: 0; font-size: 16px; line-height: 1.6; }

.talk__thread { display: flex; flex-direction: column; gap: 12px; }
.talk__head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 2px dashed var(--ink-dim); }
.talk__head b { display: block; font-size: 16px; }
.talk__head small { font-family: var(--hand); font-weight: 700; font-size: 15px; color: var(--ink-dim); }
.talk__avatar { display: grid; place-items: center; width: 40px; height: 40px; font-family: var(--brush); color: var(--ink); background: var(--coral); border: 2px solid var(--ink); border-radius: 50%; }
.talk__new { margin-left: auto; font-family: var(--hand); font-weight: 700; font-size: 16px; padding: 3px 12px; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 99px; cursor: pointer; }
.talk__msgs { display: flex; flex-direction: column; gap: 10px; height: 340px; overflow-y: auto; padding: 4px 4px 4px 0; scroll-behavior: smooth; }
.talk__msg { max-width: 82%; display: flex; flex-direction: column; gap: 3px; animation: msgIn 0.3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.talk__msg p { margin: 0; padding: 10px 14px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; border: 2px solid var(--ink); border-radius: 16px; }
.talk__msg span { font-size: 11.5px; color: var(--ink-dim); padding: 0 6px; }
.talk__msg--out { align-self: flex-end; align-items: flex-end; }
.talk__msg--out p { background: var(--coral); border-bottom-right-radius: 4px; }
.talk__msg--in { align-self: flex-start; }
.talk__msg--in p { background: var(--paper); border-bottom-left-radius: 4px; box-shadow: 2px 2px 0 var(--ink); }
.talk__compose { display: flex; gap: 10px; align-items: flex-end; }
.talk__compose textarea {
  flex: 1; resize: none; min-height: 46px; max-height: 140px;
  font: inherit; font-size: 15px; padding: 11px 14px; color: var(--ink);
  background: var(--paper); border: 2.5px solid var(--ink); border-radius: 14px;
}
.talk__compose textarea:focus { outline: none; box-shadow: 3px 3px 0 var(--coral); }
.talk__go { flex: none; width: 46px; height: 46px; font-size: 17px; color: var(--ink); background: var(--coral); border: 2.5px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--ink); cursor: pointer; }
.talk__go:active { transform: translate(2px, 2px); box-shadow: none; }

@media (max-width: 760px) {
  .talk__row { grid-template-columns: 1fr; }
  .talk__card { padding: 18px; }
  .talk__msgs { height: 300px; }
}
