/* ========================================
   WhatsApp Footer Widget Styles
   ======================================== */

#wc-tracker-whatsapp-footer-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* WhatsApp Icon Button */
.whatsapp-icon-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: none;
    outline: none;
}

.whatsapp-icon-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-icon-btn:active {
    transform: scale(0.98);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border: 2px solid white;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

/* WhatsApp Popup */
.whatsapp-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    max-height: 600px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-popup.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Popup Header */
.popup-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    flex-shrink: 0;
}

.popup-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.popup-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.popup-close-btn:hover {
    transform: rotate(90deg);
}

/* Popup Body */
.popup-body {
    overflow-y: auto;
    flex: 1;
    padding: 0;
}

/* Team Members List */
.team-members-list {
    padding: 10px;
}

.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.loading-spinner p {
    margin: 0;
    font-size: 14px;
}

/* Team Member Item */
.team-member-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    border: 1px solid #f0f0f0;
    gap: 12px;
}

.team-member-item:hover {
    background: #f0f8f5;
    border-color: #25D366;
    transform: translateX(4px);
}

.team-member-item:active {
    transform: translateX(2px);
}

/* Team Member Avatar */
.member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #e0e0e0;
    flex-shrink: 0;
    border: 2px solid #f0f0f0;
}

.member-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    border: 2px solid #f0f0f0;
}

/* Team Member Info */
.member-info {
    flex: 1;
    overflow: hidden;
}

.member-name {
    font-weight: 600;
    margin: 0;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-phone {
    font-size: 12px;
    color: #999;
    margin: 4px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-description {
    font-size: 11px;
    color: #bbb;
    margin: 2px 0 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* No Team Message */
.no-team-message {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-team-message p {
    margin: 0;
    font-size: 14px;
}

/* Error Message */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 10px;
    font-size: 13px;
    border: 1px solid #f5c6cb;
}

/* Scrollbar Styling */
.popup-body::-webkit-scrollbar {
    width: 6px;
}

.popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-thumb {
    background: #25D366;
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-thumb:hover {
    background: #128C7E;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #wc-tracker-whatsapp-footer-widget {
        right: 10px;
        bottom: 10px;
    }

    .whatsapp-icon-btn {
        width: 56px;
        height: 56px;
    }

    .whatsapp-popup {
        width: calc(100vw - 20px);
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
        max-width: 100vw;
    }

    .whatsapp-popup.active {
        animation: slideLandscape 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideLandscape {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .whatsapp-popup {
        background: #1e1e1e;
    }

    .team-member-item {
        border-color: #333;
    }

    .team-member-item:hover {
        background: #2a2a2a;
    }

    .member-name {
        color: #e0e0e0;
    }

    .member-phone,
    .member-description {
        color: #999;
    }

    .no-team-message {
        color: #999;
    }
}