@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500&display=swap');

#chat-container {
    position: fixed;
    bottom: 10px;
    left: 10px;
    width: 240px;
    display: none;
    flex-direction: column;
    pointer-events: auto;
    z-index: 100;
    font-family: inherit;
    --chat-font-size: 11px;
}

/* Barra de pestañas: Global / Private */
#chat-tabs {
    display: flex;
    gap: 2px;
    background: rgba(0,0,0,0.7);
    border-radius: 2px;
    padding: 2px;
}

.chat-tab {
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: transparent;
    color: rgba(255,255,255,0.7);
    border: none;
    border-radius: 2px;
    padding: 5px 0;
    flex: 1;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    pointer-events: auto;
}

.chat-tab:hover {
    color: rgba(255,255,255,0.75);
    background: rgba(255,255,255,0.05);
}

.chat-tab.active {
    background: rgba(255,60,60,0.15);
    color: rgb(255,60,60);
}

.chat-tab:focus {
    outline: none;
}

/* Caja del chat, mismo lenguaje visual que .lb-list */
#chat-messages {
    height: 180px;
    flex: none;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    background: rgba(0,0,0,0.7);
    border-radius: 2px;
    margin-top: 6px;
    padding: 4px 0;
    user-select: text;
    -webkit-user-select: text;
}

#chat-messages::-webkit-scrollbar { width: 6px; }
#chat-messages::-webkit-scrollbar-track { background: transparent; }

#chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 0;
}
#chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

#chat-messages::-webkit-scrollbar-button { display: none; }

#chat-messages::-webkit-scrollbar-button:vertical:decrement:start {
    display: block;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 7'%3E%3Cpath d='M5 0.5 Q5 0.5 9.5 6.5 Q7.5 6.5 5 6.5 Q2.5 6.5 0.5 6.5 Q5 0.5 5 0.5Z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E") center/9px 7px no-repeat;
}

#chat-messages::-webkit-scrollbar-button:vertical:increment:end {
    display: block;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 7'%3E%3Cpath d='M5 6.5 Q5 6.5 9.5 0.5 Q7.5 0.5 5 0.5 Q2.5 0.5 0.5 0.5 Q5 6.5 5 6.5Z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E") center/9px 7px no-repeat;
}

#chat-messages::-webkit-scrollbar-button:vertical:decrement:end,
#chat-messages::-webkit-scrollbar-button:vertical:increment:start {
    display: none;
}

#chat-messages::-webkit-scrollbar-button:vertical:decrement:start:hover,
#chat-messages::-webkit-scrollbar-button:vertical:increment:end:hover {
    background-color: rgba(255,255,255,0.15);
}

.chat-msg {
    direction: ltr;
    font-family: inherit;
    font-size: var(--chat-font-size, 11px);
    line-height: 1.4;
    margin-bottom: 0;
    padding: 2px 10px;
    border-radius: 0;
    word-wrap: break-word;
    background: transparent;
    transition: background 0.15s;
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
    color: rgba(255,255,255,0.85);
}

.chat-msg:hover {
    background: rgba(255,255,255,0.06);
}

#chat-messages > :first-child { margin-top: auto; }

#chat_textbox {
    background: rgba(0,0,0,0.7);
    color: rgba(255,255,255,0.9);
    border: none;
    border-radius: 2px;
    padding: 6px 10px;
    font-size: var(--chat-font-size, 11px);
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    margin-top: 6px;
    outline: none;
    transition: background 0.15s;
}

#chat_textbox::placeholder {
    color: rgba(255,255,255,0.35);
}

#chat_textbox:focus {
    background: rgba(0,0,0,0.55);
}