/**
 * souka Health Assistant - CSS
 * 
 * This file contains the styling for the souka health assistant feature.
 */

/* Chat Container */
#souka-container {
    font-family: var(--bs-font-sans-serif);
}

#chat-messages {
    min-height: 350px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 15px;
    overflow-y: auto;
    scrollbar-width: thin;
    transition: all 0.3s ease;
}

#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

/* User Input Area */
#user-input-area {
    position: relative;
}

#user-input {
    padding-right: 40px;
    border-radius: 20px;
    padding: 10px 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

#send-button {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

#send-button:hover {
    transform: scale(1.05);
}

/* Message Styles */
.bot-message, .user-message {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

.message-bubble {
    border-radius: 18px;
    padding: 10px 15px;
    position: relative;
    max-width: 80%;
    word-wrap: break-word;
}

.bot-message .message-bubble {
    background-color: #f0f2f5;
    border-top-left-radius: 4px;
}

.user-message .message-bubble {
    background-color: var(--bs-primary);
    color: white;
    border-top-right-radius: 4px;
}

/* Avatar styles */
.bot-avatar, .user-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.bot-avatar {
    background-color: transparent; /* Remove the background color as we're using an image */
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #a0a0a0;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.5s infinite ease-in-out;
}

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

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

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

@keyframes typing {
    0% {
        transform: translateY(0px);
        background-color: #a0a0a0;
    }
    
    28% {
        transform: translateY(-7px);
        background-color: var(--bs-primary);
    }
    
    44% {
        transform: translateY(0px);
        background-color: #a0a0a0;
    }
}

/* Medication Suggestions */
.medication-suggestions {
    margin-top: 10px;
}

.medication-card {
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    padding: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.medication-card:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.medication-image {
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 6px;
    margin-right: 10px;
}

.medication-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.medication-info {
    flex-grow: 1;
}

.add-to-cart-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.add-to-cart-btn:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Options */
.bot-message .btn {
    margin-right: 5px;
    margin-bottom: 5px;
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.bot-message .btn:hover {
    transform: translateY(-2px);
}

/* Responsive styles */
@media (max-width: 768px) {
    #chat-messages {
        height: 300px;
    }
} 