/* AquaPiscine AI Chat Widget - Styles */

/* Chat Bubble Container */
#aqua-chat-bubble-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Live Support Label */
#aqua-live-support-label {
    background: white;
    color: #0099FF;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.5s ease, float 3s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Chat Bubble (Balon Floating) */
#aqua-chat-bubble {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0099FF 0%, #0077CC 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 153, 255, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

#aqua-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 153, 255, 0.6);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(0, 153, 255, 0.4); }
    50% { box-shadow: 0 4px 30px rgba(0, 153, 255, 0.7); }
}

/* Notification Badge */
#aqua-chat-bubble .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

/* Chat Window */
#aqua-chat-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

#aqua-chat-window.hidden {
    display: none;
}

#aqua-chat-window.minimized {
    height: 60px;
}

/* Chat Header */
.aqua-chat-header {
    background: linear-gradient(135deg, #0099FF 0%, #0077CC 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.aqua-chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 16px;
}

.aqua-chat-header-buttons {
    display: flex;
    gap: 8px;
}

.aqua-chat-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.aqua-chat-header button:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

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

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

/* Message Bubble */
.aqua-message {
    display: flex;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

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

.aqua-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.aqua-message-user .aqua-message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.aqua-message-assistant .aqua-message-avatar {
    background: linear-gradient(135deg, #0099FF 0%, #0077CC 100%);
}

.aqua-message-content {
    flex: 1;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    line-height: 1.5;
    font-size: 14px;
    color: #333;
}

.aqua-message-user .aqua-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Product Cards */
.aqua-product-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
    display: flex;
    gap: 12px;
    transition: all 0.2s;
}

.aqua-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.aqua-product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.aqua-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.aqua-product-name {
    font-weight: 600;
    font-size: 13px;
    color: #1a1a1a;
    line-height: 1.3;
}

.aqua-product-price {
    color: #0099FF;
    font-weight: 700;
    font-size: 15px;
}

.aqua-product-stock {
    color: #0099FF;
    font-size: 12px;
}

.aqua-product-link {
    display: inline-block;
    background: #0099FF;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
    align-self: flex-start;
    transition: background 0.2s;
}

.aqua-product-link:hover {
    background: #0077CC;
}

/* Typing Indicator */
.aqua-typing {
    display: flex;
    gap: 4px;
    padding: 12px;
}

.aqua-typing span {
    width: 8px;
    height: 8px;
    background: #0099FF;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Input */
.aqua-chat-input {
    padding: 16px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

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

.aqua-chat-input input:focus {
    border-color: #0099FF;
}

.aqua-chat-input button {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #0099FF 0%, #0077CC 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.aqua-chat-input button:hover {
    transform: scale(1.1);
}

.aqua-chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #aqua-chat-window {
        width: calc(100% - 20px);
        height: calc(100% - 100px);
        bottom: 10px;
        right: 10px;
        left: 10px;
        border-radius: 12px;
    }

    #aqua-chat-bubble-container {
        bottom: 15px;
        right: 15px;
    }

    #aqua-chat-bubble {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    #aqua-live-support-label {
        font-size: 12px;
        padding: 6px 12px;
    }

    .aqua-chat-messages {
        padding: 12px;
    }

    .aqua-product-card {
        flex-direction: column;
    }

    .aqua-product-image {
        width: 100%;
        height: 120px;
    }
}

/* Welcome Message */
.aqua-welcome {
    background: linear-gradient(135deg, #0099FF 0%, #0077CC 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 12px;
}

.aqua-welcome h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.aqua-welcome p {
    margin: 0;
    font-size: 13px;
    opacity: 0.9;
}
