#pec-chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

#pec-chat-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #4F46E5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

#pec-chat-bubble:hover {
    transform: scale(1.05);
}

#pec-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

#pec-chat-header {
    padding: 15px;
    background-color: #4F46E5;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

#pec-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

#pec-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9fafb;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pec-message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.pec-user-message {
    align-self: flex-end;
    background-color: #4F46E5;
    color: white;
    border-bottom-right-radius: 2px;
}

.pec-bot-message {
    align-self: flex-start;
    background-color: #e5e7eb;
    color: #1f2937;
    border-bottom-left-radius: 2px;
}

.pec-feedback {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    justify-content: flex-end;
}

.pec-feedback-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.pec-feedback-btn:hover {
    color: #4F46E5;
}

.pec-feedback-btn.active {
    color: #4F46E5;
}

.pec-voted .pec-feedback-btn {
    cursor: default;
}

#pec-chat-input-area {
    padding: 15px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    background: white;
}

#pec-chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    outline: none;
}

#pec-chat-input:focus {
    border-color: #4F46E5;
}

#pec-chat-send {
    background-color: #4F46E5;
    color: white;
    border: none;
    border-radius: 6px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 16px;
}

#pec-chat-send i {
    pointer-events: none;
}

#pec-chat-send:hover {
    background-color: #4338ca;
}

#pec-chat-send:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

.pec-typing span {
    display: inline-block;
    animation: pec-typing 1.4s infinite ease-in-out both;
    margin: 0 2px;
    font-size: 20px;
    line-height: 10px;
}

.pec-typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.pec-typing span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes pec-typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    #pec-chat-window {
        width: calc(100vw - 40px);
        right: 0;
    }
}