@import url('style.css');

.chat-container {
    display: flex;
    height: calc(100vh - var(--navbar-height));
    background: var(--background);
}

.chat-sidebar {
    width: 280px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.chat-sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-sidebar-header h6 {
    margin: 0;
    font-weight: 600;
}

.chat-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.chat-history-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.chat-history-item:hover {
    background: #f8fafc;
}

.chat-history-item.active {
    background: #eff6ff;
    border-left-color: var(--primary);
}

.chat-history-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 16px;
    flex-shrink: 0;
}

.chat-history-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    color: #1e293b;
}

.chat-history-time {
    font-size: 11px;
    color: #94a3b8;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    max-width: 80%;
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.message.bot .message-avatar {
    background: var(--primary);
    color: #fff;
}

.message.user .message-avatar {
    background: #e2e8f0;
    color: #64748b;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    background: #f1f5f9;
    position: relative;
}

.message.bot .message-bubble {
    background: #f1f5f9;
    border-top-left-radius: 4px;
}

.message.user .message-bubble {
    background: var(--primary);
    color: #fff;
    border-top-right-radius: 4px;
}

.message-bubble p {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.5;
}

.message-bubble ul {
    margin: 4px 0;
    padding-left: 20px;
    font-size: 13px;
}

.message-bubble ul li {
    margin: 2px 0;
}

.message-time {
    font-size: 10px;
    color: #94a3b8;
    display: block;
    margin-top: 4px;
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.7);
}

.chat-input-area {
    padding: 16px 24px 24px;
    border-top: 1px solid #e2e8f0;
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px;
    transition: all 0.2s;
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    background: transparent;
}

.chat-send-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    background: var(--primary-dark);
}

.chat-input-hint {
    padding: 4px 12px 0;
    text-align: center;
}

@media (max-width: 768px) {
    .chat-sidebar {
        display: none;
    }
    
    .message {
        max-width: 90%;
    }
}