/* IGCS Bubble Contact - Frontend Styles */

.igcs-bubble-wrapper {
    position: fixed;
    bottom: 30px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.igcs-bubble-wrapper.igcs-bubble-bottom-right {
    right: 30px;
}

.igcs-bubble-wrapper.igcs-bubble-bottom-left {
    left: 30px;
}

/* Main Bubble */
.igcs-bubble-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--igcs-main-bg-color), var(--igcs-main-bg-color) 60%, rgba(255, 255, 255, 0.3));
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 -2px 5px rgba(0, 0, 0, 0.1),
        inset 0 2px 5px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.igcs-bubble-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.igcs-bubble-main:hover {
    transform: scale(1.1);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.25),
        0 3px 10px rgba(0, 0, 0, 0.2),
        inset 0 -2px 5px rgba(0, 0, 0, 0.1),
        inset 0 2px 5px rgba(255, 255, 255, 0.3);
}

.igcs-bubble-main:hover::before {
    opacity: 1;
}

.igcs-bubble-main.active {
    transform: rotate(45deg) scale(1.05);
}

.igcs-bubble-main .dashicons {
    color: var(--igcs-main-icon-color);
    font-size: 28px;
    width: 28px;
    height: 28px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.igcs-bubble-main:hover .dashicons {
    transform: scale(1.1);
}

/* Bubble Items Container */
.igcs-bubble-items-container {
    position: absolute;
    bottom: 70px;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.igcs-bubble-wrapper.igcs-bubble-bottom-right .igcs-bubble-items-container {
    right: 5px;
    align-items: flex-end;
}

.igcs-bubble-wrapper.igcs-bubble-bottom-left .igcs-bubble-items-container {
    left: 5px;
    align-items: flex-start;
}

.igcs-bubble-items-container.active {
    opacity: 1;
    visibility: visible;
}

/* Individual Bubble Item Wrapper */
.igcs-bubble-item-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: calc(var(--item-index) * 0.08s);
    position: relative;
}

.igcs-bubble-items-container.active .igcs-bubble-item-wrapper {
    opacity: 1;
    transform: scale(1);
}

/* Bottom-right: tooltip on left, bubble on right */
.igcs-bubble-wrapper.igcs-bubble-bottom-right .igcs-bubble-item-wrapper {
    flex-direction: row;
}

/* Bottom-left: bubble on left, tooltip on right */
.igcs-bubble-wrapper.igcs-bubble-bottom-left .igcs-bubble-item-wrapper {
    flex-direction: row-reverse;
}

/* Individual Bubble Item */
.igcs-bubble-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--igcs-contact-bg-color), var(--igcs-contact-bg-color) 60%, rgba(255, 255, 255, 0.25));
    box-shadow: 
        0 3px 12px rgba(0, 0, 0, 0.18),
        0 2px 6px rgba(0, 0, 0, 0.12),
        inset 0 -2px 4px rgba(0, 0, 0, 0.08),
        inset 0 2px 4px rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.igcs-bubble-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.igcs-bubble-item:hover {
    transform: scale(1.15);
    box-shadow: 
        0 5px 18px rgba(0, 0, 0, 0.22),
        0 3px 8px rgba(0, 0, 0, 0.16),
        inset 0 -2px 4px rgba(0, 0, 0, 0.08),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.igcs-bubble-item:hover::before {
    opacity: 1;
}

.igcs-bubble-item .dashicons {
    color: var(--igcs-contact-icon-color);
    font-size: 24px;
    width: 24px;
    height: 24px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.igcs-bubble-item:hover .dashicons {
    transform: scale(1.1);
}

/* Tooltip */
.igcs-bubble-tooltip {
    background: var(--igcs-contact-tooltip-color);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.igcs-bubble-tooltip::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
}

/* Bottom-right: tooltip on left of bubble, arrow on right side pointing right */
.igcs-bubble-wrapper.igcs-bubble-bottom-right .igcs-bubble-tooltip::before {
    right: -12px;
    border-left-color: var(--igcs-contact-tooltip-color);
}

/* Bottom-left: tooltip on right of bubble, arrow on left side pointing left */
.igcs-bubble-wrapper.igcs-bubble-bottom-left .igcs-bubble-tooltip::before {
    left: -12px;
    border-right-color: var(--igcs-contact-tooltip-color);
}

.igcs-bubble-item-wrapper:hover .igcs-bubble-tooltip {
    transform: scale(1.05);
    box-shadow: 
        0 5px 15px rgba(0, 0, 0, 0.2),
        0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .igcs-bubble-wrapper {
        bottom: 20px;
    }
    
    .igcs-bubble-wrapper.igcs-bubble-bottom-right {
        right: 20px;
    }
    
    .igcs-bubble-wrapper.igcs-bubble-bottom-left {
        left: 20px;
    }
    
    .igcs-bubble-main {
        width: 55px;
        height: 55px;
    }
    
    .igcs-bubble-main .dashicons {
        font-size: 26px;
        width: 26px;
        height: 26px;
    }
    
    .igcs-bubble-item {
        width: 45px;
        height: 45px;
    }
    
    .igcs-bubble-item .dashicons {
        font-size: 22px;
        width: 22px;
        height: 22px;
    }
    
    .igcs-bubble-tooltip {
        font-size: 13px;
        padding: 6px 12px;
    }
}

/* Accessibility - Focus states */
.igcs-bubble-main:focus,
.igcs-bubble-item:focus {
    outline: 3px solid rgba(37, 211, 102, 0.5);
    outline-offset: 2px;
}
