/* /widget/chat-widget.css - CocoPredict Dynamic Contact Widget */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

.chat-widget {
    position: fixed;
    z-index: 99999999 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    bottom: 30px;
    right: 30px;
}

/* ==========================================
   MAIN ROTATING BUTTON
   ========================================== */
.chat-main-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    min-width: 130px;
    justify-content: center;
    animation: buttonPulse 2s ease-in-out infinite;
    background: #0088cc; 
}

@keyframes buttonPulse {
    0%, 100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); transform: scale(1); }
    50% { box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25); transform: scale(1.02); }
}

.chat-main-button:hover { 
    transform: scale(1.04); 
}

.chat-main-button:active { 
    transform: scale(0.95); 
}

.main-button-icon { 
    font-size: 18px; 
    width: 28px; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-button-text { 
    font-size: 14px; 
    font-weight: 600; 
    white-space: nowrap;
}

.main-button-dot {
    width: 7px; 
    height: 7px; 
    background: #06D6A0; 
    border-radius: 50%;
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse { 
    0%, 100% { opacity: 1; transform: scale(1); } 
    50% { opacity: 0.5; transform: scale(0.8); } 
}

/* ==========================================
   DESKTOP POPUP
   ========================================== */
.chat-options-popup {
    position: absolute; 
    bottom: 75px; 
    right: 0; 
    width: 300px;
    background: white; 
    border-radius: 16px; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    overflow: hidden; 
    z-index: 10001; 
    animation: slideUp 0.3s ease;
}

@keyframes slideUp { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.popup-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc; 
    border-bottom: 1px solid #eef2f6; 
    font-weight: 600; 
    font-size: 12px; 
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-close { 
    background: none; 
    border: none; 
    color: #94a3b8; 
    font-size: 16px; 
    cursor: pointer; 
    transition: 0.2s;
}

.popup-close:hover { 
    color: #0F172A; 
}

.popup-options { 
    padding: 8px; 
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.popup-option {
    display: flex; 
    align-items: center; 
    gap: 12px; 
    width: 100%;
    padding: 10px 12px; 
    border: none; 
    background: white; 
    border-radius: 10px; 
    cursor: pointer;
    transition: 0.2s;
}

.popup-option:hover { 
    background: #f8fafc; 
}

.popup-option .option-icon { 
    width: 36px; 
    height: 36px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    font-size: 16px;
    flex-shrink: 0;
}

.option-info { 
    flex: 1; 
    text-align: left; 
}

.option-name { 
    font-size: 13px; 
    font-weight: 600; 
    display: block; 
    color: #0F172A; 
    text-transform: capitalize;
}

.option-desc { 
    font-size: 11px; 
    color: #94a3b8; 
}

.popup-option i.fa-chevron-right {
    color: #cbd5e1;
    font-size: 12px;
}

/* ==========================================
   MOBILE MODAL
   ========================================== */
.chat-options-modal { 
    position: fixed; 
    inset: 0; 
    z-index: 999999999 !important; 
    display: none; 
    align-items: flex-end; 
    justify-content: center; 
}

.modal-overlay-bg { 
    position: absolute; 
    inset: 0; 
    background: rgba(0,0,0,0.5); 
    backdrop-filter: blur(4px); 
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content-wrapper {
    position: relative; 
    width: 100%; 
    max-width: 500px; 
    background: white;
    border-radius: 24px 24px 0 0; 
    padding: 0 20px 24px; 
    z-index: 2; 
    animation: slideUpModal 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpModal { 
    from { transform: translateY(100%); } 
    to { transform: translateY(0); } 
}

.modal-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 18px 0 14px;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    font-size: 15px;
    color: #0F172A;
}

.modal-close-btn { 
    background: none; 
    border: none; 
    color: #94a3b8; 
    font-size: 20px; 
    cursor: pointer; 
}

.modal-options { 
    padding: 14px 0; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.modal-option {
    display: flex; 
    align-items: center; 
    gap: 14px; 
    padding: 14px 16px;
    border: 2px solid #f1f5f9; 
    border-radius: 14px; 
    background: white; 
    cursor: pointer;
    transition: 0.2s;
}

.modal-option:hover {
    border-color: #e2e8f0;
    background: #fafbfc;
}

.modal-option:active {
    transform: scale(0.98);
}

.modal-option .option-icon { 
    width: 44px; 
    height: 44px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    font-size: 20px; 
    flex-shrink: 0;
}

/* ==========================================
   RESPONSIVE / MOBILE POSITIONING
   ========================================== */
@media (max-width: 768px) {
    .chat-widget { 
        /* Set to 60px to sit comfortably above the bottom nav bar */
        bottom: 60px !important; 
        right: 16px !important; 
    }
    
    .chat-main-button { 
        padding: 10px 18px !important; 
        min-width: 110px !important; 
    }

    .chat-options-popup { 
        display: none !important; 
    }

    .modal-content-wrapper {
        padding: 0 16px 20px !important;
    }

    .modal-option {
        padding: 12px 14px !important;
    }

    .modal-option .option-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
    }
}

/* ==========================================
   BOTTOM LEFT VARIANT (If needed)
   ========================================== */
.chat-widget.bottom-left {
    bottom: 30px;
    left: 30px;
    right: auto; 
}

@media (max-width: 768px) {
    .chat-widget.bottom-left {
        bottom: 60px !important;
        left: 16px !important;
        right: auto !important;
    }
}