/* Chatbot-specific styles */

.chatbot-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bot-avatar {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-info {
    flex: 1;
}

.bot-info h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
}

.bot-info .status {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.reset-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.chat-messages {
    background: #f8fafc;
    min-height: 500px;
    max-height: 600px;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    scroll-behavior: smooth;
}

.message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    justify-content: flex-start;
}

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

.message-avatar {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.message-content {
    max-width: 70%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    line-height: 1.6;
    word-wrap: break-word;
}

.bot-message .message-content {
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-radius: 12px 12px 12px 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 4px 12px;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.chat-input-container {
    background: white;
    padding: 1rem 1.5rem;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quick-reply-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-reply-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

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

.input-wrapper input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.send-btn:active {
    transform: translateY(0);
}

.send-icon {
    font-size: 1.2rem;
}

.summary-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.summary-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close-summary {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-summary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.summary-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.summary-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.75rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .chatbot-container {
        padding: 0;
    }

    .chatbot-header {
        border-radius: 0;
        padding: 1rem;
    }

    .bot-avatar {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }

    .bot-info h2 {
        font-size: 1.2rem;
    }

    .chat-messages {
        min-height: 400px;
        max-height: calc(100vh - 300px);
        padding: 1rem;
    }

    .message-content {
        max-width: 85%;
        padding: 0.75rem 1rem;
    }

    .chat-input-container {
        border-radius: 0;
        position: sticky;
        bottom: 0;
    }

    .quick-reply-btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .input-wrapper input {
        font-size: 0.9rem;
    }

    .send-btn {
        padding: 0.75rem 1rem;
    }

    .send-btn span:first-child {
        display: none;
    }

    .summary-panel {
        width: 100%;
    }

    .reset-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

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

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

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading animation */
.typing-indicator {
    display: flex;
    gap: 0.3rem;
    padding: 0.5rem;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

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

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

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}
