.elevenlabs-convai-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 450px;
    height: 560px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 99999;
    cursor: default;
    transition: all 0.3s ease;
}

.widget-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.agent-avatar-container {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 192px;
    height: 192px;
    transition: all 0.3s ease;
    z-index: 2;
}

.conversation-active .agent-avatar-container {
    top: 15px !important;
    left: 15px !important;
    transform: translate(0, 0) scale(0.35) !important;
    position: absolute !important;
    z-index: 10 !important;
    display: block !important;
}

.agent-avatar {
    width: 192px;
    height: 192px;
    border-radius: 50%;
    background: #ff6b6b;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    color: white;
    border: 4px solid rgba(255,255,255,0.3);
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.brain-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 1;
    will-change: opacity;
}

.wave {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 4px solid rgba(30, 30, 30, 0.9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    will-change: transform, opacity;
}

.wave-1 {
    width: 200px;
    height: 200px;
    animation: brainPulse 2s ease-in-out infinite;
}

.wave-2 {
    width: 220px;
    height: 220px;
    animation: brainPulse 2s ease-in-out infinite 0.3s;
}

.agent-avatar-container.speaking .brain-waves,
.header-avatar-container.speaking .brain-waves {
    opacity: 1;
}

@keyframes brainPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.agent-name {
    color: black;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.agent-info {
    position: absolute;
    bottom: 160px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 1;
    transition: all 0.3s ease;
}

.conversation-active .agent-info {
    opacity: 0;
    pointer-events: none;
}

.start-call-btn {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: black;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
    will-change: transform;
}

    .start-call-btn:hover {
        background: #333;
        transform: translateX(-50%) scale(1.1);
    }

.conversation-active .start-call-btn {
    opacity: 0;
    pointer-events: none;
}

.agent-status {
    color: black;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ecdc4;
}

    .status-dot.connecting {
        background: #ffd93d;
        animation: pulse 1.5s infinite;
    }

    .status-dot.error {
        background: #ff6b6b;
    }

    .status-dot.waiting {
        background: #f39c12;
        animation: pulse 1.5s infinite;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

.conversation-area {
    position: absolute;
    top: 120px;
    left: 20px;
    right: 20px;
    bottom: 140px;
    padding: 20px;
    overflow-y: auto;
    background: #F8F8F8;
    border-radius: 15px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.conversation-active .conversation-area {
    opacity: 1;
    pointer-events: auto;
    top: 110px;
}

.widget-header {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    padding: 15px;
    background: #c204b5;
    background: linear-gradient(135deg, #c204b5 0%, #FD62EED9 100%);
    border-radius: 15px;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    z-index: 20;
}

.conversation-active .widget-header {
    display: flex;
}

.elevenlabs-convai-widget.conversation-active .agent-avatar-container:not(.header-avatar-container) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.header-avatar-container {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

    .header-avatar-container .brain-waves {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        opacity: 0;
        z-index: 1;
    }

    .header-avatar-container .wave {
        position: absolute;
        top: 50%;
        left: 50%;
        border: 2px solid rgba(30, 30, 30, 0.9);
        border-radius: 50%;
        transform: translate(-50%, -50%);
    }

    .header-avatar-container .wave-1 {
        width: 70px;
        height: 70px;
        animation: brainPulse 2s ease-in-out infinite;
    }

    .header-avatar-container .wave-2 {
        width: 80px;
        height: 80px;
        animation: brainPulse 2s ease-in-out infinite 0.3s;
    }

.widget-header .agent-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
}

.header-info {
    flex: 1;
    margin-left: 10px;
}

.widget-header .agent-name {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.widget-header .agent-status {
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.conversation-area::-webkit-scrollbar {
    width: 8px;
}

.conversation-area::-webkit-scrollbar-track {
    background: #F0F0F0;
    border-radius: 10px;
}

.conversation-area::-webkit-scrollbar-thumb {
    background: #D0D0D0;
    border-radius: 10px;
}

    .conversation-area::-webkit-scrollbar-thumb:hover {
        background: #B0B0B0;
    }

.message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: all 0.3s ease-out;
}

    .message.user {
        flex-direction: row-reverse;
    }

.message-bubble {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.message.user .message-bubble {
    background: #FD62EE;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.agent .message-bubble {
    background: #E5E5EA;
    color: black;
    border-bottom-left-radius: 4px;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #FD62EE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: black;
    flex-shrink: 0;
}

.message.system .message-bubble {
    color: #666;
    background: #F0F0F0;
    border: 1px solid #E0E0E0;
    text-align: center;
    font-size: 12px;
}

.message-bubble a {
    color: #007bff !important;
    text-decoration: underline !important;
    cursor: pointer !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
}

    .message-bubble a:hover {
        color: #0056b3 !important;
    }

.call-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.conversation-active .call-controls {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto !important;
    z-index: 10000;
    position: relative;
}

    .control-btn.call {
        background: #4ecdc4;
        color: white;
    }

        .control-btn.call:hover {
            background: #45b7aa;
            transform: scale(1.05);
        }

    .control-btn.end {
        background: #ff6b6b;
        color: white;
    }

        .control-btn.end:hover {
            background: #ff5252;
            transform: scale(1.05);
        }

    .control-btn.mute {
        background: #FD62EE;
        color: white;
    }

        .control-btn.mute:hover {
            background: #c204b5;
        }

    .control-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

.chat-input-area {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 15px;
    background: white;
    border-radius: 15px;
    opacity: 1;
    pointer-events: auto;
    transition: all 0.3s ease;
}

.conversation-active .chat-input-area {
    bottom: 80px;
}

.widget-minimized .chat-input-area {
    opacity: 0;
    pointer-events: none;
}

.chat-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

    .chat-input input {
        flex: 1;
        padding: 12px 16px;
        border: 1px solid #E0E0E0;
        border-radius: 25px;
        background: white;
        color: #333;
        font-size: 14px;
        outline: none;
        pointer-events: auto;
        z-index: 10;
        position: relative;
    }

        .chat-input input::placeholder {
            color: #999;
        }

.send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #4ecdc4;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    z-index: 10;
    position: relative;
}

    .send-btn:hover {
        background: #45b7aa;
        transform: scale(1.05);
    }

.report-btn {
    background: #f8f9fa !important;
}

    .report-btn:hover {
        background: #e9ecef !important;
    }

.widget-minimized {
    width: 180px;
    height: 70px;
    border-radius: 100px;
    cursor: pointer;
}

    .widget-minimized .widget-content {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        padding: 10px 20px;
        gap: 8px;
    }

.elevenlabs-convai-widget .agent-avatar-container {
    display: block;
}

.widget-minimized .agent-avatar-container {
    display: none !important;
}

.minimized-avatar-container {
    display: none;
    position: relative;
    width: 50px;
    height: 50px;
}

.widget-minimized .minimized-avatar-container {
    display: block !important;
}

.elevenlabs-convai-widget:not(.widget-minimized) .minimized-avatar-container {
    display: none !important;
}

.widget-minimized .agent-avatar {
    width: 50px;
    height: 50px;
    font-size: 20px;
    border: 2px solid rgba(255,255,255,0.3);
}

.widget-minimized .agent-info,
.widget-minimized .start-call-btn,
.widget-minimized .conversation-area,
.widget-minimized .chat-input-area,
.widget-minimized .call-controls,
.widget-minimized .widget-header {
    display: none !important;
}

.widget-minimized .minimized-start-btn {
    display: flex;
    background: black;
    color: white;
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border: none;
}

    .widget-minimized .minimized-start-btn:hover {
        background: #333;
        transform: scale(1.05);
    }

.widget-minimized.call-active .minimized-start-btn {
    display: none;
}

.widget-minimized.call-active {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

    .widget-minimized.call-active .agent-avatar-container {
        width: 70px;
        height: 70px;
    }

    .widget-minimized.call-active .agent-avatar {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }

.widget-minimized .widget-header {
    padding: 10px 15px;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 10px;
}

.widget-minimized .agent-avatar-container {
    width: 50px;
    height: 50px;
}

.widget-minimized .agent-avatar {
    width: 50px;
    height: 50px;
    margin: 0;
    font-size: 20px;
    border: 2px solid rgba(255,255,255,0.3);
}

.widget-minimized .wave-circle {
    display: none;
}

.widget-minimized .agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.widget-minimized .agent-name {
    display: none;
}

.widget-minimized .agent-status {
    display: none;
}

.widget-minimized .widget-body {
    display: none;
}

.widget-minimized .minimize-btn {
    display: none;
}

.minimized-start-btn {
    display: none;
    background: black;
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.widget-minimized .minimized-start-btn {
    display: flex;
    z-index: 1001;
    pointer-events: auto;
}

.widget-minimized.call-active {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    min-width: 80px;
}

    .widget-minimized.call-active .widget-header {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 5px;
        width: 100%;
        height: 100%;
    }

    .widget-minimized.call-active .agent-avatar-container {
        width: 70px;
        height: 70px;
    }

    .widget-minimized.call-active .agent-avatar {
        width: 70px;
        height: 70px;
        margin: 0;
        font-size: 28px;
    }

    .widget-minimized.call-active .wave-circle {
        display: block;
    }

    .widget-minimized.call-active.speaking .wave-1 {
        width: 80px;
        height: 80px;
        border-width: 2px;
    }

    .widget-minimized.call-active.speaking .wave-2 {
        width: 90px;
        height: 90px;
        border-width: 2px;
    }

    .widget-minimized.call-active.speaking .wave-3 {
        width: 100px;
        height: 100px;
        border-width: 1px;
    }

    .widget-minimized.call-active .minimized-start-btn {
        display: none !important;
    }

.minimized-start-btn:hover {
    background: #333;
    transform: scale(1.05);
}

.minimize-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 30;
    pointer-events: auto;
}

    .minimize-btn:hover {
        background: rgba(255,255,255,0.3);
    }

.widget-collapse-control {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
}

.collapse-content {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.collapse-btn {
    background: #c204b5;
    background: linear-gradient(135deg, #c204b5 0%, #FD62EED9 100%);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    will-change: transform;
}

    .collapse-btn:hover {
        background: #a8038f;
        background: linear-gradient(135deg, #a8038f 0%, #e555d1 100%);
        transform: scale(1.05);
    }

.chevron-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.call-minimized-avatar-container {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

    .call-minimized-avatar-container .agent-avatar {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.3);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
        z-index: 2;
    }

        .call-minimized-avatar-container .agent-avatar img {
            width: 60px !important;
            height: 60px !important;
            border-radius: 50% !important;
        }

.elevenlabs-convai-widget.call-active.widget-minimized .call-minimized-avatar-container {
    display: flex !important;
}

.elevenlabs-convai-widget.call-active.widget-minimized .minimized-avatar-container {
    display: none !important;
}
