/* ============================================
   MODULES/CHAT_FLOATING_V2.CSS
   Floating chat WON AI bubble (SMACSS module)
   AD LASER WON — SMACSS Modular V2
   Generated: 18 Mei 2026
   PATENT RULE Compliance
   ============================================ */

.bubble-card { 
    background: var(--bg-luar); 
    border-radius: 24px;
    padding: 16px 12px; /* POLISHED: kurangi side padding biar foto lebih lebar */
    margin-bottom: 24px; /* POLISHED: lebih rapat */
    box-shadow: var(--shadow); 
    border: 1px solid rgba(232, 224, 212, 0.6); /* POLISHED: coklat soft */
    text-align: center;
    position: relative; 
}

#chatWindow { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: var(--bg-halaman); /* POLISHED: krem hangat */
    z-index: 10000; 
    flex-direction: column; 
}

.chat-header { 
    background: linear-gradient(135deg, var(--won-dark) 0%, #006b54 100%); /* POLISHED: hijau WON gradient - AI = workshop online berbicara */
    padding: 20px; 
    font-family: 'Segoe UI', sans-serif;
    font-weight: 800; 
    color: #ffffff; /* POLISHED: white text */
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
}

.chat-header-avatar {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--won-dark); /* POLISHED: hijau WON */
    font-size: 18px;
    position: relative;
}

.chat-header-avatar::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #25D366;
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.chat-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-header-name {
    font-size: 15px;
    font-weight: 800;
}

.chat-header-status {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.85;
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-body { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 15px; }

.chat-footer { padding: 20px; }

.floating-chat-container { 
    position: fixed; 
    bottom: 80px; /* FIX: 24px → 80px, naik supaya tidak nutupin slider */
    right: 16px; /* FIX: 20px → 16px (sedikit lebih ke pinggir) */
    display: flex; 
    flex-direction: column; 
    align-items: flex-end; 
    z-index: 9999;
    transition: opacity 0.3s, transform 0.3s; /* POLISHED: smooth fade */
}

.floating-chat-container.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.ai-bubble { 
    background: #ffffff; 
    color: var(--won-dark); /* POLISHED: hijau WON - "WON sedang ngomong" */
    padding: 10px 16px; 
    border-radius: 18px 18px 4px 18px; 
    font-family: 'Segoe UI', sans-serif;
    font-size: 12px; 
    font-weight: 600; 
    margin-bottom: 10px; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
    border: 1px solid rgba(232, 224, 212, 0.8); /* POLISHED: krem-coklat soft */
    max-width: 220px;
    line-height: 1.4;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.ai-bubble:hover { transform: translateY(-2px); }

.floating-chat-icon { 
    width: 56px; 
    height: 56px; 
    background: linear-gradient(135deg, var(--won-dark) 0%, #006b54 100%); /* POLISHED: hijau WON gradient - AI = workshop online berbicara */
    border-radius: 50%; 
    box-shadow: 0 6px 16px rgba(0, 77, 64, 0.35); /* POLISHED: glow hijau WON */
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: #ffffff; 
    font-size: 22px; 
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 2px solid #ffffff; /* POLISHED: white ring */
}

.floating-chat-icon:hover { 
    transform: scale(1.05); 
    box-shadow: 0 8px 20px rgba(0, 77, 64, 0.45);
}

.floating-chat-icon::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #25D366; /* WA green = online */
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.3);
    animation: pulse-online 2s infinite;
}
