:root {
    --phone-widget-bg: rgba(0, 31, 63, 0.4);
    --phone-widget-text: #e2e8f0;
    --phone-widget-call-status: #3b82f6;
    --phone-widget-button-bg: #1e293b;
    --phone-widget-button-hover: #2563eb;
    --phone-widget-shadow: rgba(0, 0, 0, 0.1);
    --phone-widget-hangup: #86868b;
    --phone-widget-avatar-bg: #0074D9;

}


body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
}

.ai-call-widget {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}

.widget-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    margin: 50px auto 0;
    padding: 20px;
    overflow: visible;
}

.widget-background {
    display: none;
}

.phone-widget {
    position: relative;
    margin: 0 auto;
    width: 450px;
    height: 78px;
    border-radius: 39px;
    background-color: var(--phone-widget-bg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease, transform 0.5s ease, box-shadow 0.3s ease;
    overflow: hidden;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.2);
}

.phone-widget.open {
    width: 100%;
    max-width: 450px;
    height: 78px;
    border-radius: 39px;
}

.phone-icon, .call-button, .hangup-button {
    color: var(--phone-widget-text);
    font-size: 31px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
}

.phone-icon {
    background-color: var(--phone-widget-bg);
    width: 100%;
    height: 100%;
}

.call-button, .hangup-button, .mute-button {
    position: relative;
    overflow: hidden;
}


.call-button::after, .hangup-button::after, .mute-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.call-button:hover::after, .hangup-button:hover::after, .mute-button:hover::after {
    opacity: 1;
    animation: ripple 1.5s linear infinite;
}

@keyframes ripple {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.hangup-button {
    background-color: transparent;
    order: 4;
    flex: 0 0 auto;
}

.call-info {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 0 13px;
    box-sizing: border-box;
}

.mute-button {
    order: 1;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}


.mute-button svg {
    width: 31px;
    height: 31px;
    fill: var(--phone-widget-text);
}

.caller-details {
    order: 2;
    flex: 0 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 78px;
    text-align: center;
    margin: 0 13px;
    font-size: 20px;
    font-weight: 600;
}


.call-status {
    color: var(--phone-widget-call-status);
    font-size: 22px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    transition: #00d5ff 0.3s ease;
    user-select: none;
}

.call-status:hover {
    color: #00d5ff; /* Increased opacity for more visible effect */
}

/* Adjust for mobile */
@media (max-width: 768px) {
    .call-status {
        font-size: 16px;
        padding: 0 15px;
    }
}


.call-timer {
    font-size: 19px;
    color: var(--phone-widget-text);
    font-weight: 400;
}

.audio-wave {
    order: 3;
    flex: 1 1 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-width: 0;
    margin: 0 13px;
    transform: translateX(-13%);
}

.wave-left, .wave-right {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.wave-bar {
    width: 4px;
    height: 39px;
    margin: 0 3px;
    background-color: var(--phone-widget-call-status);
    transition: height 0.1s ease-in-out, transform 0.1s ease-in-out;
    transform: scaleY(0.1);
    transform-origin: center;
}

.wave-left .wave-bar {
    background-color: var(--phone-widget-call-status);
}

.wave-right .wave-bar {
    background-color: var(--phone-widget-avatar-bg);
}

.wave-left .wave-bar:nth-child(1) { --i: 1; }
.wave-left .wave-bar:nth-child(2) { --i: 2; }
.wave-left .wave-bar:nth-child(3) { --i: 3; }
.wave-left .wave-bar:nth-child(4) { --i: 4; }
.wave-right .wave-bar:nth-child(1) { --i: 5; }
.wave-right .wave-bar:nth-child(2) { --i: 6; }
.wave-right .wave-bar:nth-child(3) { --i: 7; }
.wave-right .wave-bar:nth-child(4) { --i: 8; }

.call-button, .hangup-button {
    order: 4;
    flex: 0 0 auto;
}

.phone-icon svg, .call-button svg, .hangup-button svg {
    width: 31px;
    height: 31px;
    fill: var(--phone-widget-text);
}

@media (max-width: 768px) {
    .widget-container {
        padding: 10px;
        margin-top: 30px;
    }

    .phone-widget {
        width: 100%;
        max-width: 300px;
        height: 60px;
        border-radius: 30px;
    }

    .phone-widget.open {
        height: 60px;
        border-radius: 30px;
    }

    .phone-icon, .call-button, .hangup-button {
        font-size: 24px;
        width: 40px;
        height: 40px;
    }

    .mute-button {
        width: 40px;
        height: 40px;
    }

    .mute-button svg {
        width: 24px;
        height: 24px;
    }

    .caller-details {
        min-width: 60px;
        margin: 0 8px;
        font-size: 16px;
    }

    .call-status {
        font-size: 16px;
    }

    .call-timer {
        font-size: 14px;
    }

    .audio-wave {
        margin: 0 8px;
        transform: translateX(-8%);
    }

    .wave-bar {
        width: 3px;
        height: 30px;
        margin: 0 2px;
    }

    .phone-icon svg, .call-button svg, .hangup-button svg {
        width: 24px;
        height: 24px;
    }
}