/* Chat Widget Styles */
.wprai-chat-widget {
    position: fixed !important;
    bottom: 70px !important;
    right: 20px !important;
    z-index: 999999 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.wprai-chat-button {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease;
    position: relative !important;
    border: none !important;
    padding: 0 !important;
}

.wprai-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;
}

.wprai-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

.wprai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wprai-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wprai-chat-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wprai-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wprai-chat-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.wprai-chat-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wprai-chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    display: inline-block;
}

.wprai-chat-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.wprai-chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.wprai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wprai-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.wprai-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wprai-message-bot {
    align-self: flex-start;
}

.wprai-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.wprai-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 14px;
}

.wprai-message-bot .wprai-message-content {
    background: white;
    color: #2d3748;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wprai-message-user .wprai-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.wprai-message-content p {
    margin: 0;
    white-space: pre-wrap;
}

.wprai-message-content a {
    color: inherit;
    text-decoration: underline;
}

.wprai-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.wprai-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e0;
    animation: typing 1.4s infinite;
}

.wprai-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.wprai-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.wprai-chat-input-wrapper {
    background: white;
    border-top: 1px solid #e2e8f0;
}

.wprai-quick-replies {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-bottom: 1px solid #e2e8f0;
}

.wprai-quick-replies::-webkit-scrollbar {
    height: 4px;
}

.wprai-quick-reply {
    padding: 8px 12px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    color: #4a5568;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.wprai-quick-reply:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.wprai-chat-input {
    display: flex;
    padding: 16px;
    gap: 12px;
    align-items: center;
}

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

.wprai-chat-input input:focus {
    border-color: #667eea;
}

.wprai-send-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wprai-send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.wprai-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .wprai-chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 80px;
    }

    .wprai-chat-button {
        width: 56px;
		margin-bottom:60px !important;
		margin-right:-5px !important;
        height: 56px;
    }

}