/* Popup overlay */
#callPopupOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 0;
}

#callPopupOverlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup card - mobile phone size */
.call-popup-card {
     background: #1a237e;
    background: linear-gradient(145deg, #1a237e, #0d47a1);
    width: 100%;
    max-width: 420px;
    height: 100vh;
    max-height: 780px;
    border-radius: 0;
    padding: 2rem 1.8rem 2rem;
    box-shadow: none;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.18, 0.89, 0.32, 1.28), opacity 0.35s ease;
    opacity: 0;
    border: none;
    position: relative;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    margin: 0;
}

#callPopupOverlay.active .call-popup-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close button */
.call-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.15);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    z-index: 10;
}
.call-close-btn:hover {
    background: rgba(255,255,255,0.25);
    opacity: 1;
}

/* Caller card - all content */
.caller-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    justify-content: center;
    gap: 0.2rem;
}

/* Top: Truecaller brand */
.call-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.call-brand {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}
.call-brand i {
    font-style: normal;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.1rem 0.6rem;
    border-radius: 30px;
    font-size: 0.6rem;
    margin-left: 0.3rem;
}

.call-version {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.8rem;
    border-radius: 30px;
    font-size: 0.6rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

/* Incoming call row */
.call-incoming-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    margin-top: 0.1rem;
    margin-bottom: 0.2rem;
}

.call-incoming-label {
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.3px;
}

.call-phone-number-large {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 1rem;
    border-radius: 40px;
    font-feature-settings: "tnum";
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Divider */
.call-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.4rem 0;
}

/* Verified badge */
.call-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.2rem 1rem 0.2rem 0.8rem;
    border-radius: 30px;
    letter-spacing: 0.3px;
    margin: 0.2rem 0;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.call-verified-badge::before {
    content: "✓";
    font-weight: 700;
    font-size: 0.8rem;
    color: #ffffff;
}

/* Avatar - large circular */
.call-avatar-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.3rem 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    background: #ffffff;
    flex-shrink: 0;
}
.call-avatar-ring img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Contact name - large font */
.call-contact-name {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.2;
    word-break: break-word;
    margin: 0.1rem 0;
}

/* Blue badge with white text */
.call-blue-badge {
    display: inline-block;
     background: #0d47a1;  /* Darker blue */
    color: #ffffff;
    padding: 0.3rem 1.5rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin: 0.2rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Expertise lines - white text */
.call-expertise {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.3rem 0.6rem;
    margin: 0.1rem 0;
    font-size: 0.8rem;
    color: #ffffff;
}
.call-expertise .expertise-item {
    font-weight: 400;
    opacity: 0.9;
}

/* Address line */
.call-address {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.2rem 0;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.call-address::before {
    content: "📍";
    font-size: 0.7rem;
    filter: grayscale(0.5);
}

/* Bottom: Two up arrow keys and green receive icon */
.call-bottom-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.2rem;
    width: 100%;
}

/* Up arrow keys */
.call-arrow-keys {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    
    
}
.call-arrow-key {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
}
.call-arrow-key:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}
.call-arrow-key:active {
    transform: scale(0.95);
}

/* Green receive button - round with phone receiver */
.call-receive-round {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: #ffffff;  /* White background */
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    color: #34c759;  /* Green icon color */
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    animation: pulseRing 1.5s infinite ease-in-out;
    margin-top: 0.2rem;
}
/* Make the phone icon green */
.call-receive-round .phone-icon {
    color: #34c759;  /* Green color */
    width: 32px;
    height: 32px;
    display: block;
}

/* Hover effect */
.call-receive-round:hover {
    background: #f0f0f0;
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}
/* Pulse animation */
@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.3); }
    50% { box-shadow: 0 0 0 15px rgba(52, 199, 89, 0.08); }
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.3); }
}

.call-receive-round:active {
    transform: scale(0.92);
}



@keyframes pulseRing {
    0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4); }
    50% { box-shadow: 0 0 0 15px rgba(52, 199, 89, 0.1); }
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4); }
}

/* Status text (hidden in this design, but keep for compatibility) */
.call-status-text {
    display: none;
}

/* Footer - TallyPlus */
.call-footer-note {
    margin-top: 0.8rem;
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    letter-spacing: 0.3px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.6rem;
    display: flex;
    justify-content: center;
    width: 100%;
}
.call-footer-note .truecaller-id {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
}
.call-footer-note .truecaller-id i {
    font-style: normal;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.1rem 0.6rem;
    border-radius: 30px;
    font-size: 0.5rem;
}

