.poker-private-chat{width:min(560px,calc(100vw - 32px));max-height:88dvh;padding:24px;box-sizing:border-box}
.poker-private-chat h2{margin:0 0 10px;font-size:23px}.poker-private-chat .private-chat-note{font-size:13px;line-height:1.6;color:#c4d3c4;margin:0 0 15px}.poker-private-chat .private-chat-close{float:right;padding:0;width:32px;height:32px;border:1px solid #687b61;border-radius:6px;background:transparent;color:#e7e2cf;font-size:24px;line-height:1}.poker-private-chat>label,.private-chat-compose label{font-size:12px;color:#cfdbc9;margin:10px 0 5px;display:block}
.poker-private-chat select,.poker-private-chat textarea{display:block;width:100%;box-sizing:border-box;border:1px solid #78906c;border-radius:6px;background:#10251b;color:#f0eddf;padding:10px;font:14px/1.5 'Segoe UI',system-ui,sans-serif}.poker-private-chat textarea{resize:vertical;min-height:80px;max-height:160px;margin:0 0 10px}.poker-private-chat textarea::placeholder{color:#a7bbab}.poker-private-chat :is(select,textarea,button):focus-visible{outline:2px solid #edd097;outline-offset:3px}
.private-chat-log{height:240px;overflow:auto;overscroll-behavior:contain;background:#0d2017;border:1px solid #415a43;border-radius:8px;padding:12px;margin-top:14px;scrollbar-width:thin;scrollbar-color:#6c865f transparent}.private-chat-empty{color:#b4c5b3;text-align:center;font-size:13px;padding:18px 12px}.private-chat-message{background:#263c2e;border-radius:8px;padding:9px 12px;margin:0 30px 10px 0;color:#f1efdf;overflow-wrap:anywhere}.private-chat-message.mine{background:#344434;margin:0 0 10px 30px}.private-chat-meta{display:flex;justify-content:space-between;gap:12px;font-size:11px;color:#dfc58e}.private-chat-meta time{font-size:10px;color:#bdcebc;white-space:nowrap}.private-chat-message p{white-space:pre-wrap;margin:5px 0 0;font-size:14px;line-height:1.6}.private-chat-compose>button{padding:10px 18px}.private-chat-compose>button:disabled{background:#596655;color:#c2c9bc;cursor:not-allowed}.private-chat-status{font-size:12px;line-height:1.5;color:#d4d2b9;min-height:18px;margin-bottom:0}
#view-table #btnChat .private-chat-badge{border-radius:12px;background:#e1bf7b;color:#173223;padding:3px 6px;font:700 10px/1 'Segoe UI',sans-serif}#view-table #btnChat .private-chat-badge[hidden]{display:none}
@media(max-width:480px){.poker-private-chat{padding:18px}.private-chat-log{height:190px}.private-chat-message{margin-right:15px}.private-chat-message.mine{margin-left:15px}}

/* Non-modal, movable chat stays inside this player's table window. */
dialog.poker-private-chat {position:fixed;inset:auto;margin:0!important;z-index:100100;max-height:calc(100dvh - 16px);overflow:auto;box-shadow:0 12px 48px #000a;}
.poker-private-chat #privateChatHeading {cursor:grab;touch-action:none;user-select:none;padding:6px 42px 10px 0;border-bottom:1px solid #6f805f;}
.poker-private-chat #privateChatHeading:active {cursor:grabbing;}
#view-table #btnChat.has-unread {background:#4e421a!important;border-color:#f4cf70!important;color:#fff1bd!important;box-shadow:0 0 0 2px #f4cf7044,0 0 18px #efc44f77;animation:private-message-glow 1.6s ease-in-out 4;}
#view-table #btnChat.has-unread .private-chat-badge {background:#f4cf70;color:#17251b;font-size:14px;min-width:22px;text-align:center;border:1px solid #ffefba;}
@keyframes private-message-glow {50%{box-shadow:0 0 0 3px #f4cf7077,0 0 26px #efc44faa}}
@media(prefers-reduced-motion:reduce){#view-table #btnChat.has-unread{animation:none}}

/* Named conversations keep unread senders one click away. */
.poker-private-chat .private-chat-conversations{display:flex;flex-wrap:wrap;gap:6px;max-height:104px;overflow:auto;margin:0 0 10px;flex:none}
.poker-private-chat .private-chat-conversations[hidden]{display:none}
.poker-private-chat .private-chat-peer{display:flex;align-items:center;gap:7px;padding:7px 10px;background:#18332f;border:1px solid #506d63;border-radius:7px;color:#edf3e8;font:600 12px system-ui;cursor:pointer;max-width:100%}
.poker-private-chat .private-chat-peer span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.poker-private-chat .private-chat-peer[aria-pressed=true]{border-color:#e7c47a;background:#344039;box-shadow:inset 0 -2px #dabc70}
.private-chat-count{min-width:19px;border-radius:12px;background:#f0cb75;color:#17251b;padding:2px 5px;text-align:center;font-size:11px}
.private-chat-new{margin:0 0 8px;color:#e0cfaa;font:12px system-ui}.private-chat-new summary{cursor:pointer;padding:5px 0}.private-chat-new label{display:block;margin:4px 0}
.poker-private-chat #privateChatHeading{font-size:19px;overflow-wrap:anywhere}
@media(max-width:600px),(max-height:650px){
 .poker-private-chat{padding:12px!important}.poker-private-chat .private-chat-note{font-size:11px;margin-bottom:8px}.poker-private-chat .private-chat-log{height:clamp(70px,23dvh,180px);margin-top:6px;padding:8px}.poker-private-chat textarea{min-height:48px;height:56px;padding:6px;margin-bottom:6px}.poker-private-chat #privateChatHeading{font-size:17px;padding-top:2px;margin-bottom:7px}.poker-private-chat .private-chat-status{font-size:10px;line-height:1.3;margin-top:6px}.poker-private-chat .private-chat-conversations{max-height:75px;margin-bottom:5px}.private-chat-compose>button{padding:7px 12px}
}
