#dock {
    position: fixed;
    bottom: 0;
    right: 10px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 4px;
    z-index: 1000;
}

#friends-panel {
    width: 200px;
    background: #fff;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}

#friends-header {
    background: linear-gradient(#73a6ff);
    color: #fff;
    font-weight: bold;
    font-size: 11px;
    padding: 4px 7px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    border-radius: 4px 4px 0 0;
    min-height: 22px;
}

#friends-header .title {
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
}

#friends-header .arrow {
    fill: white;
    zoom: 1.4;
    background-color: #3072fe;
    border: 2px solid #3072fe;
}

.chat-header-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}

#friends-body {
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#friends-body.open {
    display: flex;
    border: 0.1px solid #72a5ff;
}

.friends-search {
    padding: 4px 5px;
    border-bottom: 1px solid #ddd;
    background: #f7f7f7;
}

.friends-search input {
    width: 100%;
    border: 1px solid #bbb;

    padding: 2px 4px;
    font-size: 11px;
    color: #999;
    outline: none;
    box-sizing: border-box;
}

.friends-search input:focus {
    border-color: #4a7abf;
    color: #333;
}

.current-user-bar {
    padding: 4px 7px;
    border-bottom: 1px solid #d0e4f7;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #eef6ff;
    font-weight: bold;
    font-size: 11px;
    color: #222;
}

.set-status-bar {
    padding: 3px 7px;
    border-bottom: 1px solid #ddd;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
    cursor: pointer;
    user-select: none;
}

.set-status-arrow {
    width: 0.8em;
    height: 0.8em;
    fill: #aaa;
    transform: scaleY(-1);
    flex-shrink: 0;
}

span.online {
    display: inline-block;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    vertical-align: middle;
    border-radius: 50%;
}

span.online.available {
    background-color: #31a24c;
}

span.online.offline {
    background-color: #999;
}

.friends-list {
    overflow-y: auto;
    max-height: 200px;
}

.friend-item {
    padding: 3px 7px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
}

.friend-name {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.options-link {
    padding: 2px 5px;


    font-size: 7px;
    color: #0000cb;
    cursor: pointer;
    text-align: right;
    text-decoration: underline;
    user-select: none;
}

.chat-window {
    width: 230px;
    background: #fff !important;
    border-bottom: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 4px 4px 0 0;
}

.chat-header {
   background: linear-gradient(#73a6ff);
    color: #fff;
    font-weight: bold;
    font-size: 11px;
    padding: 3px 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 22px;
    cursor: pointer;
    user-select: none;
    border-radius: 4px 4px 0 0;
}

.chat-header.inactive {
    background: linear-gradient(#97bbe5);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 5px;
    overflow: hidden;
}

.chat-header-name {
    color: white;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-header-controls {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.chat-header-controls a {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 20px;
    height: 20px;
    border-radius: 2px;
}

.chat-header-controls svg {
    width: 1em;
    height: 1em;
    fill: white;
    color: white;
}

.chat-header-controls svg path {
    fill: white;
}

.chat-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0.1px solid #72a5ff;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
    min-height: 90px;
    max-height: 130px;
    background: #fff;
    border-bottom: 1px solid #ddd;
}

.msg-row {
    margin-bottom: 4px;
    line-height: 1.4;
    font-size: 11px;
}

.msg-row .sender {
    font-weight: bold;
    color: #333;
}

.msg-row.me .sender {
    color: #444;
}

.msg-row.them .sender {
    color: #4a7abf;
}

.msg-with-avatar {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-bottom: 4px;
}

.msg-avatar-img {
    width: 22px;
    height: 22px;

    flex-shrink: 0;
    object-fit: cover;
    margin-top: 1px;
    border: 1px solid #ccc;
}

.msg-content {
    flex: 1;
    font-size: 11px;
    line-height: 1.4;
}

.msg-timestamp {
    text-align: center;
    font-size: 10px;
    color: #999;
    font-style: italic;
    margin: 4px 0 3px;
    line-height: 1.2;
}

.chat-header-status {
    display: none;
}

.chat-input-area {
    padding: 4px;
    background: #fff;
}

.chat-input-area input {
    width: 100%;
    border: 2px solid #73a6ff;
    border-radius: 0;
    padding: 7px 5px;
    font-size: 11px;
    outline: none;
    box-sizing: border-box;
}

.chat-input-area input:focus {
    border-color: #4a7abf;
}

.chat-footer {

    background: #ffffff;
    border: 5px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: #4a7abf;
    cursor: pointer;
    position: relative;
}

.opcoes-btn {
    cursor: pointer;
    color: #4a7abf;
    text-decoration: underline;
    user-select: none;
}

.dropdown-menu-opcoes {
    position: absolute;
    display: none;
    flex-direction: column;
    gap: 0;
    list-style: none;
    width: 180px;
    background-color: #fff;
    border: 1.8px solid #999999;
    left: 0;
    bottom: 100%;

    margin-bottom: 4px;
}

.dropdown-menu-opcoes.active {
    display: flex;
}

.dropdown-menu-opcoes .button-link {
    display: block;
    border: 3px solid #ffff;
    text-align: left;
    font-size: 13;
    color: #333;
}

.dropdown-menu-opcoes .button-link:hover {
    background: #f0f0f0;
}

.dropdown-menu-opcoes .button-link.selected {
    background-color: #7dacfe !important;
    color: white !important;
}

.dropdown-menu-mini {
    position: absolute;
    display: none;
    justify-content: start;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px;
    list-style: none;
    width: 200px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    right: 0;
    bottom: 100%;
    padding: 8px 6px;
    margin-bottom: 4px;
}

.dropdown-menu-mini.active {
    display: flex;
}

.button-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}

.reaction-box-mini .button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 2px;
    cursor: pointer;
}

.reaction-box-mini .button-link i {
    font-size: 16px;
}

.msg-content i[class^="icon-react-"] {
    display: inline-block;
    margin: 0 3px;
    vertical-align: middle;
    font-size: 0.95em;
    line-height: 1;
}

.emoji-btn {
    font-size: 14px;
    cursor: pointer;
    color: #888;
    border: #888 4px;
    border: 1px solid #8888882b;
}

.chat-window.minimised .chat-body {
    display: none;
}

.unread-badge {
    background: #ff4444;
    color: white;
    border-radius: 8px;
    padding: 1px 4px;
    font-size: 9px;
    font-weight: bold;
    margin-left: 4px;
    min-width: 14px;
    text-align: center;
    display: inline-block;
    line-height: 1;
}

.conversation-indicator {
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.7;
}