/* MiniForumWidget - shared styling wherever the embedded chat/forum widget is used (event Chat tab, game chat bubbles). */

.mfw-widget {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mfw-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 8px;
    background: #fafafa;
}

.mfw-loading,
.mfw-empty {
    color: #888;
    font-size: 13px;
    padding: 10px;
    text-align: center;
}

.mfw-list .discussion_comment_list_item_sc {
    padding: 8px 4px;
    border-bottom: 1px solid #eee;
}

.mfw-list .discussion_comment_list_item_sc:last-child {
    border-bottom: none;
}

.mfw-list .chatter_avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.mfw-list .chatter_username {
    font-weight: 700;
    font-size: 13px;
}

.mfw-list .chatter_middle_details {
    font-size: 12px;
    color: #999;
}

.mfw-vote-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.mfw-vote-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
}

.mfw-vote-btn:hover { background: #eee; }
.mfw-vote-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.mfw-upvote-btn.is-active { color: #2e7d32; font-weight: 700; }
.mfw-downvote-btn.is-active { color: #c62828; font-weight: 700; }

.mfw-vote-count { font-size: 12px; }

.mfw-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.mfw-textarea {
    flex: 1;
    resize: vertical;
    min-height: 40px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.mfw-submit-btn {
    background: #ff6d00;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.mfw-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.mfw-submit-btn:hover:not(:disabled) { background: #e05f00; }

.mfw-login-prompt {
    display: block;
    text-align: center;
    width: 100%;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #0057A0;
}

/* --- Chat bubble (game pages) --- */

.mfw-bubble-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ff6d00;
    color: #fff;
    border: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mfw-bubble-btn:hover { background: #e05f00; }

.mfw-bubble-panel {
    position: fixed;
    right: 20px;
    bottom: 88px;
    width: 340px;
    max-width: calc(100vw - 40px);
    max-height: 70vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.mfw-bubble-panel.is-open { display: flex; }

.mfw-bubble-header {
    background: #0057A0;
    color: #fff;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mfw-bubble-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
}

.mfw-bubble-body {
    padding: 12px;
    overflow-y: auto;
}

@media (max-width: 480px) {
    .mfw-bubble-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }
    .mfw-bubble-btn { right: 16px; bottom: 16px; }
}
