/* allee.pl — czat (port z otoauta.pl), kolory z tokenów allee */
/* ===== Czat między użytkownikami (styl OLX / Messenger) ===== */
.oa-chat-launch { position: fixed; right: 20px; bottom: 20px; z-index: 1150; width: 60px; height: 60px; border-radius: 50%;
  background: var(--orange-500); color: #fff; border: 0; cursor: pointer; box-shadow: 0 10px 26px rgba(245,99,30,.45); display: grid; place-items: center; font-size: 1.5rem; transition: transform .16s, box-shadow .16s; }
.oa-chat-launch:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 14px 32px rgba(245,99,30,.55); }
.oa-chat-launch .badge-n { position: absolute; top: -2px; right: -2px; background: #e23b3b; color: #fff; font-size: .7rem; font-weight: 800; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; border: 2px solid #fff; padding: 0 3px; }
.oa-chat-launch.hidden { display: none; }
.oa-chat { position: fixed; right: 20px; bottom: 20px; z-index: 1160; width: 760px; max-width: calc(100vw - 40px); height: 580px; max-height: calc(100vh - 40px);
  background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(8,22,52,.35); display: none; overflow: hidden; animation: chatPop .2s ease; }
@keyframes chatPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.oa-chat.open { display: grid; grid-template-columns: 280px 1fr; }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #fff; }
.chat-list__hd { padding: 15px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.chat-list__hd h4 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }
.chat-search { padding: 10px 12px; }
.chat-search input { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: .5rem .75rem; font-size: .85rem; outline: none; }
.chat-search input:focus { border-color: var(--navy-500); }
.chat-convs { flex: 1; overflow-y: auto; min-height: 0; }
.chat-conv { display: flex; gap: 11px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line-2); align-items: center; }
.chat-conv:hover { background: var(--navy-50); }
.chat-conv.active { background: var(--navy-50); box-shadow: inset 3px 0 0 var(--orange-500); }
.chat-av { width: 42px; height: 42px; border-radius: 50%; flex: none; position: relative; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .85rem; }
.chat-av__on { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--green-600); border: 2px solid #fff; }
.chat-conv__b { flex: 1; min-width: 0; }
.chat-conv__top { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.chat-conv__name { font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv__time { font-size: .7rem; color: var(--muted-2); flex: none; }
.chat-conv__row { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.chat-conv__last { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-conv__unread { background: var(--orange-500); color: #fff; font-size: .68rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; flex: none; padding: 0 4px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; background: #f5f8fd; }
.chat-main__hd { display: flex; align-items: center; gap: 11px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.chat-back { display: none; border: 0; background: transparent; font-size: 1.2rem; color: var(--ink-2); cursor: pointer; padding: 0; }
.chat-main__name { font-weight: 700; font-size: .92rem; line-height: 1.1; }
.chat-main__sub { font-size: .74rem; color: var(--green-600); font-weight: 600; }
.chat-main__close { margin-left: auto; border: 0; background: transparent; font-size: 1.15rem; color: var(--muted); cursor: pointer; }
.chat-main__close:hover { color: var(--ink); }
.chat-ctx { display: flex; align-items: center; gap: 11px; padding: 9px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.chat-ctx img { width: 48px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; }
.chat-ctx__t { flex: 1; min-width: 0; }
.chat-ctx__title { font-weight: 700; font-size: .81rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-ctx__price { font-family: var(--font-display); font-weight: 800; color: var(--navy-800); font-size: .88rem; }
.chat-ctx a { font-size: .77rem; font-weight: 700; color: var(--navy-700); white-space: nowrap; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 7px; min-height: 0; }
.chat-day { text-align: center; font-size: .71rem; color: var(--muted-2); font-weight: 600; margin: 6px 0; }
.chat-bub { max-width: 76%; padding: 9px 13px; border-radius: 16px; font-size: .87rem; line-height: 1.35; }
.chat-bub__time { font-size: .63rem; opacity: .6; margin-top: 3px; text-align: right; }
.chat-bub.in { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; color: var(--ink); }
.chat-bub.out { align-self: flex-end; background: var(--navy-700); color: #fff; border-bottom-right-radius: 5px; }
.chat-typing { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px; border-bottom-left-radius: 5px; padding: 11px 15px; display: inline-flex; gap: 4px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); animation: chatDot 1.2s infinite; }
.chat-typing span:nth-child(2){ animation-delay:.2s } .chat-typing span:nth-child(3){ animation-delay:.4s }
@keyframes chatDot { 0%,60%,100%{opacity:.3;transform:translateY(0)} 30%{opacity:1;transform:translateY(-3px)} }
.chat-quick { display: flex; gap: 7px; padding: 0 14px 8px; flex-wrap: wrap; }
.chat-quick button { border: 1px solid var(--navy-100); background: #fff; color: var(--navy-700); font-size: .78rem; font-weight: 600; border-radius: 999px; padding: .35rem .7rem; cursor: pointer; white-space: nowrap; }
.chat-quick button:hover { background: var(--navy-50); border-color: var(--navy-500); }
.chat-input { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); }
.chat-input button.ic { border: 0; background: transparent; color: var(--muted); font-size: 1.12rem; cursor: pointer; padding: 4px; }
.chat-input button.ic:hover { color: var(--navy-700); }
.chat-input input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: .58rem .9rem; font-size: .87rem; outline: none; min-width: 0; }
.chat-input input:focus { border-color: var(--navy-500); }
.chat-send { border: 0; background: var(--orange-500); color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; font-size: 1rem; flex: none; }
.chat-send:hover { background: var(--orange-600); }
@media (max-width: 600px){
  .oa-chat { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; }
  .oa-chat.open { grid-template-columns: 1fr; }
  .oa-chat.show-thread .chat-list { display: none; }
  .oa-chat:not(.show-thread) .chat-main { display: none; }
  .chat-back { display: block; }
  .oa-chat-launch { right: 16px; bottom: 84px; width: 54px; height: 54px; font-size: 1.35rem; }
}
