/**
 * MUNDUM Voice Agent Widget Styles
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Open+Sans:wght@400;600;700&family=Lato:wght@400;700&family=Montserrat:wght@400;500;600&family=Poppins:wght@400;500;600&family=Nunito:wght@400;600;700&family=Raleway:wght@400;500;600&family=Source+Sans+Pro:wght@400;600&family=Ubuntu:wght@400;500;700&family=Merriweather:wght@400;700&family=Oswald:wght@400;500;600&family=Roboto+Condensed:wght@400;700&family=Roboto+Mono:wght@400;500&family=Rubik:wght@400;500;600&family=Work+Sans:wght@400;500;600&family=PT+Sans:wght@400;700&family=Mukta:wght@400;500;600&family=Playfair+Display:wght@400;600&family=Noto+Sans:wght@400;600&display=swap');

:root {
    --elevenlabs-primary-color: #121212;
    --elevenlabs-secondary-color: #1e1e1e;
    --elevenlabs-accent-green: #4CAF50;
    --elevenlabs-accent-red: #f44336;
    --elevenlabs-accent-blue: #2196F3;
    --elevenlabs-text-color: #ffffff;
    --elevenlabs-shadow-color: rgba(0, 0, 0, 0.5);
    --elevenlabs-widget-bg-color: #f5f5f5;
    --elevenlabs-chat-bg-color: #ffffff;
    --elevenlabs-chat-text-color: #333333;
    --elevenlabs-main-text-color: #333333;
    --elevenlabs-font-family: 'Arial, sans-serif';
    --elevenlabs-bubble-bg-color: #2196F3;
    --elevenlabs-main-font-size: 16px;
    --elevenlabs-transcript-font-size: 14px;
    --elevenlabs-agent-color: #2196F3;
    --elevenlabs-user-color: #4CAF50;
}

/* Widget Button */
.elevenlabs-widget-button {
    position: fixed;
    z-index: 999999;
    transition: all 0.3s ease;
}

.elevenlabs-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.elevenlabs-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.elevenlabs-position-top-right {
    top: 20px;
    right: 20px;
}

.elevenlabs-position-top-left {
    top: 20px;
    left: 20px;
}

