.wlp-avatar-chatbot-container {
    position: relative;
    display: inline-block;
    max-width: 300px;
    font-family: inherit;
    margin: 20px 0;
}

.wlp-avatar-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wlp-avatar-img {
    width: 150px;
    height: 150px; /* Force fixed height for consistent sizing */
    object-fit: contain; /* Ensure the GIF is not distorted */
    border-radius: 10px;
    z-index: 2;
    transition: opacity 0.3s ease-in-out; /* For smooth switching */
}

.wlp-avatar-fade-out {
    opacity: 0;
}

.wlp-speech-bubble {
    position: absolute;
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 3px solid #333;
    border-radius: 25px;
    padding: 15px 20px;
    margin-bottom: 5px;
    min-width: 160px;
    max-width: 250px;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
    z-index: 10;
    text-align: center;
    font-size: 15px;
    line-height: 1.4;
    color: #333;
    animation: fadeInBubble 0.3s ease-in-out;
}

.wlp-speech-pointer {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 15px solid #333;
}

.wlp-speech-pointer::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid #fff;
}

.wlp-chat-interface {
    margin-top: 15px;
    width: 100%;
}

#wlp-avatar-form {
    display: flex;
    gap: 10px;
    background: #f5f5f5;
    padding: 8px 15px;
    border-radius: 30px;
    border: 2px solid #ddd;
    transition: border-color 0.3s;
}

#wlp-avatar-form:focus-within {
    border-color: #333;
}

#wlp-avatar-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 5px;
    outline: none;
    font-size: 14px;
    width: 100%;
}

#wlp-avatar-send {
    background: #fed500;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    min-width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    padding: 0;
}

#wlp-avatar-send:hover {
    background: #fef64e;
    transform: scale(1.05);
}

#wlp-avatar-send:active {
    transform: scale(0.95);
}

.wlp-is-thinking {
    opacity: 0.7;
    cursor: not-allowed !important;
}

.wlp-contact-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.wlp-contact-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    color: #666;
    padding: 4px 10px;
    border-radius: 15px;
    background: #f0f0f0;
    transition: background 0.2s, color 0.2s;
}

.wlp-contact-btn svg {
    opacity: 0.7;
}

.wlp-contact-btn:hover {
    background: #e0e0e0;
    color: #333;
}

.wlp-contact-btn:hover svg {
    opacity: 1;
}

@keyframes fadeInBubble {
    from {
        opacity: 0;
        transform: translate(-50%, 15px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

@keyframes wlpPulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

.wlp-typing {
    animation: wlpPulse 1s infinite;
    font-style: italic;
    color: #888;
}

/* Modal Overlay */
.wlp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.wlp-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    position: relative;
    width: 95%;
    max-width: 920px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0,0,0,0.4);
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}

.wlp-modal-content::-webkit-scrollbar {
    width: 6px;
}

.wlp-modal-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

.wlp-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: #333;
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    z-index: 10001;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pipedrive Styles Provided by User */
.pipedrive-form-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 20px 16px;
  box-sizing: border-box;
}

.pipedrive-form-container {
  width: 100%;
  max-width: 900px;
}

.pipedrive-form-container iframe {
  width: 100% !important;
  max-width: 100% !important;
  border: none;
}

@media (max-width: 1024px) {
  .pipedrive-form-container {
    max-width: 700px;
  }
}

@media (max-width: 768px) {
  .pipedrive-form-wrapper {
    padding: 16px 12px;
  }
  .pipedrive-form-container {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .pipedrive-form-wrapper {
    padding: 12px 10px;
  }
}