/* Caller Info Popup Styling */

/* Enhance the caller identity overlay hover effect */
#callerIdentityOverlay {
    transition: all 0.2s ease !important;
}

#callerIdentityOverlay:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
    background: rgba(0, 0, 0, 0.9) !important;
}

/* Pulse animation for info icon */
@keyframes pulse-info-icon {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

#callerIdentityOverlay:hover .fa-info-circle {
    animation: pulse-info-icon 1s ease-in-out infinite;
}

/* Popup animation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#callerInfoPopup {
    animation: slideInUp 0.3s ease-out;
}

/* Custom scrollbar for popup */
#callerInfoPopup::-webkit-scrollbar {
    width: 6px;
}

#callerInfoPopup::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 3px;
}

#callerInfoPopup::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.8);
    border-radius: 3px;
}

#callerInfoPopup::-webkit-scrollbar-thumb:hover {
    background: rgba(107, 114, 128, 0.9);
}

/* Loading spinner animation enhancement */
#callerInfoLoading .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Key info items hover effect */
#keyInfoList > div {
    transition: all 0.2s ease;
    padding: 0.25rem 0.5rem;
    margin: 0 -0.5rem;
    border-radius: 0.25rem;
}

#keyInfoList > div:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: translateX(4px);
}

/* Refresh button animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

button[onclick="refreshCallerInfo()"] .fa-sync-alt {
    transition: transform 0.3s ease;
}

button[onclick="refreshCallerInfo()"]:hover .fa-sync-alt {
    transform: rotate(180deg);
}

button[onclick="refreshCallerInfo()"]:active .fa-sync-alt {
    animation: rotate 0.5s ease-in-out;
}

/* Close button enhancement */
button[onclick="closeCallerInfo()"] {
    opacity: 0.6;
    transition: all 0.2s ease;
}

button[onclick="closeCallerInfo()"]:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Summary content animation */
#aiSummaryContent {
    position: relative;
    overflow: hidden;
}

#aiSummaryContent::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.1) 50%, transparent 100%);
    animation: shimmer 2s ease-out;
}

@keyframes shimmer {
    0% {
        right: -100%;
    }
    100% {
        right: 100%;
    }
}

/* Timestamp styling */
#summaryTimestamp {
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}