/**
 * GloowUp Widget Styles - Avatars with rounded corners, AI badge at top
 * IMPORTANT: Avatars are NOT circles (border-radius: 8px, not 50%)
 */

/* Widget Button - Centered at Bottom */
.gloowup-chat-toggle {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999990;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: none;
    padding: 8px 16px 8px 8px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.gloowup-chat-toggle:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

/* Avatars Container */
.gloowup-avatars {
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 4px;
}

/* CRITICAL: Avatars with ROUNDED CORNERS - NOT circles */
.gloowup-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px; /* NOT 50% - this is the key difference */
    border: 2px solid #fff;
    object-fit: cover;
    margin-left: -10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.gloowup-avatar:first-child {
    margin-left: 0;
}

/* Avatar rotations - tilted effect */
.gloowup-avatar-1 {
    transform: rotate(-8deg);
    z-index: 3;
}

.gloowup-avatar-2 {
    transform: rotate(0deg);
    z-index: 2;
}

.gloowup-avatar-3 {
    transform: rotate(8deg);
    z-index: 1;
}

/* AI Badge - positioned at TOP RIGHT of avatar group */
.gloowup-ai-badge {
    position: absolute;
    top: -2px;
    right: -6px;
    background: #000;
    color: #fff;
    font-size: 8px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 4px;
    z-index: 10;
    letter-spacing: 0.5px;
}

/* Button Text */
.gloowup-btn-text {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
}

/* Arrow Icon */
.gloowup-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

/* Overlay */
.gloowup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Popup */
.gloowup-popup {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 90vh;
    max-height: 750px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.gloowup-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.gloowup-popup-close:hover {
    background: rgba(0,0,0,0.7);
}

#gloowup-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .gloowup-chat-toggle {
        bottom: 15px;
        padding: 6px 12px 6px 6px;
    }
    
    .gloowup-avatar {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }
    
    .gloowup-btn-text {
        font-size: 13px;
    }
    
    .gloowup-btn-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .gloowup-popup {
        max-width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}

/* ==================== DIAGNOSTIC TRIGGER BUTTON (from AI) ==================== */
.gloowup-diagnostic-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    margin: 8px 0;
    background: #1D1D1F;
    border: none;
    border-radius: 20px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}
.gloowup-diagnostic-trigger-btn:hover {
    background: #000000;
}
