/* Softecki AI Sales Agent - ChatGPT-like Interface */

#sales-agent-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
    min-height: 600px;
}

.sales-agent-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.sales-agent-header {
    background: linear-gradient(135deg, #068BEA 0%, #25D366 100%);
    padding: 20px 30px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sales-agent-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sales-agent-header-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.sales-agent-header-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.sales-agent-header-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.sales-agent-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sales-agent-messages::-webkit-scrollbar {
    width: 8px;
}

.sales-agent-messages::-webkit-scrollbar-track {
    background: transparent;
}

.sales-agent-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.sales-agent-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.sales-message {
    display: flex;
    gap: 15px;
    animation: fadeInUp 0.3s ease;
    max-width: 85%;
}

.assistant-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.sales-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #068BEA 0%, #25D366 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
}

.user-message .sales-avatar {
    background: linear-gradient(135deg, #fd8917 0%, #ff6b6b 100%);
}

.sales-content {
    flex: 1;
}

.sales-text {
    background: white;
    padding: 15px 20px;
    border-radius: 18px;
    line-height: 1.6;
    font-size: 15px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    word-wrap: break-word;
}

.user-message .sales-text {
    background: linear-gradient(135deg, #068BEA 0%, #25D366 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.assistant-message .sales-text {
    border-bottom-left-radius: 4px;
}

.sales-text strong {
    font-weight: 700;
    color: inherit;
}

.sales-text ul, .sales-text ol {
    margin: 10px 0;
    padding-left: 25px;
}

.sales-text li {
    margin: 5px 0;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 15px 20px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.typing-indicator span {
    width: 10px;
    height: 10px;
    background: #999;
    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);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Input Area */
.sales-agent-input-area {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.sales-agent-input-wrapper {
    flex: 1;
    position: relative;
}

#salesAgentInput {
    width: 100%;
    min-height: 50px;
    max-height: 200px;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.2s ease;
    line-height: 1.5;
}

#salesAgentInput:focus {
    border-color: #068BEA;
    box-shadow: 0 0 0 3px rgba(6, 139, 234, 0.1);
}

#salesAgentInput::placeholder {
    color: #999;
}

#salesAgentSend {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #068BEA 0%, #25D366 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(6, 139, 234, 0.3);
    flex-shrink: 0;
}

#salesAgentSend:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(6, 139, 234, 0.4);
}

#salesAgentSend:active {
    transform: scale(0.95);
}

#salesAgentSend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    #sales-agent-section {
        padding: 30px 15px;
    }
    
    .sales-agent-container {
        height: 500px;
        border-radius: 15px;
    }
    
    .sales-agent-header {
        padding: 15px 20px;
    }
    
    .sales-agent-messages {
        padding: 20px 15px;
    }
    
    .sales-message {
        max-width: 90%;
    }
    
    .sales-agent-input-area {
        padding: 15px;
    }
    
    .sales-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .sales-text {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* Empty State */
.sales-agent-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    text-align: center;
    padding: 40px;
}

.sales-agent-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

