#wpqa-chatbot-widget {
    position: fixed;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#wpqa-chatbot-widget.wpqa-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

#wpqa-chatbot-widget.wpqa-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.wpqa-widget-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--wpqa-theme-color, #0073aa);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wpqa-widget-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.wpqa-widget-container {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#wpqa-chatbot-widget.wpqa-widget-open .wpqa-widget-container {
    display: flex;
}

#wpqa-chatbot-widget.wpqa-widget-open .wpqa-widget-button {
    display: none;
}

.wpqa-widget-header {
    background: var(--wpqa-theme-color, #0073aa);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wpqa-widget-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.wpqa-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.wpqa-close-btn:hover {
    opacity: 1;
}

.wpqa-widget-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9f9f9;
}

.wpqa-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wpqa-message {
    display: flex;
    gap: 10px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.wpqa-user-message .wpqa-message-content {
    background: var(--wpqa-theme-color, #0073aa);
    color: #fff;
    border-radius: 18px 18px 4px 18px;
    max-width: 75%;
}

.wpqa-bot-message .wpqa-message-content {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 18px 18px 18px 4px;
    max-width: 85%;
}

.wpqa-message-content {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
}

.wpqa-message-content p:first-child {
    margin-top: 0;
}

.wpqa-message-content p:last-child {
    margin-bottom: 0;
}

.wpqa-suggestions {
    margin-top: 16px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.wpqa-suggestions-title {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
}

.wpqa-suggestions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wpqa-suggestion-item {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.wpqa-suggestion-item:hover {
    background: var(--wpqa-theme-color, #0073aa);
    color: #fff;
    border-color: var(--wpqa-theme-color, #0073aa);
}

.wpqa-feedback-buttons {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.wpqa-feedback-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.wpqa-feedback-btn:hover {
    background: #f5f5f5;
}

.wpqa-feedback-btn.active {
    background: var(--wpqa-theme-color, #0073aa);
    color: #fff;
    border-color: var(--wpqa-theme-color, #0073aa);
}

.wpqa-widget-footer {
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.wpqa-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wpqa-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.wpqa-input:focus {
    border-color: var(--wpqa-theme-color, #0073aa);
}

.wpqa-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wpqa-theme-color, #0073aa);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.wpqa-send-btn:hover {
    transform: scale(1.1);
}

.wpqa-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wpqa-loading {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wpqa-theme-color, #0073aa);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .wpqa-widget-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: 10px;
    }
    
    #wpqa-chatbot-widget.wpqa-position-bottom-left .wpqa-widget-container {
        left: 10px;
        right: auto;
    }
}