.elevenlabs-widget-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--elevenlabs-bubble-bg-color, #2196F3);
    color: white;
    border: none;
    box-shadow: 0 4px 8px var(--elevenlabs-shadow-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.elevenlabs-widget-toggle:hover {
    transform: scale(1.1);
}

.elevenlabs-widget-toggle:active {
    transform: scale(0.95);
}

.elevenlabs-widget-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.elevenlabs-widget-icon svg {
    width: 28px;
    height: 28px;
}

/* Widget Container */
.elevenlabs-widget-container {
    position: fixed;
    z-index: 999998;
    width: 380px;
    max-width: 90vw;
    max-height: 90vh;
    background-color: var(--elevenlabs-widget-bg-color, #f5f5f5) !important;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px var(--elevenlabs-shadow-color);
    border-radius: 15px;
    overflow: hidden;
    font-family: var(--elevenlabs-font-family);
    font-size: var(--elevenlabs-main-font-size);
    visibility: visible !important;
    opacity: 1 !important;
    display: none; /* Hidden by default but will be shown via JavaScript */
    pointer-events: auto !important; /* Ensure click events work */
    transform: none !important; /* Prevent any transforms that might hide it */
}

/* Default positioning - will be overridden by JavaScript for dynamic positioning */
.elevenlabs-widget-container.elevenlabs-position-bottom-right {
    bottom: 90px;
    right: 20px;
}

.elevenlabs-widget-container.elevenlabs-position-bottom-left {
    bottom: 90px;
    left: 20px;
}

.elevenlabs-widget-container.elevenlabs-position-top-right {
    top: 90px;
    right: 20px;
}

.elevenlabs-widget-container.elevenlabs-position-top-left {
    top: 90px;
    left: 20px;
}

/* Close Button */
.elevenlabs-widget-close {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    z-index: 9999999 !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
}

.elevenlabs-widget-close:hover {
    background-color: rgba(0, 0, 0, 0.5) !important;
    transform: scale(1.1) !important;
}

.elevenlabs-widget-close:active {
    transform: scale(0.95) !important;
}

.elevenlabs-widget-close .elevenlabs-material-icons {
    font-size: 20px !important;
    color: white !important;
}

/* Stylish X animation for close button */
.elevenlabs-widget-close .close-x {
    position: relative !important;
    width: 16px !important;
    height: 16px !important;
}

.elevenlabs-widget-close .close-x:before,
.elevenlabs-widget-close .close-x:after {
    position: absolute !important;
    content: '' !important;
    width: 100% !important;
    height: 2px !important;
    background-color: white !important;
    top: 50% !important;
    left: 0 !important;
}

.elevenlabs-widget-close .close-x:before {
    transform: rotate(45deg) !important;
}

.elevenlabs-widget-close .close-x:after {
    transform: rotate(-45deg) !important;
}

/* Phone UI Styles (from original client) */
.elevenlabs-phone-ui {
    background: var(--elevenlabs-widget-bg-color, #f5f5f5) !important;
    background-image: var(--elevenlabs-bg-image, none);
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    padding: 12px;
    box-shadow: 0 10px 25px var(--elevenlabs-shadow-color);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.elevenlabs-phone-header {
    margin: 25px;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.elevenlabs-phone-header h1 {
    margin: 0;
    font-size: calc(var(--elevenlabs-main-font-size) * 1.3);
    font-weight: 500;
    color: var(--elevenlabs-main-text-color, #333333);
}

.elevenlabs-status {
    font-size: calc(var(--elevenlabs-main-font-size) * 0.9);
    color: var(--elevenlabs-main-text-color, #333333);
    margin: 5px;
    height: 15px;
    text-align: center;
}

.elevenlabs-timer {
    font-size: calc(var(--elevenlabs-main-font-size) * 1.5);
    font-weight: 600;
    color: var(--elevenlabs-main-text-color, #333333);
    margin: 5px;
    text-align: center;
    padding: 5px 0;
}

/* Hide error message */
.elevenlabs-error-message {
    display: none;
}

.elevenlabs-audio-wave {
    height: 80px;
    background: transparent!important;
    border-radius: 15px;
    margin: 5px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elevenlabs-audio-wave.inactive .elevenlabs-bars-container {
    opacity: 0.1;
}

.elevenlabs-audio-wave.inactive .elevenlabs-bar {
    animation-play-state: paused;
    height: 3px;
}

.elevenlabs-audio-wave .elevenlabs-bars-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 15px;
    transition: opacity 0.3s ease;
}

.elevenlabs-audio-wave.mic-active .elevenlabs-bars-container {
    display: none;
}

.elevenlabs-audio-wave .elevenlabs-bar {
    background: var(--elevenlabs-accent-blue);
    height: 30px;
    width: 3px;
    margin: 0 3px;
    border-radius: 6px;
    transform-origin: bottom;
    animation: elevenlabs-sound 1.2s ease-in-out infinite alternate;
    box-shadow: 0 0 5px rgba(33, 150, 243, 0.3);
}

/* Different animation delays for more natural movement */
.elevenlabs-audio-wave .elevenlabs-bar:nth-child(1) { animation-delay: -0.8s; }
.elevenlabs-audio-wave .elevenlabs-bar:nth-child(2) { animation-delay: -0.5s; }
.elevenlabs-audio-wave .elevenlabs-bar:nth-child(3) { animation-delay: -0.7s; }
.elevenlabs-audio-wave .elevenlabs-bar:nth-child(4) { animation-delay: -0.4s; }
.elevenlabs-audio-wave .elevenlabs-bar:nth-child(5) { animation-delay: -0.2s; animation-duration: 0.9s; }
.elevenlabs-audio-wave .elevenlabs-bar:nth-child(6) { animation-delay: -0.3s; animation-duration: 1.5s; }
.elevenlabs-audio-wave .elevenlabs-bar:nth-child(7) { animation-delay: -0.6s; }
.elevenlabs-audio-wave .elevenlabs-bar:nth-child(8) { animation-delay: -0.4s; animation-duration: 1.1s; }
.elevenlabs-audio-wave .elevenlabs-bar:nth-child(9) { animation-delay: -0.1s; }
.elevenlabs-audio-wave .elevenlabs-bar:nth-child(10) { animation-delay: -0.9s; animation-duration: 1.3s; }

@keyframes elevenlabs-sound {
    0% {
        transform: scaleY(0.2);
        opacity: 0.3;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        transform: scaleY(1);
        opacity: 0.8;
    }
}

/* Microphone Animation Styles */
.elevenlabs-mic-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.elevenlabs-mic-animation.active {
    opacity: 1;
}

/* Default Microphone Icon */
.elevenlabs-mic-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 34px;
    z-index: 10;
}

/* Pulse Animation */
.mic-animation-pulse .mic-pulse-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.mic-animation-pulse .mic-pulse-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.2;
    animation: mic-pulse 2s ease-out infinite;
}

@keyframes mic-pulse {
    0% {
        transform: scale(0.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Wave Animation */
.mic-animation-wave .mic-wave-container {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-animation-wave .mic-wave-circles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.mic-animation-wave .mic-wave-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid;
    opacity: 0;
    animation: mic-wave 2s linear infinite;
}

.mic-animation-wave .mic-wave-circle-1 {
    animation-delay: 0s;
}

.mic-animation-wave .mic-wave-circle-2 {
    animation-delay: 0.5s;
}

.mic-animation-wave .mic-wave-circle-3 {
    animation-delay: 1s;
}

@keyframes mic-wave {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Ripple Animation */
.mic-animation-ripple .mic-ripple-container {
    position: relative;
    width: 50px;
    height: 50px;
}

.mic-animation-ripple .mic-ripple-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid;
    opacity: 0;
    animation: mic-ripple 2s ease-out infinite;
}

.mic-animation-ripple .mic-ripple-circle-2 {
    animation-delay: 0.5s;
}

@keyframes mic-ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}

.elevenlabs-transcript-container {
    background-color: var(--elevenlabs-chat-bg-color, #ffffff) !important;
    color: var(--elevenlabs-chat-text-color, #333333) !important;
    border-radius: 10px;
    padding: 10px;
    margin: 15px 0;
    height: 220px;
    min-height: 220px;
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.5;
    font-family: var(--elevenlabs-font-family);
    font-size: var(--elevenlabs-transcript-font-size);
}

/* Ensure transcript text color applies to all elements inside it except user and agent specific messages */
.elevenlabs-transcript-container * {
    color: var(--elevenlabs-chat-text-color, #333333) !important;
}

/* Preserve the user and agent specific colors */
.elevenlabs-transcript-user {
    color: var(--elevenlabs-user-color, #4CAF50) !important;
}

.elevenlabs-transcript-agent {
    color: var(--elevenlabs-agent-color, #2196F3) !important;
}

.elevenlabs-transcript-container::-webkit-scrollbar {
    width: 5px;
}

.elevenlabs-transcript-container::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 10px;
}

.elevenlabs-transcript-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: none;
}

.elevenlabs-transcript-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.25);
}

.elevenlabs-transcript-message {
    margin-bottom: 8px;
    line-height: 1.4;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--elevenlabs-chat-text-color, #333333);
    font-family: var(--elevenlabs-font-family);
    font-size: var(--elevenlabs-transcript-font-size);
}

.elevenlabs-transcript-message:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.elevenlabs-controls {
    margin: 5px;
}

.elevenlabs-volume-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px;
    padding: 5px;
}

.elevenlabs-volume-icon {
    font-size: calc(var(--elevenlabs-main-font-size) * 1.1);
    color: var(--elevenlabs-main-text-color, #333333);
}

.elevenlabs-volume-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 4px;
    background: #ddd;
    outline: none;
    margin: 5px;
}

.elevenlabs-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--elevenlabs-accent-blue);
    cursor: pointer;
    transition: all 0.2s ease;
}

.elevenlabs-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.elevenlabs-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 60px;
    margin: 15px;
    padding: 0 20px;
}

.elevenlabs-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

.elevenlabs-btn-call, .elevenlabs-btn-hangup {
    position: absolute;
    left: 0;
    top: 0;
}

.elevenlabs-btn:hover {
    transform: scale(1.1);
}

.elevenlabs-btn:active {
    transform: scale(0.95);
}

.elevenlabs-btn-call {
    background: var(--elevenlabs-accent-green);
}

.elevenlabs-btn-hangup {
    background: var(--elevenlabs-accent-red);
}

.elevenlabs-btn-call.fadeout {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.elevenlabs-btn-call.fadein {
    animation: elevenlabs-fadeInButton 0.5s forwards;
}

@keyframes elevenlabs-fadeInButton {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1.2);
    }
}

.elevenlabs-btn-hangup.center {
    transform: scale(1.2);
    transition: all 0.5s ease;
}

.elevenlabs-btn-hangup.hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

/* Controls UI improvements */
.elevenlabs-buttons-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.elevenlabs-additional-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.07);
    color: var(--elevenlabs-main-text-color, #333333);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.elevenlabs-additional-btn .elevenlabs-material-icons {
    font-size: 28px;
    color: var(--elevenlabs-main-text-color, #333333);
}

.elevenlabs-additional-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.12);
}

/* Responsive styles */
@media (max-width: 480px) {
    /* Hide widget button when chat is open */
    .elevenlabs-widget-container.active ~ .elevenlabs-widget-button {
        display: none;
    }
    
    .elevenlabs-widget-container {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        border-radius: 0;
        /* Make it truly fullscreen to hide browser UI */
        z-index: 999999;
        position: fixed;
        overflow: hidden;
    }
    
    /* Apply fullscreen mode to hide browser UI */
    .elevenlabs-widget-container.active {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        overflow: auto;
        overscroll-behavior: none;
    }
    
    /* Add meta viewport tag dynamically via JS to ensure true fullscreen */
    /* This CSS class will be used as a hook for JS to add viewport meta tag */
    .elevenlabs-fullscreen-viewport {
        display: none;
    }
    
    .elevenlabs-widget-container.elevenlabs-position-bottom-right,
    .elevenlabs-widget-container.elevenlabs-position-bottom-left,
    .elevenlabs-widget-container.elevenlabs-position-top-right,
    .elevenlabs-widget-container.elevenlabs-position-top-left {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .elevenlabs-phone-ui {
        border-radius: 0;
        height: 100vh;
        padding: 15px;
    }
    
    .elevenlabs-transcript-container {
        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
        flex: 1;
    }
    
    .elevenlabs-transcript-image-container {
        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
        position: relative;
    }
    
    .elevenlabs-transcript-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .elevenlabs-widget-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .elevenlabs-buttons {
        margin-bottom: 20px;
    }
    
    .elevenlabs-btn {
        width: 70px;
        height: 70px;
    }
    
    .elevenlabs-audio-wave {
        height: 100px;
    }
    
    .elevenlabs-controls {
        display: flex;
        flex-direction: column;
        margin: 10px 5px;
    }
    
    .elevenlabs-buttons-row {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 5px 0;
        gap: 15px;
    }
    
    .elevenlabs-additional-btn {
        width: 45px;
        height: 45px;
    }
    
    .elevenlabs-additional-btn .elevenlabs-material-icons {
        font-size: 22px;
    }
    
    .elevenlabs-audio-wave {
        height: 100px;
    }
    
    .elevenlabs-controls {
        display: flex;
        flex-direction: column;
        margin: 10px 5px;
    }
    
    .elevenlabs-buttons-row {
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 5px 0;
        gap: 15px;
    }
    
    .elevenlabs-additional-btn {
        width: 45px;
        height: 45px;
    }
    
    .elevenlabs-additional-btn .elevenlabs-material-icons {
        font-size: 22px;
    }
}

/* Fix for iOS Safari viewport height issues */
@supports (-webkit-touch-callout: none) {
    .elevenlabs-widget-container {
        height: -webkit-fill-available;
        /* Fix for iOS Safari to hide browser chrome */
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
        overscroll-behavior: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .elevenlabs-phone-ui {
        height: -webkit-fill-available;
    }
    
    .elevenlabs-transcript-container {
        height: 300px !important;
        min-height: 300px !important;
        max-height: 300px !important;
        flex: 1;
    }
}

/* Portrait and landscape orientations */
@media (max-width: 480px) and (orientation: portrait) {
    .elevenlabs-widget-container {
        height: 100vh;
    }
}

@media (max-width: 480px) and (orientation: landscape) {
    .elevenlabs-widget-container {
        height: 100vh;
    }
    
    .elevenlabs-phone-ui {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .elevenlabs-phone-header {
        width: 100%;
    }
    
    .elevenlabs-transcript-container,
    .elevenlabs-transcript-image-container {
        width: 60%;
        height: 300px !important;
    }
    
    .elevenlabs-audio-wave {
        width: 35%;
        height: 100px;
    }
    
    .elevenlabs-controls {
        width: 35%;
    }
}

/* Material Icons */
.elevenlabs-material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Inline widget styles */
.elevenlabs-inline-widget {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
}

/* Bars Animation (Standard) */
.wave-animation-bars .elevenlabs-bar {
    background: var(--elevenlabs-agent-color, var(--elevenlabs-accent-blue));
    height: 32px;
    width: 5px;
    margin: 0 4px;
    border-radius: 6px;
    transform-origin: bottom;
    animation: modern-sound 1.3s ease-in-out infinite alternate;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wave-animation-bars .elevenlabs-bar:nth-child(1) { animation-delay: -1.2s; height: 15px; }
.wave-animation-bars .elevenlabs-bar:nth-child(2) { animation-delay: -0.9s; height: 25px; }
.wave-animation-bars .elevenlabs-bar:nth-child(3) { animation-delay: -0.6s; height: 35px; }
.wave-animation-bars .elevenlabs-bar:nth-child(4) { animation-delay: -0.3s; height: 20px; }
.wave-animation-bars .elevenlabs-bar:nth-child(5) { animation-delay: -0.7s; height: 30px; }
.wave-animation-bars .elevenlabs-bar:nth-child(6) { animation-delay: -1.1s; height: 18px; }
.wave-animation-bars .elevenlabs-bar:nth-child(7) { animation-delay: -0.5s; height: 28px; }
.wave-animation-bars .elevenlabs-bar:nth-child(8) { animation-delay: -0.8s; height: 22px; }
.wave-animation-bars .elevenlabs-bar:nth-child(9) { animation-delay: -0.2s; height: 33px; }
.wave-animation-bars .elevenlabs-bar:nth-child(10) { animation-delay: -1.0s; height: 16px; }

@keyframes modern-sound {
    0% { transform: scaleY(0.6); opacity: 0.6; }
    100% { transform: scaleY(1.1); opacity: 1; }
}

/* Wave Animation */
.wave-animation-wave .elevenlabs-bars-container {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.wave-animation-wave .elevenlabs-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
    left: 0;
    overflow: hidden;
}

.wave-animation-wave svg {
    width: 200%;
    height: 100%;
    animation: wave-animation 3s linear infinite;
    position: absolute;
    left: 0;
    bottom: 0;
}

@keyframes wave-animation {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Circle Animation */
.wave-animation-circle .elevenlabs-bars-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wave-animation-circle .elevenlabs-circle-container {
    position: relative;
    width: 40px;
    height: 40px;
}

.wave-animation-circle .elevenlabs-circle-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    border: 3px solid var(--elevenlabs-agent-color, var(--elevenlabs-accent-blue));
    opacity: 0;
    animation: pulse-animation 2s ease-out infinite;
}

.wave-animation-circle .elevenlabs-circle-core {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--elevenlabs-agent-color, var(--elevenlabs-accent-blue));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

@keyframes pulse-animation {
    0% {
        transform: scale(0.3);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.elevenlabs-transcript-container:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Transcript Image Container */
.elevenlabs-transcript-image-container {
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    border-radius: 10px;
    margin: 5px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
    background-color: var(--elevenlabs-chat-bg-color, #ffffff);
    position: relative;
}

.elevenlabs-transcript-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.3s ease;
}

/* Animation Options (Mic and Wave) */
.wave-animation-options,
.mic-animation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.wave-animation-option,
.mic-animation-option {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    width: 130px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.wave-animation-option:hover,
.mic-animation-option:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wave-animation-option.selected,
.mic-animation-option.selected {
    border-color: #2271b1;
    background-color: rgba(34, 113, 177, 0.05);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
}

.wave-animation-option input[type="radio"],
.mic-animation-option input[type="radio"] {
    display: none;
}

.wave-animation-option label,
.mic-animation-option label {
    cursor: pointer;
    display: block;
    width: 100%;
}

.wave-animation-option span,
.mic-animation-option span {
    display: block;
    margin-top: 10px;
    font-weight: 500;
}

.wave-preview {
    height: 80px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Preview Styles for Mic Animations */
.preview-mic-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Material Icons';
    font-size: 24px;
}

/* Pulse Animation Preview */
.preview-mic-pulse-container {
    position: relative;
    width: 50px;
    height: 50px;
}

.preview-mic-pulse-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0.2;
    animation: preview-mic-pulse 2s ease-out infinite;
}

@keyframes preview-mic-pulse {
    0% {
        transform: scale(0.5);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Wave Animation Preview */
.preview-mic-wave-container {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-mic-wave-circles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.preview-mic-wave-circle {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid;
    opacity: 0;
    animation: preview-mic-wave 2s linear infinite;
}

.preview-mic-wave-circle-1 {
    animation-delay: 0s;
}

.preview-mic-wave-circle-2 {
    animation-delay: 0.5s;
}

.preview-mic-wave-circle-3 {
    animation-delay: 1s;
}

@keyframes preview-mic-wave {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Ripple Animation Preview */
.preview-mic-ripple-container {
    position: relative;
    width: 50px;
    height: 50px;
}

.preview-mic-ripple-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid;
    opacity: 0;
    animation: preview-mic-ripple 2s ease-out infinite;
}

.preview-mic-ripple-circle-2 {
    animation-delay: 0.5s;
}

@keyframes preview-mic-ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}

/* Ensure consistent wave preview content styling */
.wave-preview-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Call button container */
.elevenlabs-btn-container {
    width: 60px;
    height: 60px;
    position: relative;
    margin: 0 auto;
}

/* Ensure widget stays visible when active */
#elevenlabs-voice-chat-widget-container.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Prevent other elements from covering widget */
.elevenlabs-widget-container * {
    z-index: 999999;
}

/* Ensure the widget doesn't get hidden by other CSS */
body #elevenlabs-voice-chat-widget-container {
    display: none; /* Hidden by default */
}

body #elevenlabs-voice-chat-widget-container.active {
    display: block !important;
}

/* Additional styles to prevent conflicts */
.elevenlabs-phone-ui {
    position: relative;
    height: 100% !important;
}

@media (max-width: 480px) {
    .elevenlabs-widget-container.active {
        display: block !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        z-index: 9999999 !important;
        position: fixed !important;
        overflow: hidden !important;
    }
}

/* Chrome-specific fixes */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    /* Target only Chrome browsers */
    #elevenlabs-voice-chat-widget-container {
        visibility: visible !important;
        opacity: 1 !important;
        display: block !important; /* Only when active */
        pointer-events: auto !important;
        transform: none !important;
        z-index: 9999999 !important;
    }
    
    #elevenlabs-voice-chat-widget-container:not(.active) {
        display: none !important;
    }
    
    #elevenlabs-voice-chat-widget-container.active {
        display: block !important;
        position: fixed !important;
    }
    
    #elevenlabs-voice-chat-widget-container .elevenlabs-phone-ui {
        position: relative !important;
        z-index: 1000000 !important;
    }
    
    /* Ensure the widget container has proper stacking context */
    #elevenlabs-voice-chat-widget-container {
        isolation: isolate;
    }
    
    /* Prevent any parent elements from affecting the widget */
    body #elevenlabs-voice-chat-widget-container.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Ensure voice chat container has the correct background */
.elevenlabs-voice-chat-container {
    background-color: var(--elevenlabs-widget-bg-color, #f5f5f5) !important;
} 