/* Apsara Widget - Compact Inline Style */

.apsara-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Widget Panel - Horizontal Layout */
.widget-panel {
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px 16px 8px 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.widget-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}

/* Visualizer Container - Small, on left */
.visualizer-container {
    position: relative;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
}

#miniVisualizer {
    position: absolute;
    top: 0;
    left: 0;
    width: 45px;
    height: 45px;
}

.visualizer-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #32CD32 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 2;
}

.visualizer-orb.listening {
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(50, 205, 50, 0.5);
}

.visualizer-orb.speaking {
    animation: pulse-fast 0.8s infinite;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes pulse-fast {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.08); }
}

.orb-inner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

/* Widget Content - Text and Button */
.widget-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.widget-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    flex: 1;
}

/* Mute Button - Icon Only */
.mute-button {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.mute-button svg {
    width: 16px;
    height: 16px;
    stroke: #666;
    transition: all 0.3s ease;
}

.mute-button:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mute-button:hover svg {
    stroke: #333;
}

.mute-button.muted svg {
    stroke: #ff4b4b;
}

.mute-button.muted:hover {
    background: rgba(255, 75, 75, 0.1);
}

/* End Button - Inline */
.end-button {
    background: white;
    color: #ff4b4b;
    border: 2px solid #ff4b4b;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.end-button svg {
    width: 12px;
    height: 12px;
    stroke: #ff4b4b;
}

.end-button:hover {
    background: #ff4b4b;
    color: white;
    transform: scale(1.05);
}

.end-button:hover svg {
    stroke: white;
}

/* Mobile Responsive */
@media screen and (max-width: 480px) {
    .apsara-widget {
        right: 15px;
        bottom: 15px;
    }

    .widget-panel {
        padding: 10px 16px 10px 10px;
        gap: 12px;
    }

    .visualizer-container {
        width: 50px;
        height: 50px;
    }

    #miniVisualizer {
        width: 50px;
        height: 50px;
    }

    .visualizer-orb {
        width: 42px;
        height: 42px;
    }

    .orb-inner {
        width: 32px;
        height: 32px;
    }

    .widget-text {
        font-size: 14px;
    }

    .end-button {
        padding: 6px 16px;
        font-size: 13px;
    }
}
