/**
 * Chat Bubble Styles
 * 
 * @package AIShoppingHelperWoo
 */

/* Chat Bubble */
.ai-shopping-helper-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0073aa;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 8px;
    line-height: 1.2;
}

/* Bubble Icon */
.ai-sh-bubble-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.ai-sh-bubble-icon i.fa-solid.fa-robot {
    font-size: 28px;
    color: white;
    transition: transform 0.3s ease;
}

.ai-shopping-helper-bubble:hover .ai-sh-bubble-icon i.fa-solid.fa-robot {
    transform: scale(1.1);
}

/* Bubble Popup */
.ai-sh-bubble-popup {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: var(--ai-theme-color, #0073aa);
    color: var(--ai-bubble-heading-color, #ffffff);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ai-sh-bubble-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 15px;
    transform: translateX(50%);
    border: 6px solid transparent;
    border-top-color: var(--ai-theme-color, #0073aa);
}

.ai-shopping-helper-bubble:hover .ai-sh-bubble-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Position adjustments for popup */
.ai-shopping-helper-bubble[data-position="bottom-left"] .ai-sh-bubble-popup {
    right: auto;
    left: 0;
    bottom: 70px;
}

.ai-shopping-helper-bubble[data-position="bottom-left"] .ai-sh-bubble-popup::after {
    right: auto;
    left: 15px;
}

.ai-shopping-helper-bubble[data-position="top-right"] .ai-sh-bubble-popup {
    top: 70px;
    bottom: auto;
}

.ai-shopping-helper-bubble[data-position="top-right"] .ai-sh-bubble-popup::after {
    top: 100%;
    bottom: auto;
    transform: translateX(50%) rotate(180deg);
}

.ai-shopping-helper-bubble[data-position="top-left"] .ai-sh-bubble-popup {
    top: 70px;
    bottom: auto;
    right: auto;
    left: 0;
}

.ai-shopping-helper-bubble[data-position="top-left"] .ai-sh-bubble-popup::after {
    top: 100%;
    bottom: auto;
    right: auto;
    left: 15px;
    transform: translateX(50%) rotate(180deg);
}

.ai-shopping-helper-bubble[data-position="bottom-left"] {
    bottom: 20px;
    left: 20px;
    right: auto;
}

.ai-shopping-helper-bubble[data-position="top-left"] {
    top: 20px;
    left: 20px;
    right: auto;
    bottom: auto;
}

.ai-shopping-helper-bubble[data-position="top-right"] {
    top: 20px;
    right: 20px;
    left: auto;
    bottom: auto;
}

.ai-shopping-helper-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.ai-shopping-helper-bubble.ai-sh-has-notification {
    animation: ai-sh-bubble-pulse 2s infinite;
}

.ai-shopping-helper-bubble.ai-sh-notification-pulse {
    animation: ai-sh-notification-pulse 2s infinite;
}

@keyframes ai-sh-bubble-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 115, 170, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 115, 170, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 115, 170, 0);
    }
}

@keyframes ai-sh-notification-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 115, 170, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 115, 170, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 115, 170, 0);
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .ai-shopping-helper-bubble {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 10px;
    }
    
    .ai-sh-bubble-icon i.fa-solid.fa-robot {
        font-size: 24px;
    }
    
    .ai-shopping-helper-bubble[data-position="bottom-left"] {
        bottom: 15px;
        left: 15px;
        right: auto;
    }
    
    .ai-shopping-helper-bubble[data-position="top-left"] {
        top: 15px;
        left: 15px;
        right: auto;
        bottom: auto;
    }
    
    .ai-shopping-helper-bubble[data-position="top-right"] {
        top: 15px;
        right: 15px;
        left: auto;
        bottom: auto;
    }
}

/* Notification Tooltip */
.ai-sh-notification-tooltip {
    position: absolute;
    background: var(--ai-theme-color, #0073aa);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    z-index: 10001;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    animation: ai-sh-tooltip-fade-in 0.3s ease;
}

.ai-sh-notification-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--ai-theme-color, #0073aa);
}

@keyframes ai-sh-tooltip-fade-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
