/* ================= CHAT CONSOLE ================= */

.chat-console {
    background: #000;
    color: #0f0;
    font-family: monospace;
    font-size: 12px;
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #333;
}

/* cada mensagem = UMA linha */
.chat-line {
    display: flex;
    flex-wrap: nowrap;          /* nunca quebra */
    align-items: baseline;
    gap: 6px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    margin-bottom: 4px;
}

/* hora */
.chat-time {
    color: #888;
    white-space: nowrap;
}

/* canal */
.chat-channel {
    white-space: nowrap;
}

/* utilizador / indicativo */
.chat-user {
    color: #ff4444;             /* encarnado */
    font-weight: bold;
    white-space: nowrap;
}

/* mensagem */
.chat-msg {
    color: #0f0;
    flex: 1;
    min-width: 0;

    white-space: normal;        /* permite quebrar linha */
    word-break: break-word;     /* quebra palavras longas */
    overflow-wrap: anywhere;

    display: -webkit-box;       /* limita a 2 linhas */
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

/* ================= CORES POR CANAL ================= */

.chat-channel.PUBLICO  { color: #00ff00; } /* verde */
.chat-channel.PRIVADO  { color: #bb86fc; } /* púrpura */
.chat-channel.CB       { color: #2196f3; } /* azul */
.chat-channel.PMR      { color: #ff9800; } /* laranja */
.chat-channel.MESHCORE { color: #ffeb3b; } /* amarelo */
.chat-channel.DEV      { color: #ff69b4; } /* rosa */

/* mensagem herda cor do canal */
.chat-msg.PUBLICO  { color: #00ff00; }
.chat-msg.PRIVADO  { color: #bb86fc; }
.chat-msg.CB       { color: #2196f3; }
.chat-msg.PMR      { color: #ff9800; }
.chat-msg.MESHCORE { color: #ffeb3b; }
.chat-msg.DEV      { color: #ff69b4; }

/* ================= CHAT FORM ================= */

.chat-form {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}

/* selects e input */
.chat-form select,
.chat-form input[type="text"] {
    height: 26px;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
    border-radius: 4px;
    border: 1px solid #555;
    background: #111;
    color: #ddd;
}

/* selects */
.chat-select {
    width: 110px;
}

/* input mensagem */
.chat-form .chat-msg {
    flex: 1;
    min-width: 120px;
}

/* botão enviar */
.chat-send {
    height: 26px;
    padding: 0 10px;
    font-size: 13px;
    border-radius: 4px;
    background: #1b5e20;
    color: #fff;
    border: none;
    cursor: pointer;
}

.chat-send:hover {
    background: #2e7d32;
}

/* ===== CHAT FILTER ===== */
.chat-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
}

.chat-filter label {
    cursor: pointer;
    white-space: nowrap;
}

.chat-filter input {
    accent-color: #66bb6a;
    margin-right: 3px;
}

/* ===== CHAT TOOLS ===== */
.chat-tools {
    margin-bottom: 6px;
}

#chat-search {
    width: 100%;
    padding: 4px 6px;
    background: #000;
    border: 1px solid #444;
    color: #0f0;
    font-family: monospace;
    font-size: 12px;
}

/* ===== HIGHLIGHT MINHAS MSG ===== */
.chat-line.mine {
    background: rgba(0, 255, 0, 0.08);
    border-left: 3px solid #00ff00;
    padding-left: 4px;
}

/* ===== NOVA MENSAGEM ===== */
.chat-line.new-msg {
    animation: chatBlink 1.2s ease;
}

@keyframes chatBlink {
    0%   { background: rgba(255,255,0,0.3); }
    100% { background: transparent; }
}

/* ================================================= */
/* ================= CHAT INTRO GEO ================= */
/* ================================================= */

/* wrapper intro (logo + texto) */
.geo-chat-intro-wrap {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;

    background: #000;
    border: 1px solid #333;
    padding: 8px;
}

/* logo GEO */
.geo-chat-logo {
    width: 42px;
    height: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 0 2px rgba(0,255,0,0.4));
}

/* texto do intro */
.geo-chat-intro-wrap .geo-text {
    margin: 0;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #0f0;
}

/* links no intro */
.geo-chat-intro-wrap a {
    color: #66bb6a;
    text-decoration: none;
}

.geo-chat-intro-wrap a:hover {
    text-decoration: underline;
}

/* textos extra do chat (intro + explicações) */
.geo-chat-extra {
    background: #000;
    border: 1px solid #333;
    padding: 8px;
    margin-bottom: 8px;

    font-family: monospace;
    font-size: 12px;
    color: #0f0;
}

/* ===== MOBILE ===== */
@media (max-width: 600px) {
    .geo-chat-logo {
        width: 100px;
    }

    .geo-chat-intro-wrap {
        gap: 8px;
        padding: 6px;
    }
}
