/* Chatbot Interface Visualization */
.chatbot-interface {
    width: 100%;
    height: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
}

.chat-container {
    width: 100%;
    max-width: 650px;
    height: 500px;
    max-height: 500px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.chat-header {
    background: linear-gradient(135deg, #1d0c46, #6b5b7a);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.chat-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
}

.chat-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
    margin: 0;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f8f9fa;
    min-height: 0;
    max-height: calc(500px - 120px);
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    animation: messageSlideIn 0.3s ease-out;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.message.user .message-avatar {
    background: #1d0c46;
    color: white;
}

.message.bot .message-avatar {
    background: #CAA968;
    color: white;
}

.message-content {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.4;
}

.message.user .message-content {
    background: #1d0c46;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    max-width: 80%;
}

.typing-dots {
    display: flex;
    gap: 0.25rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #CAA968;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

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

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

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

.chat-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: #1d0c46;
}

.send-button {
    width: 36px;
    height: 36px;
    background: #1d0c46;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.send-button:hover {
    background: #2a1a5e;
    transform: scale(1.05);
}

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

/* Analytics Results */
.analytics-results {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.6;
}

.analytics-header {
    font-weight: 700;
    color: #1d0c46;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-align: center;
    border-bottom: 2px solid #CAA968;
    padding-bottom: 0.5rem;
}

.analytics-results p {
    margin-bottom: 1rem;
    color: #333;
}

.analytics-results strong {
    color: #1d0c46;
    font-weight: 600;
}

.analytics-results ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.analytics-results li {
    margin-bottom: 0.5rem;
    color: #555;
}

.analytics-results li strong {
    color: #1d0c46;
    font-weight: 600;
}

/* Custom Scrollbar */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #CAA968;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #1d0c46;
}

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

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Medium screens optimization */
@media (max-width: 900px) {
    .chat-container {
        max-width: 600px;
    }
}

/* Mobile optimization */
@media (max-width: 768px) {
    .chatbot-interface {
        padding: 0.75rem;
        min-height: 360px;
    }
    
    .chat-container {
        max-width: 100%;
        height: 450px;
        max-height: 450px;
    }
    
    .chat-messages {
        max-height: calc(450px - 100px);
    }
    
    .chat-header {
        padding: 0.75rem;
    }
    
    .chat-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .chat-title {
        font-size: 0.8rem;
    }
    
    .chat-subtitle {
        font-size: 0.7rem;
    }
    
    .chat-messages {
        padding: 0.75rem;
        gap: 0.6rem;
    }
    
    .message-content {
        font-size: 0.75rem;
        padding: 0.6rem 0.8rem;
    }
    
    .chat-input-container {
        padding: 0.75rem;
    }
    
    .chat-input {
        font-size: 0.75rem;
        padding: 0.6rem 0.8rem;
    }
    
    .send-button {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .analytics-results {
        padding: 1rem;
        font-size: 0.75rem;
    }
    
    .analytics-header {
        font-size: 0.9rem;
        margin-bottom: 0.875rem;
    }
    
    .analytics-results p {
        margin-bottom: 0.875rem;
    }
    
    .analytics-results ul {
        margin-bottom: 0.875rem;
        padding-left: 1.25rem;
    }
    
    .analytics-results li {
        margin-bottom: 0.4rem;
    }
}

@media (max-width: 480px) {
    .chatbot-interface {
        padding: 0.5rem;
        min-height: 340px;
    }
    
    .chat-container {
        height: 400px;
        max-height: 400px;
    }
    
    .chat-messages {
        max-height: calc(400px - 90px);
    }
    
    .chat-header {
        padding: 0.6rem;
    }
    
    .chat-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }
    
    .chat-title {
        font-size: 0.75rem;
    }
    
    .chat-subtitle {
        font-size: 0.65rem;
    }
    
    .chat-messages {
        padding: 0.6rem;
        gap: 0.5rem;
    }
    
    .message-content {
        font-size: 0.7rem;
        padding: 0.5rem 0.7rem;
    }
    
    .chat-input-container {
        padding: 0.6rem;
    }
    
    .chat-input {
        font-size: 0.7rem;
        padding: 0.5rem 0.7rem;
    }
    
    .send-button {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    
    .analytics-results {
        padding: 0.75rem;
        font-size: 0.7rem;
    }
    
    .analytics-header {
        font-size: 0.85rem;
        margin-bottom: 0.75rem;
    }
    
    .analytics-results p {
        margin-bottom: 0.75rem;
    }
    
    .analytics-results ul {
        margin-bottom: 0.75rem;
        padding-left: 1rem;
    }
    
    .analytics-results li {
        margin-bottom: 0.3rem;
    }
}
