/* My Asian Nanny Chatbot Styles */
#man-chatbot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 50;
}

/* Chat Toggle Button */
#man-chat-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: linear-gradient(to right, #fbb7d7, #f8b0c0);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
}

#man-chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 105, 180, 0.3);
}

.man-chat-avatar img {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    z-index: 2;
}

.man-chat-emoticon {
    position: absolute;
    top: -5px;
    right: -5px;
    background: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid white;
    z-index: 9999;
}

/* Chat Window */
#man-chat-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 420px;
    height: 600px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Desktop optimizations */
@media (min-width: 769px) {
    #man-chat-window {
        width: 420px;
        height: 600px;
        min-height: 550px;
    }

    .man-chat-messages {
        padding: 18px;
        gap: 12px;
    }

    .man-chat-bubble {
        max-width: 85%;
        padding: 14px 18px;
        font-size: 15px;
        line-height: 1.5;
    }
}

#man-chat-window.hidden {
    display: none;
}

/* Chat Header */
.man-chat-header {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.man-chat-title {
    font-weight: 600;
    font-size: 16px;
}

.man-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.man-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat Messages */
.man-chat-messages {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.man-chat-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

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

.man-chat-bubble {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
}

.man-chat-user .man-chat-bubble {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border-bottom-right-radius: 4px;
}

.man-chat-bot .man-chat-bubble {
    background: #f5f5f5;
    color: #333;
    border-bottom-left-radius: 4px;
}

.man-chat-bubble.man-typing {
    background: #e0e0e0;
    color: #666;
    font-style: italic;
}

/* Quick Start Buttons */
.man-chat-quick-start {
    padding: 10px 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    border-top: 1px solid #eee;
    max-height: 180px;
    overflow-y: auto;
}

.man-chat-quick-start::-webkit-scrollbar {
    width: 4px;
}

.man-chat-quick-start::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.man-chat-quick-start::-webkit-scrollbar-thumb {
    background: #ff69b4;
    border-radius: 10px;
}

.man-chat-quick-start::-webkit-scrollbar-thumb:hover {
    background: #ff1493;
}

.man-quick-btn {
    background: linear-gradient(135deg, #7ad7f0, #00bcd4);
    color: white;
    border: none;
    padding: 8px 5px;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: Poppins, sans-serif !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.man-quick-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(122, 215, 240, 0.3);
}

/* Follow-up Questions */
.man-chat-followup {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
}

.man-followup-title {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.man-followup-btn {
    background: #7ad7f0;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 11px;
    cursor: pointer;
    margin-right: 6px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.man-followup-btn:hover {
    background: #00bcd4;
    transform: translateY(-1px);
}

/* Chat Input */
.man-chat-input-container {
    display: flex;
    padding: 15px;
    border-top: 1px solid #eee;
    gap: 10px;
}

#man-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

#man-chat-input:focus {
    border-color: #ff69b4;
}

#man-chat-send {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#man-chat-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}

/* Trust Badges */
.man-chat-trust-badges {
    padding: 10px 15px;
    text-align: center;
    font-size: 10px;
    color: #666;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

/* Desktop Optimization */
@media (min-width: 1200px) {
    #man-chat-window {
        width: 480px;
        height: 650px;
    }

    .man-chat-messages {
        padding: 20px;
        gap: 14px;
    }

    .man-chat-bubble {
        max-width: 90%;
        padding: 16px 20px;
        font-size: 16px;
        line-height: 1.6;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #man-chat-window {
        width: 95%;
        height: 75vh;
        bottom: 10vh;
        right: 2.5%;
        left: 2.5%;
        max-height: 600px;
    }

    #man-chat-toggle {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }

    .man-chat-avatar img {
        width: 42px;
        height: 42px;
    }

    .man-chat-emoticon {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: -3px;
        right: -3px;
    }



    .man-chat-messages {
        padding: 10px;
    }

    .man-chat-input-container {
        padding: 8px;
        gap: 8px;
    }

    #man-chat-input {
        padding: 8px 15px;
        font-size: 13px;
    }

    #man-chat-send {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        padding: 0;
        font-size: 0;
        flex-shrink: 0;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z'/%3E%3C/svg%3E") no-repeat center/20px,
            linear-gradient(135deg, #ff69b4, #ff1493);
    }
}

/* Animations */
@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.man-chat-message {
    animation: slideInUp 0.3s ease;
}

/* Scrollbar Styling */
.man-chat-messages::-webkit-scrollbar {
    width: 4px;
}

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

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

.man-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #ff1493;
}

/* Floating Hearts Animation */
@keyframes float-hearts {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

#man-chat-toggle::before {
    content: '💕';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.5rem;
    animation: float-hearts 3s ease-in-out infinite;
    opacity: 0.7;
}

/* Hover Glow Effect */
#man-chat-toggle:hover::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.3;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}