/* GeoHub Facebook-style floating chat popup */
.gh-chat-pop-root{position:fixed;right:18px;bottom:18px;z-index:99990;font-family:inherit;color:var(--text-primary,#f8fafc)}
.gh-chat-pop-btn{display:none;align-items:center;gap:8px;border:1px solid rgba(16,185,129,.55);background:linear-gradient(135deg,#063b2a,#10b981);color:#fff;border-radius:999px;padding:11px 16px;box-shadow:0 14px 38px rgba(0,0,0,.38);cursor:pointer;font-weight:900}
.gh-chat-pop-btn.show{display:flex}.gh-chat-pop-btn .dot{width:9px;height:9px;border-radius:50%;background:#10b981;box-shadow:0 0 0 6px rgba(16,185,129,.15)}
.gh-chat-pop{width:min(360px,calc(100vw - 24px));height:min(520px,calc(100vh - 92px));display:none;flex-direction:column;background:rgba(15,23,42,.96);border:1px solid rgba(148,163,184,.22);border-radius:18px;box-shadow:0 22px 70px rgba(0,0,0,.55);overflow:hidden;backdrop-filter:blur(14px)}
.gh-chat-pop.open{display:flex}.gh-chat-head{display:flex;align-items:center;gap:10px;padding:12px 12px;border-bottom:1px solid rgba(148,163,184,.16);background:linear-gradient(135deg,rgba(16,185,129,.16),rgba(59,130,246,.08))}.gh-chat-avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,#10b981,#3b82f6);display:grid;place-items:center;font-weight:900;color:#fff;flex:0 0 auto;overflow:hidden}.gh-chat-avatar img{width:100%;height:100%;object-fit:cover}.gh-chat-title{min-width:0;flex:1}.gh-chat-name{font-weight:900;font-size:.95rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gh-chat-status{font-size:.72rem;color:#9ca3af}.gh-chat-actions{display:flex;gap:6px}.gh-chat-icon{width:32px;height:32px;border:0;border-radius:10px;background:rgba(255,255,255,.08);color:#e5e7eb;cursor:pointer}.gh-chat-icon:hover{background:rgba(255,255,255,.14)}
.gh-chat-body{flex:1;overflow:auto;padding:14px 12px;display:flex;flex-direction:column;gap:8px}.gh-chat-empty{margin:auto;text-align:center;color:#94a3b8;font-size:.88rem}.gh-chat-row{display:flex}.gh-chat-row.mine{justify-content:flex-end}.gh-chat-msg-wrap{max-width:78%;position:relative}.gh-chat-bubble{padding:9px 11px;border-radius:16px;line-height:1.35;font-size:.9rem;word-break:break-word}.gh-chat-row.mine .gh-chat-bubble{background:linear-gradient(135deg,#10b981,#059669);color:#fff;border-bottom-right-radius:5px}.gh-chat-row.theirs .gh-chat-bubble{background:rgba(255,255,255,.09);color:#f3f4f6;border-bottom-left-radius:5px}.gh-chat-heart{position:absolute;right:-10px;bottom:-9px;background:#111827;border:1px solid rgba(255,255,255,.14);border-radius:999px;font-size:.78rem;padding:1px 5px}.gh-chat-like{position:absolute;right:-12px;top:50%;transform:translateY(-50%);width:23px;height:23px;border-radius:50%;border:1px solid rgba(255,255,255,.15);background:#111827;color:#fff;display:none;cursor:pointer;font-size:.82rem}.gh-chat-msg-wrap:hover .gh-chat-like{display:block}.gh-chat-like.active{display:block;background:#dc2626}.gh-chat-compose{position:relative;display:flex;align-items:center;gap:8px;padding:10px;border-top:1px solid rgba(148,163,184,.16);background:rgba(2,6,23,.45)}.gh-chat-input{flex:1;min-width:0;border:1px solid rgba(148,163,184,.2);background:rgba(255,255,255,.08);color:#fff;border-radius:999px;padding:10px 12px;outline:none}.gh-chat-input:focus{border-color:rgba(16,185,129,.7)}.gh-chat-send{width:38px;height:38px;border:0;border-radius:50%;background:#10b981;color:#fff;cursor:pointer;font-weight:900}.gh-chat-emoji-panel{position:absolute;left:8px;right:8px;bottom:58px;display:none;flex-wrap:wrap;gap:6px;padding:10px;background:#0f172a;border:1px solid rgba(148,163,184,.22);border-radius:14px;box-shadow:0 16px 45px rgba(0,0,0,.4)}.gh-chat-emoji-panel.open{display:flex}.gh-chat-emoji{border:0;background:rgba(255,255,255,.08);border-radius:9px;padding:6px;cursor:pointer;font-size:1rem}.gh-chat-emoji:hover{background:rgba(255,255,255,.16)}
.gh-chat-toast{position:fixed;right:18px;bottom:92px;z-index:99991;display:none;gap:10px;align-items:center;width:min(330px,calc(100vw - 24px));background:#111827;color:#fff;border:1px solid rgba(16,185,129,.35);border-radius:16px;padding:12px;box-shadow:0 18px 50px rgba(0,0,0,.45);cursor:pointer}.gh-chat-toast.show{display:flex}.gh-chat-toast .t-avatar{width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,#10b981,#3b82f6);display:grid;place-items:center;font-weight:900}.gh-chat-toast .t-text{min-width:0}.gh-chat-toast .t-name{font-weight:900;font-size:.88rem}.gh-chat-toast .t-msg{font-size:.78rem;color:#cbd5e1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:640px){.gh-chat-pop-root{right:10px;bottom:10px}.gh-chat-pop{width:calc(100vw - 20px);height:min(74vh,560px);border-radius:18px}.gh-chat-toast{right:10px;bottom:82px;width:calc(100vw - 20px)}}

/* FORCE: global messenger button must be visible on every page */
#ghChatPopRoot.gh-chat-pop-root{position:fixed!important;right:20px!important;bottom:20px!important;z-index:2147483000!important;pointer-events:auto!important}
#ghChatPopRoot .gh-chat-pop-btn{min-width:58px!important;min-height:58px!important;display:none!important;visibility:visible!important;opacity:1!important;align-items:center!important;justify-content:center!important;gap:8px!important;background:linear-gradient(135deg,#0ea5e9,#10b981)!important;color:#fff!important;border:1px solid rgba(255,255,255,.18)!important;border-radius:999px!important;box-shadow:0 18px 50px rgba(0,0,0,.45)!important;font-weight:900!important}
#ghChatPopRoot .gh-chat-pop-btn.show{display:flex!important}
#ghChatPopRoot .gh-chat-pop.open + *{display:none}
@media(max-width:640px){#ghChatPopRoot.gh-chat-pop-root{right:12px!important;bottom:12px!important}#ghChatPopRoot .gh-chat-pop-btn{width:56px!important;height:56px!important;padding:0!important}#ghChatPopRoot .gh-chat-pop-btn span:not(.dot){display:none!important}}


/* Messenger production reaction/media polish */
.msg-bubble img,.gh-chat-bubble img{max-width:min(320px,70vw)!important;max-height:260px!important;width:auto!important;height:auto!important;object-fit:cover!important;border-radius:14px!important;display:block!important}
.msg-reactions,.gh-chat-like{border:0!important;background:rgba(15,23,42,.78)!important;color:#d1d5db!important;border-radius:999px!important;min-width:22px!important;height:22px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;font-size:13px!important;line-height:1!important;cursor:pointer!important}
.msg-reactions.active,.gh-chat-like.active{background:rgba(239,68,68,.18)!important;color:#fff!important}
.msg-heart-count,.gh-chat-heart{display:inline-flex!important;align-items:center!important;gap:2px!important;font-size:12px!important;background:rgba(15,23,42,.82)!important;border:1px solid rgba(255,255,255,.08)!important;border-radius:999px!important;padding:2px 6px!important;margin-top:2px!important}

/* Messenger V2 unified reaction + media polish */
.msg-bubble-wrap,.gh-chat-msg-wrap{position:relative}
.msg-reaction-trigger,.gh-chat-like{opacity:1;transition:transform .15s ease}
.msg-bubble-wrap:hover .msg-reaction-trigger,.msg-reaction-trigger.active,.gh-chat-msg-wrap:hover .gh-chat-like,.gh-chat-like.active{opacity:1}
.msg-reaction-picker,.gh-chat-reaction-panel{position:absolute;right:0;bottom:calc(100% + 6px);display:none;gap:4px;padding:6px;background:#111827;border:1px solid rgba(255,255,255,.14);border-radius:999px;box-shadow:0 12px 32px rgba(0,0,0,.35);z-index:20;white-space:nowrap}
.msg-reaction-picker.open,.gh-chat-reaction-panel.open{display:flex}
.msg-reaction-picker button,.gh-chat-reaction-panel button{border:0;background:transparent;font-size:18px;line-height:1;cursor:pointer;padding:4px;border-radius:50%;transition:transform .12s ease, background .12s ease}
.msg-reaction-picker button:hover,.gh-chat-reaction-panel button:hover{transform:translateY(-2px) scale(1.12);background:rgba(255,255,255,.09)}
.msg-reaction-summary,.gh-chat-reaction-summary{display:flex;gap:3px;align-items:center;margin-top:3px;min-height:18px}
.msg-reaction-badge{display:inline-flex;align-items:center;gap:2px;font-size:12px;background:rgba(15,23,42,.82);border:1px solid rgba(255,255,255,.08);border-radius:999px;padding:2px 6px}
.msg-image,.gh-chat-img{max-width:min(320px,70vw)!important;max-height:260px!important;width:auto!important;height:auto!important;object-fit:cover!important;border-radius:14px!important;display:block!important;margin-top:4px}
.msg-file-link,.gh-chat-file{display:inline-flex;margin-top:4px;color:#bfdbfe;text-decoration:none;font-weight:700}
.message-form{display:flex;align-items:center;gap:8px;width:100%;position:relative}
.message-form input[type="text"],#messageInput{flex:1;min-width:0}
.emoji-picker-wrap{position:absolute;left:0;bottom:48px;display:none;flex-wrap:wrap;gap:6px;max-width:min(360px,calc(100vw - 32px));padding:10px;background:#111827;border:1px solid rgba(255,255,255,.14);border-radius:14px;box-shadow:0 14px 40px rgba(0,0,0,.36);z-index:50}
.emoji-btn{border:0;background:rgba(255,255,255,.08);border-radius:8px;padding:6px;font-size:17px;cursor:pointer}
.conv-item.unread .conv-name{font-weight:900}.conv-unread-dot{width:9px;height:9px;background:#10b981;border-radius:50%;display:inline-block;margin-left:auto}.conv-avatar-img{width:40px;height:40px;border-radius:50%;object-fit:cover}.chat-peer-head{padding:12px 16px}.chat-peer-link{display:inline-flex;align-items:center;gap:10px;color:inherit;text-decoration:none}.chat-peer-link img,.chat-peer-link span{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;object-fit:cover;background:linear-gradient(135deg,#10b981,#3b82f6);color:#fff;font-weight:900}
@media(max-width:640px){.msg-image,.gh-chat-img{max-width:68vw!important;max-height:220px!important}.msg-reaction-picker,.gh-chat-reaction-panel{right:auto;left:0}.emoji-picker-wrap{left:8px;right:8px;max-width:none}}
