/* VitalChat Widget Styles */
.vitalchat-widget {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.vitalchat-widget.position-bottom-right {
    right: 20px;
}

.vitalchat-widget.position-bottom-left {
    left: 20px;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--vitalchat-primary-color, #667eea);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

.chat-toggle svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.chat-container {
    position: absolute;
    bottom: 80px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.position-bottom-right .chat-container {
    right: 0;
}

.position-bottom-left .chat-container {
    left: 0;
}

.chat-container.open {
    display: flex;
}

.chat-header {
    background: var(--vitalchat-primary-color, #667eea);
    color: white;
    padding: 16px;
    text-align: center;
    font-weight: 600;
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.message.bot .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message.user .message-content {
    background: var(--vitalchat-primary-color, #667eea);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e9ecef;
}

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

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: var(--vitalchat-primary-color, #667eea);
}

.send-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--vitalchat-primary-color, #667eea);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.send-button:hover:not(:disabled) {
    transform: scale(1.05);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.send-button svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.typing-indicator {
    display: none;
    padding: 12px 16px;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.typing-indicator.show {
    display: block;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .chat-container {
        width: calc(100vw - 40px);
        height: calc(100vh - 140px);
        bottom: 80px;
    }

    .position-bottom-right .chat-container {
        right: 20px;
    }

    .position-bottom-left .chat-container {
        left: 20px;
    }
}

/* Loading animation */
.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}