/* ========== MOBILE RESPONSIVE ========== */

/* Full screen on mobile devices */
@media (max-width: 768px) {
    .call-popup-card {
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 1.5rem 1.2rem;
        max-width: 100%;
    }
    .call-avatar-ring {
        width: 85px;
        height: 85px;
    }
    .call-contact-name {
        font-size: 1.7rem;
    }
    .call-phone-number-large {
        font-size: 1.2rem;
        padding: 0.1rem 0.8rem;
    }
    .call-receive-round {
        width: 65px;
        height: 65px;
        font-size: 2rem;
    }
    .call-arrow-key {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    .call-bottom-actions {
        gap: 1.5rem;
    }
    .call-close-btn {
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    .call-blue-badge {
        font-size: 0.7rem;
        padding: 0.2rem 1rem;
    }
    .call-expertise {
        font-size: 0.7rem;
    }
    .call-address {
        font-size: 0.65rem;
    }
}

/* Small phones (<= 400px) */
@media (max-width: 400px) {
    .call-popup-card {
        padding: 1rem 0.9rem;
    }
    .call-avatar-ring {
        width: 70px;
        height: 70px;
    }
    .call-contact-name {
        font-size: 1.4rem;
    }
    .call-phone-number-large {
        font-size: 1rem;
        padding: 0.1rem 0.6rem;
    }
    .call-incoming-label {
       font-size: 0.6rem;
         padding: 0.15rem 0.7rem;
    }
    .call-verified-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.7rem;
    }
    .call-receive-round {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }
    .call-arrow-key {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    .call-bottom-actions {
        gap: 1rem;
        margin-top: 0.8rem;
    }
    .call-blue-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.8rem;
    }
    .call-expertise {
        font-size: 0.6rem;
        gap: 0.2rem 0.4rem;
    }
    .call-address {
        font-size: 0.55rem;
    }
    .call-brand {
        font-size: 0.75rem;
    }
    .call-version {
        font-size: 0.5rem;
        padding: 0.1rem 0.6rem;
    }
    .call-close-btn {
        top: 10px;
        right: 10px;
        width: 24px;
        height: 24px;
        font-size: 0.85rem;
    }
}

/* Very small phones (<= 350px) */
@media (max-width: 350px) {
    .call-popup-card {
        padding: 0.8rem 0.6rem;
    }
    .call-avatar-ring {
        width: 60px;
        height: 60px;
    }
    .call-contact-name {
        font-size: 1.2rem;
    }
    .call-phone-number-large {
        font-size: 0.85rem;
    }
    .call-receive-round {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    .call-arrow-key {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .call-bottom-actions {
        gap: 0.8rem;
    }
    .call-blue-badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.6rem;
    }
    .call-expertise {
        font-size: 0.55rem;
    }
    .call-address {
        font-size: 0.5rem;
    }
}

/* Desktop/Laptop - show as phone-sized card */
@media (min-width: 769px) {
    .call-popup-card {
        width: 380px;
        height: 720px;
        border-radius: 40px;
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
        max-height: 90vh;
        padding: 2rem 1.8rem;
    }
    .call-popup-card {
        animation: desktopShadow 3s infinite ease-in-out;
    }
    @keyframes desktopShadow {
        0% { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
        50% { box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); }
        100% { box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
    }
}

/* Landscape mode on phones */
@media (max-height: 500px) and (orientation: landscape) {
    .call-popup-card {
        padding: 0.8rem 1.2rem;
        justify-content: flex-start;
        padding-top: 1rem;
    }
    .call-avatar-ring {
        width: 55px;
        height: 55px;
        margin: 0.1rem 0;
    }
    .call-contact-name {
        font-size: 1.2rem;
    }
    .call-phone-number-large {
        font-size: 0.9rem;
        padding: 0.05rem 0.6rem;
    }
    .call-receive-round {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
    }
    .call-arrow-key {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .call-bottom-actions {
        gap: 1rem;
        margin-top: 0.6rem;
    }
    .call-blue-badge {
        font-size: 0.6rem;
        padding: 0.15rem 0.8rem;
    }
    .call-expertise {
        font-size: 0.6rem;
    }
    .call-address {
        font-size: 0.55rem;
    }
    .call-close-btn {
        top: 8px;
        right: 8px;
        width: 22px;
        height: 22px;
        font-size: 0.8rem;
    }
    .call-brand {
        font-size: 0.7rem;
    }
    .call-version {
        font-size: 0.5rem;
        padding: 0.05rem 0.5rem;
    }
    .call-verified-badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.6rem;
    }
}