/* Women's Innovations Chatbot - Floating Widget Styles */

/* Chatbot Toggle Button (Small Circle) */
.chatbot-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 9999;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.chatbot-toggle:active {
    transform: scale(0.95);
}

.chatbot-toggle .chat-icon {
    font-size: 28px;
    color: white;
    transition: transform 0.3s ease;
}

.chatbot-toggle .close-icon {
    display: none;
    font-size: 24px;
    color: white;
}

.chatbot-toggle.active .chat-icon {
    display: none;
}

.chatbot-toggle.active .close-icon {
    display: block;
}

/* Chatbot Window Container */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    height: 520px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chatbot-container.open {
    display: flex;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-header-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.chatbot-header-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chatbot-header-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

/* Chatbot Messages Area */
.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual Message Bubbles */
.chat-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.bot {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: typing 1.4s 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%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chatbot Input Area */
.chatbot-input-area {
    padding: 16px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e9ecef;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chatbot-input::placeholder {
    color: #adb5bd;
}

.chatbot-send-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

.chatbot-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chatbot-send-btn i {
    font-size: 18px;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.welcome-message h4 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 16px;
}

.welcome-message p {
    margin: 0;
    font-size: 13px;
}

/* Suggested Questions */
.suggested-questions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px 16px;
}

.suggested-question {
    padding: 10px 16px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    font-size: 13px;
    color: #667eea;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.suggested-question:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Scrollbar Styling */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 90px;
        height: 70vh;
        max-height: 500px;
    }

    .chatbot-toggle {
        right: 16px;
        bottom: 16px;
        width: 56px;
        height: 56px;
    }
}

/* Error Message Styling */
.chat-message.error {
    background: #fee2e2;
    color: #dc2626;
    border-left: 3px solid #dc2626;
}

/* Step/Status Message Styling */
.chat-message.step {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0369a1;
    border-left: 3px solid #0ea5e9;
    font-size: 13px;
    padding: 10px 14px;
    opacity: 0.9;
}

.chat-message.step::before {
    content: "⏳ ";
}

/* Markdown Formatting Styles */
.chat-message.bot .chat-heading {
    margin: 12px 0 8px 0;
    font-weight: 600;
    color: #4a5568;
}

.chat-message.bot h2.chat-heading {
    font-size: 16px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 6px;
}

.chat-message.bot h3.chat-heading {
    font-size: 15px;
}

.chat-message.bot h4.chat-heading {
    font-size: 14px;
    color: #667eea;
    margin-top: 16px;
}

.chat-message.bot .chat-heading:first-child {
    margin-top: 0;
}

.chat-message.bot ul.chat-list {
    margin: 8px 0;
    padding-left: 20px;
    list-style: none;
}

.chat-message.bot ul.chat-list li {
    position: relative;
    margin: 6px 0;
    padding-left: 8px;
}

.chat-message.bot ul.chat-list li::before {
    content: "•";
    position: absolute;
    left: -12px;
    color: #667eea;
    font-weight: bold;
}

.chat-message.bot strong {
    font-weight: 600;
    color: #2d3748;
}

.chat-message.bot em {
    font-style: italic;
    color: #4a5568;
}
