/* Token Chat Styles */
.sidebar-widget {
    background: linear-gradient(135deg, #1a1d29 0%, #0d1117 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 0 15px 15px 15px;
    overflow: hidden;
}

.widget-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-header h3 i {
    color: #00d4aa;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #8b949e;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4);
    }
    70% {
        box-shadow: 0 0 0 5px rgba(74, 222, 128, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.own-message {
    background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    margin-left: 20%;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 11px;
}

.message-username {
    font-weight: 600;
    color: #00d4aa;
}

.own-message .message-username {
    color: #000;
}

.message-time {
    color: #8b949e;
    font-size: 10px;
}

.own-message .message-time {
    color: rgba(0, 0, 0, 0.6);
}

.message-text {
    color: #e1e4e8;
    font-size: 13px;
    word-wrap: break-word;
    line-height: 1.4;
}

.own-message .message-text {
    color: #000;
}

.chat-input-wrapper {
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-username {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.chat-username:focus {
    outline: none;
    border-color: #00d4aa;
    background: rgba(0, 212, 170, 0.1);
}

.chat-input-group {
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    transition: all 0.3s;
}

.chat-input:focus {
    outline: none;
    border-color: #00d4aa;
    background: rgba(0, 212, 170, 0.1);
}

.chat-send-btn {
    padding: 10px 15px;
    background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    border: none;
    border-radius: 50%;
    color: #000;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.4);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Scrollbar styling for chat messages */
.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 170, 0.5);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 170, 0.7);
}

/* Empty state */
.chat-empty {
    text-align: center;
    padding: 30px;
    color: #8b949e;
    font-size: 12px;
}

.chat-empty i {
    font-size: 30px;
    color: #4b5563;
    margin-bottom: 10px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    width: fit-content;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #8b949e;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .chat-container {
        height: 300px;
    }
    
    .sidebar-widget {
        margin: 10px;
    }
    
    .chat-message {
        padding: 8px;
    }
    
    .message-text {
        font-size: 12px;
    }
}