.chatInputRow{
    display:flex;
    align-items: stretch;
    width: 100%;
    gap: 0;
}

/* Select “attaccata” all’input */
.chatChannelSelect{
    font: inherit;
    color: var(--text);
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: 12px 0 0 12px;
    padding: 10px 12px;
    outline: none;
    box-shadow: 0 10px 22px rgba(18,32,80,0.08);
    cursor: pointer;
    min-width: 92px;
}

/* Input attaccato */
.chatInputRow .textInput{
    border-radius: 0 12px 12px 0;
    flex: 1;
    min-width: 0;
}

/* Focus coerente: quando focus su uno dei due, evidenzia entrambi */
.chatInputRow:focus-within .chatChannelSelect,
.chatInputRow:focus-within .textInput{
    border-color: rgba(59,130,246,0.45);
    box-shadow: 0 14px 30px rgba(59,130,246,0.16);
}

.chatTop{
    flex: 0 0 auto;
    padding: 12px;
    border-bottom: 1px solid var(--borderSoft);
}

.miniPill{
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    border: 1px solid var(--border);
}

.chatInput{
    flex: 0 0 auto;
    padding: 12px;
    border-top: 1px solid var(--borderSoft);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chatInput input{
    width: 100%;
    display: block;
}

.pill{
    cursor: pointer;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.92);
    box-shadow: 0 10px 22px rgba(18,32,80,0.08);
}

.pill.active{
    background: linear-gradient(180deg, rgba(255,77,141,0.18), rgba(59,130,246,0.12));
    border-color: rgba(59,130,246,0.30);
}

.chatLog{
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.35));
}

/* ===== Chat message rows ===== */
.chatMsg{
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    line-height: 1.25;
}

/* Badge base */
.chatBadge{
    display: inline-flex;
    align-items: center;
    height: 18px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #000;
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.2px;
    user-select: none;

    /* “bordino nero” sul testo (finto stroke) */
    text-shadow:
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000;
}

/* Badge canale */
.chatBadgeChannel{
    font-size: 11px;
    opacity: 0.95;
}

.chatBadgeChannel.isGlobal{
    background: #0b2a6f; /* blu scuro */
}

.chatBadgeChannel.isLocal{
    background: #aeb7c3; /* grigio chiaro */
}

/* Badge nome (colore scelto al login) */
.chatBadgeName{
    font-size: 12px;
}

/* Testo messaggio */
.chatMsgText{
    color: var(--text);
    word-break: break-word;
    white-space: pre-wrap;
}

/* Sfondo alternato messaggi chat */
.chatLog .chatMsg{
    padding: 6px 8px;
    border-radius: 8px;
}

/* Riga pari: grigio chiarissimo */
.chatLog .chatMsg:nth-child(even){
    background: rgba(24,32,51,0.04);
}

/* Riga dispari: bianco (quasi trasparente) */
.chatLog .chatMsg:nth-child(odd){
    background: rgba(255,255,255,0.55);
}

.chatLog .chatMsg:hover{
    background: rgba(59,130,246,0.08);
}

/* Scrollbar chat */
.chatLog::-webkit-scrollbar { width: 10px; }
.chatLog::-webkit-scrollbar-track { background: rgba(18,32,80,0.06); border-radius: 999px; }
.chatLog::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.25); border-radius: 999px; }
.chatLog::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,0.35); }

