/* ProQualify AI Chat Widget Styles - WhatsApp Style */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

#proqualify-chat-widget-container {
    font-family: 'Inter', sans-serif;
    color: #333;
}

/* Floating Toggle Button */
#proqualify-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #25D366;
    /* WhatsApp Green */
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}

#proqualify-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
}

#proqualify-chat-btn::after {
    content: "💬";
    font-size: 30px;
    color: white;
    text-align: center;
    line-height: 60px;
}

/* Main Chatbot Window */
#pq-chatbot {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    /* pure white */
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 2147483647;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#pq-chatbot.pq-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Chat Header */
#pq-header {
    background: #075E54;
    /* WhatsApp Dark Green */
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.pq-avatar {
    width: 40px;
    height: 40px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin-right: 12px;
}

.pq-header-info {
    flex: 1;
}

.pq-name {
    font-size: 16px;
    font-weight: 600;
}

.pq-status {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

#pq-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 8px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

#pq-close:hover {
    opacity: 1;
}

/* Messages Area */
#pq-messages {
    flex: 1;
    padding: 20px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    /* subtle pattern overlay could go here securely */
}

.pq-msg-wrapper {
    display: flex;
    width: 100%;
}

.pq-msg {
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 14.5px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.pq-bot {
    background: white;
    margin-right: auto;
    border-top-left-radius: 4px;
}

.pq-user {
    background: #DCF8C6;
    /* WhatsApp User Green */
    margin-left: auto;
    border-top-right-radius: 4px;
}

/* Input Area */
#pq-input-area {
    display: flex;
    padding: 12px;
    background: #F0F0F0;
    align-items: center;
    gap: 10px;
}

#pq-input {
    flex: 1;
    padding: 14px 18px;
    border: none;
    border-radius: 24px;
    outline: none;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#pq-input:disabled {
    background: #e9e9e9;
}

#pq-send {
    background: #25D366;
    color: white;
    border: none;
    min-width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#pq-send:hover:not(:disabled) {
    background: #128C7E;
}

#pq-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Typing Indicator Animation */
.pq-typing {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 14px 16px;
    width: fit-content;
}

.pq-dot {
    width: 6px;
    height: 6px;
    background-color: #999;
    border-radius: 50%;
    animation: pq-bounce 1.4s infinite ease-in-out both;
}

.pq-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.pq-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes pq-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #pq-chatbot {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    #proqualify-chat-btn {
        bottom: 16px;
        right: 16px;
    }
}