.namechat p {
    color: white;
}

.namechat h6 {
    color: white;
}

.namechat p {
    margin: 0 !important;
    display: block; /* Ensures it sits directly under the name */
}


.namechat {
    display: flex;
    flex-direction: column;
    justify-content: center;
}


/* Chat Icon */
.aisap-chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 999998;
}

.aisap-chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.aisap-notification-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    border: 2px solid white;
    display: none;
}

.aisap-notification-dot.active {
    display: block;
}

/* Chat Widget */
#aisap-chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
    transition: opacity 0.3s, transform 0.3s;
    transform-origin: bottom right;
}

#aisap-chat-widget.aisap-widget-open {
    display: flex;
    animation: aisap-slide-in 0.3s ease;
}

@keyframes aisap-slide-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aisap-chat-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #075e54;
    color: white;
}

.aisap-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 2px solid white;
}

.aisap-chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.aisap-chat-header p {
    margin: 4px 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.aisap-close {
    margin-left: auto;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.aisap-chat-messages {
    height: 320px;
    overflow-y: auto;
    padding: 16px;
    background: #e5ddd5;
    display: flex;
    flex-direction: column;
    scroll-behavior: smooth;
}

.aisap-message {
    max-width: 80%;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
    font-size: 14px;
    position: relative;
    animation: aisap-message-appear 0.2s ease;
}

@keyframes aisap-message-appear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.aisap-message.user {
    align-self: flex-end;
    background: #dcf8c6;
    border-bottom-right-radius: 4px;
}

.aisap-message.assistant {
    align-self: flex-start;
    background: white;
    border-bottom-left-radius: 4px;
}

.aisap-typing {
    align-self: flex-start;
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
}

.aisap-typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #888;
    margin-right: 4px;
    animation: aisap-typing 1.4s infinite;
}

.aisap-typing span:nth-child(2) { animation-delay: 0.2s; }
.aisap-typing span:nth-child(3) { animation-delay: 0.4s; margin-right: 0; }

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

.aisap-chat-input-area {
    display: flex;
    padding: 12px;
    background: #f0f0f0;
    border-top: 1px solid #ddd;
}

.aisap-chat-input-area textarea {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px 14px;
    border-radius: 24px;
    resize: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    max-height: 80px;
    min-height: 20px;
    transition: border-color 0.2s;
}

.aisap-chat-input-area textarea:focus {
    border-color: #075e54;
}

#aisap-send {
    background: #075e54;
    color: white;
    border: none;
    border-radius: 24px;
    padding: 10px 20px;
    margin-left: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

#aisap-send:hover {
    background: #054c44;
}

.aisap-whatsapp-locked {
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.aisap-whatsapp-locked p {
    margin: 0 0 12px;
    font-size: 14px;
    color: #333;
}

.aisap-whatsapp-btn {
    display: inline-block;
    background: #25D366;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.aisap-whatsapp-btn:hover {
    background: #128C7E;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .aisap-chat-icon {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    #aisap-chat-widget {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
    }

    .aisap-chat-messages {
        height: 280px;
    }
}


/* Better message formatting */
.aisap-message.assistant {
    line-height: 1.6;
}

.aisap-message.assistant br {
    display: block;
    content: "";
    margin-top: 5px;
}

/* Locked state improvements */
.aisap-whatsapp-locked {
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
    border-top: 1px solid #e0e0e0;
}

.aisap-whatsapp-locked p {
    margin: 0 0 15px;
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.aisap-whatsapp-btn {
    display: inline-block;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.aisap-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

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

/* Icon locked state */
.aisap-chat-icon.locked {
    background: #128C7E;
}





/* New Contact Button Styles */
.aisap-contact-button-container {
    text-align: center;
    margin: 10px 0;
}

.aisap-contact-btn {
    display: inline-block;
    background: #075e54;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aisap-contact-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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




/* Two‑button container after warm‑up */
.aisap-buttons-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
}

/* Small WhatsApp button (green) */
.aisap-whatsapp-btn-small {
    display: inline-flex;
    align-items: center;
    background: #25D366;
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
    border: none;
    cursor: pointer;
}

.aisap-whatsapp-btn-small:hover {
    background: #128C7E;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.aisap-whatsapp-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    filter: brightness(0) invert(1); /* makes the icon white */
}

/* Contact button (dark green) – already defined, but ensure it matches the new container */
.aisap-contact-btn {
    display: inline-flex;
    align-items: center;
    background: #075e54;
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aisap-contact-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}






/* Persistent buttons container */
.aisap-persistent-buttons {
    padding: 10px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
    text-align: center;
}

.aisap-buttons-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.aisap-whatsapp-btn-small {
    display: inline-flex;
    align-items: center;
    background: #25D366;
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
    border: none;
    cursor: pointer;
}

.aisap-whatsapp-btn-small:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.aisap-whatsapp-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    filter: brightness(0) invert(1);
}

.aisap-contact-btn {
    display: inline-flex;
    align-items: center;
    background: #075e54;
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.aisap-contact-btn:hover {
    background: #054c44;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}