/* ==========================================================
   eTalk WebRTC Widget
========================================================== */

/* ==========================================================
   Floating Phone Button
========================================================== */

#phoneButton{
    position:fixed;
    right:18px;
    bottom:65px;

    width:70px;
    height:70px;

    display:flex;
    justify-content:center;
    align-items:center;

    background:#3b9b35;
    color:#fff;

    border:none;
    border-radius:50%;

    cursor:pointer;
    overflow:visible;

    z-index:999999999;

    box-shadow:0 10px 30px rgba(0,0,0,.25);

    transition:
        transform .25s ease,
        background .25s ease,
        box-shadow .25s ease;
}

/* Echo Waves */
#phoneButton::before,
#phoneButton::after{
    content:"";
    position:absolute;
    inset:0;

    border-radius:50%;
    background:rgba(59,155,53,.35);

    z-index:-1;
    pointer-events:none;
}

#phoneButton::before{
    animation:wave1 3s infinite;
}

#phoneButton::after{
    animation:wave2 3s infinite;
}

/* Hover */
#phoneButton:hover{
    background:#2f872d;
    transform:translateY(-4px);
    box-shadow:0 15px 35px rgba(0,0,0,.30);
}

#phoneButton:active{
    transform:scale(.95);
}

#phoneButton i{
    font-size:30px;
    line-height:1;
}

/* ==========================================================
   Popup
========================================================== */

#callPopup{
    position:fixed;
    right:20px;
    bottom:110px;

    width:360px;

    display:none;

    z-index:999999998;

    animation:popupShow .35s ease;
}

@keyframes popupShow{

    from{
        opacity:0;
        transform:translateY(25px);
    }

    to{
        opacity:1;
        transform:translateY(0);
    }

}

/* ==========================================================
   Idle Echo Animation
========================================================== */

@keyframes wave1{

    0%,72%{
        transform:scale(1);
        opacity:0;
    }

    76%{
        opacity:.45;
    }

    92%{
        transform:scale(1.8);
        opacity:0;
    }

    100%{
        transform:scale(1.8);
        opacity:0;
    }

}

@keyframes wave2{

    0%,80%{
        transform:scale(1);
        opacity:0;
    }

    84%{
        opacity:.30;
    }

    100%{
        transform:scale(2.3);
        opacity:0;
    }

}

/* ==========================================================
   Card
========================================================== */

.card{
    border:none;
    border-radius:24px;
    overflow:hidden;

    box-shadow:0 25px 60px rgba(0,0,0,.15);
}

.card-header{
    background:#3b9b35;
    color:#fff;

    padding:18px;

    font-weight:600;
}

.card-body{
    background:#fff;
}

/* ==========================================================
   Avatar
========================================================== */

.avatar{
    width:90px;
    height:90px;

    margin:auto;

    display:flex;
    justify-content:center;
    align-items:center;

    border-radius:50%;

    background:#dff6dd;

    color:#3b9b35;

    font-size:42px;
}

.call-status{
    color:#3b9b35;
    font-weight:600;
}

/* ==========================================================
   Buttons
========================================================== */

.btn-answer{
    background:#22c55e;
    color:#fff;
    border:none;
}

.btn-answer:hover{
    background:#16a34a;
}

.btn-reject{
    background:#ef4444;
    color:#fff;
    border:none;
}

.btn-reject:hover{
    background:#dc2626;
}

/* ==========================================================
   Round Icons
========================================================== */

.icon-btn{
    width:44px;
    height:44px;

    display:flex;
    justify-content:center;
    align-items:center;

    border-radius:50%;

    background:#f3f4f6;

    cursor:pointer;

    transition:all .25s ease;
}

.icon-btn:hover{
    background:#3b9b35;
    color:#fff;
}

/* ==========================================================
   Large Desktop
========================================================== */

@media (min-width:1400px){

    #callPopup{
        width:420px;
    }

}

/* ==========================================================
   Laptop
========================================================== */

@media (max-width:1200px){

    #callPopup{
        width:360px;
    }

}

/* ==========================================================
   Tablet
========================================================== */

@media (max-width:991px){

    #phoneButton{
        width:65px;
        height:65px;

        right:20px;
        bottom:20px;
    }

    #phoneButton i{
        font-size:28px;
    }

    #callPopup{
        width:380px;

        right:15px;
        bottom:100px;
    }

}

/* ==========================================================
   Mobile
========================================================== */

@media (max-width:576px){

    #phoneButton{

        width:60px;
        height:60px;

        right:15px;
        bottom:calc(15px + env(safe-area-inset-bottom));

        border-radius:30px;
    }

    #phoneButton i{
        font-size:26px;
    }

    #callPopup{

        left:10px;
        right:10px;

        width:auto;

        bottom:90px;
    }

    .card{
        border-radius:20px;
    }

    .card-header{
        padding:15px;
        font-size:15px;
    }

    .card-body{
        padding:20px !important;
    }

    .avatar{
        width:75px;
        height:75px;
        font-size:36px;
    }

}

/* ==========================================================
   Very Small Phones
========================================================== */

@media (max-width:400px){

    #phoneButton{

        right:12px;
        bottom:calc(12px + env(safe-area-inset-bottom));

    }

    #callPopup{

        left:0;
        right:0;
        bottom:0;

        width:100%;
    }

    .card{

        min-height:100vh;

        border-radius:20px 20px 0 0;

    }

}