.aipc-chat-container {
    position: fixed;
    z-index: 9999 !important;
}

.aipc-chat-button {
    position: fixed;
    z-index: 9998 !important;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0073aa;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.4);
    transition: all 0.3s ease;
}

.aipc-chat-button:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.5);
}

.aipc-chat-button svg {
    width: 24px;
    height: 24px;
}

.aipc-chat-popup {
    display: none;
    position: fixed;
    width: 380px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    overflow: hidden;
    z-index: 9999 !important;
}

.aipc-chat-popup.active {
    display: flex;
}

.aipc-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #3d3d3d 0%, #000 100%);
    color: white;
}

.aipc-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.aipc-close-button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.aipc-close-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.aipc-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f5f5f5;
    min-height: 200px;
    max-height: calc(100vh - 250px);
}

.aipc-message {
    margin-bottom: 15px;
    animation: slideIn 0.3s ease;
}

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

.aipc-message-content {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

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

.aipc-user-message {
    text-align: right;
}

.aipc-user-message .aipc-message-content {
    background: #0073aa;
    color: white;
    border-bottom-right-radius: 4px;
}

.aipc-chat-input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

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

.aipc-chat-input:focus {
    border-color: #0073aa;
}

.aipc-send-button {
    background: #0073aa;
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.aipc-send-button:hover {
    background: #005a87;
    transform: scale(1.05);
}

.aipc-send-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: scale(1);
}

.aipc-loading {
    position: absolute;
    bottom: 70px;
    left: 20px;
    background: white;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.aipc-loading-dots {
    display: flex;
    gap: 4px;
}

.aipc-loading-dots span {
    width: 8px;
    height: 8px;
    background: #0073aa;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.aipc-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.aipc-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@media (max-width: 480px) {
    .aipc-chat-popup {
        width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 80px) !important;
    }
    
    .aipc-chat-messages {
        padding: 15px;
        max-height: calc(100vh - 200px);
    }
    
    .aipc-chat-header {
        padding: 15px;
    }
    
    .aipc-chat-header h3 {
        font-size: 16px;
    }
    
    .aipc-chat-input-container {
        padding: 12px;
    }
    
    .aipc-chat-input {
        font-size: 16px;
    }
    
    .aipc-message-content {
        max-width: 85%;
        font-size: 14px;
    }
    
    .aipc-chat-button span {
        display: none;
    }
    
    .aipc-chat-button {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }
    
    .aipc-loading {
        bottom: 60px;
        left: 15px;
    }
}
