/* ============ MonBlock SDK — chat bạn bè (sdk/social.js) ============
   Tự đủ màu (không dựa vào biến CSS của từng game) để trông giống nhau ở cổng và mọi game. */
.mbs-panel.hidden, .mbs-form.hidden { display: none !important; }
/* Opens under the shell top bar (sdk/shell.css), above the bottom tab bar on phones. */
.mbs-panel { position: fixed; right: 12px; top: calc(var(--mb-top, 52px) + 8px + env(safe-area-inset-top)); z-index: 70; display: flex; flex-direction: column; width: min(380px, calc(100vw - 24px));
  height: min(600px, calc(100dvh - var(--mb-top, 52px) - 24px)); overflow: hidden; border: 1px solid #2b3646; border-radius: 18px; background: #0f151e; color: #e8eef6;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6); font: 14px/1.4 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.mbs-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #2b3646; background: #151c26; }
.mbs-head > b { flex: 1; font-size: 16px; }
.mbs-head button { flex: none; padding: 6px 10px; border: 1px solid #2b3646; border-radius: 10px; background: #1b2431; color: #e8eef6; font: inherit; font-weight: 700; cursor: pointer; }
.mbs-who { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.mbs-who b, .mbs-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbs-who small { color: #93a3b8; font-size: 12px; }
.mbs-av { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; background: #1b2431; font-size: 18px; }
.mbs-body { flex: 1; overflow-y: auto; padding: 8px; overscroll-behavior: contain; }
.mbs-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mbs-row:hover { background: #151c26; }
.mbs-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #e5484d; color: #fff; font-size: 12px; line-height: 22px; text-align: center; }
.mbs-dot { width: 9px; height: 9px; border-radius: 50%; background: #4fd18b; }
.mbs-send { padding: 5px 10px; border-radius: 10px; background: #ffcf5a; color: #1c1608; font-weight: 800; font-size: 13px; }
.mbs-empty { margin: 18px 8px; color: #93a3b8; line-height: 1.55; text-align: center; }
.mbs-empty a { color: #ffcf5a; }
.mbs-more { display: block; margin: 4px auto 10px; padding: 6px 12px; border: 1px solid #2b3646; border-radius: 99px; background: none; color: #93a3b8; font: inherit; cursor: pointer; }
.mbs-msg { display: flex; flex-direction: column; align-items: flex-start; margin: 6px 0; }
.mbs-msg.me { align-items: flex-end; }
.mbs-msg p { max-width: 82%; margin: 0; padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: #1f2a38; white-space: pre-wrap; overflow-wrap: anywhere; }
.mbs-msg.me p { border-radius: 16px 16px 4px 16px; background: #2f5fb3; }
.mbs-msg time { margin-top: 2px; padding: 0 6px; color: #6f8096; font-size: 11px; }
.mbs-invite { display: flex; flex-direction: column; gap: 4px; max-width: 86%; padding: 10px 12px; border: 1px solid #6a5420; border-radius: 14px; background: #2a2210; }
.mbs-invite small { color: #d9c48a; }
.mbs-invite button { align-self: flex-start; margin-top: 4px; padding: 7px 12px; border: 0; border-radius: 10px; background: #ffcf5a; color: #1c1608; font: inherit; font-weight: 800; cursor: pointer; }
.mbs-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #2b3646; background: #151c26; }
.mbs-form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid #2b3646; border-radius: 12px; background: #0f151e; color: #e8eef6; font: inherit; font-size: 16px; }
.mbs-form button { padding: 0 14px; border: 0; border-radius: 12px; background: #ffcf5a; color: #1c1608; font: inherit; font-weight: 800; cursor: pointer; }
.mbs-toast { position: fixed; left: 50%; top: calc(12px + env(safe-area-inset-top)); z-index: 80; display: flex; flex-direction: column; gap: 4px; width: min(380px, calc(100vw - 24px));
  padding: 12px 14px; transform: translateX(-50%); border: 1px solid #2b3646; border-radius: 16px; background: #151c26; color: #e8eef6;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55); font: 14px/1.4 "Segoe UI", Roboto, Arial, sans-serif; animation: mbsIn .2s ease; }
.mbs-toast span { color: #c9d4e3; overflow-wrap: anywhere; }
.mbs-toast div { display: flex; gap: 6px; margin-top: 4px; }
.mbs-toast button { padding: 7px 12px; border: 1px solid #2b3646; border-radius: 10px; background: #1b2431; color: #e8eef6; font: inherit; font-weight: 700; cursor: pointer; }
.mbs-toast button[data-go] { border-color: #ffcf5a; background: #ffcf5a; color: #1c1608; }
.mbs-toast button[data-x] { margin-left: auto; }
.mbs-toast.mbs-short { top: auto; bottom: calc(70px + env(safe-area-inset-bottom)); }
.mbs-offer { position: fixed; left: 50%; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 75; width: min(380px, calc(100vw - 24px)); max-height: 60dvh; overflow-y: auto;
  padding: 10px; transform: translateX(-50%); border: 1px solid #2b3646; border-radius: 16px; background: #0f151e; color: #e8eef6;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6); font: 14px/1.4 "Segoe UI", Roboto, Arial, sans-serif; animation: mbsIn .2s ease; }
.mbs-offer-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 6px; }
.mbs-offer-head button { border: 0; background: none; color: #93a3b8; font-size: 18px; cursor: pointer; }
.mbs-row:disabled { opacity: .7; cursor: default; }
@keyframes mbsIn { from { opacity: 0; transform: translate(-50%, -6px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 520px) {
  .mbs-panel { top: calc(var(--mb-top, 52px) + env(safe-area-inset-top)); right: 0; left: 0; bottom: calc(var(--mb-nav, 60px) + env(safe-area-inset-bottom)); width: 100%; height: auto;
    border-width: 0 0 1px; border-radius: 0 0 18px 18px; }
}
/* Row with trailing action buttons (friend list 🎮, invite picker ⚡ / ⚙). */
.mbs-line { display: flex; align-items: center; gap: 6px; }
.mbs-line > .mbs-row { flex: 1; min-width: 0; }
.mbs-line > .mbs-av { margin-left: 8px; }
.mbs-line > .mbs-who { padding: 9px 0; }
.mbs-quick { flex: none; width: 38px; height: 38px; border: 1px solid #2b3646; border-radius: 12px; background: #1b2431; color: #e8eef6; font-size: 17px; cursor: pointer; }
.mbs-quick:hover { border-color: #ffcf5a; }
.mbs-go { flex: none; height: 38px; padding: 0 12px; border: 0; border-radius: 12px; background: #ffcf5a; color: #1c1608; font: inherit; font-weight: 800; cursor: pointer; }
.mbs-hint { margin: 4px 6px 10px; color: #93a3b8; font-size: 12.5px; line-height: 1.5; }
/* Phone keyboard up: panel covers exactly the visible area (top / height set by fitKeyboard in social.js). */
.mbs-panel.mbs-kb { bottom: auto !important; z-index: 85; border-radius: 0; border-width: 0; padding-top: env(safe-area-inset-top); }
