/* Chat Bar (matching Wolfstorm's panel_nearby_chat_bar.xml) */
#chat-input {
    flex: 1;
    background-color: rgba(26, 26, 26, 0.95);
    border: 1px solid #555;
    border-radius: 3px;
    color: white;
    padding: 6px 10px;
    font-size: 13px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    margin: 0 8px;
}

#chat-input:focus {
    outline: none;
    border-color: #888;
    background-color: rgba(30, 30, 30, 0.98);
}

.chat-toggle-btn {
    width: 32px;
    height: 32px;
    background: rgba(60, 60, 60, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-toggle-btn:hover {
    background: rgba(80, 80, 80, 0.9);
    border-color: rgba(100, 150, 255, 0.5);
}

.chat-toggle-btn .material-icons {
    font-size: 20px;
}

/* Chat History Floater (matching Wolfstorm's floater_fs_nearby_chat.xml) */
.chat-floater {
    position: absolute;
    bottom: 60px;
    left: 20px;
    width: 400px;
    height: 350px;
    background: linear-gradient(180deg, rgba(30, 30, 30, 0.98) 0%, rgba(20, 20, 20, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    z-index: 900;
    pointer-events: auto;
}

.floater-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(180deg, rgba(50, 50, 50, 0.9) 0%, rgba(40, 40, 40, 0.9) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px 6px 0 0;
}

.floater-title {
    font-weight: 600;
    font-size: 13px;
    color: #e0e0e0;
}

.floater-close {
    background: rgba(255, 0, 0, 0.6);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: all 0.2s;
}

.floater-close:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
}

.chat-history-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 12px;
}

/* Chat Message Lines (matching Wolfstorm's chat history) */
.chat-line {
    margin-bottom: 4px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-time {
    color: #888;
    font-size: 11px;
    margin-right: 4px;
}

.chat-name {
    font-weight: 600;
    color: #d35400;
    margin-right: 4px;
}

.chat-text {
    color: #ddd;
}

/* Chat message types */
.chat-line.whisper .chat-text {
    color: #aaa;
    font-style: italic;
}

.chat-line.shout .chat-name {
    color: #ff6600;
}

.chat-line.system .chat-text {
    color: #88ccff;
    font-style: italic;
}

/* Scrollbar styling */
.chat-history-content::-webkit-scrollbar {
    width: 8px;
}

.chat-history-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.chat-history-content::-webkit-scrollbar-thumb {
    background: rgba(100, 100, 100, 0.6);
    border-radius: 4px;
}

.chat-history-content::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 120, 120, 0.8);
}

/* Chat Bubbles (in-world) */
.chat-bubble {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    pointer-events: none;
    transform: translate(-50%, -100%);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 1px 1px 2px black;
    max-width: 300px;
    word-wrap: break-word;
    white-space: normal;
}