/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

.gemini-live-audio-agent-container {
    max-width: 500px;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gemini-live-audio-agent-container[data-theme="dark"] {
    background: #2c2c2c;
    border-color: #444;
    color: #fff;
}

.gemini-live-audio-agent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

.gemini-live-audio-agent-container[data-theme="dark"] .gemini-live-audio-agent-header {
    background: #3c3c3c;
    border-bottom-color: #555;
}

.gemini-live-audio-agent-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.gemini-live-audio-agent-status {
    display: flex;
    align-items: center;
}

.status-indicator {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: #dc3545;
    color: white;
}

.status-indicator.connected {
    background: #28a745;
}

.status-indicator.connecting {
    background: #ffc107;
    color: #000;
}

.gemini-live-audio-agent-conversation {
    height: 300px;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
}

.gemini-live-audio-agent-container[data-theme="dark"] .gemini-live-audio-agent-conversation {
    background: #2c2c2c;
}

.welcome-message {
    text-align: center;
    color: #666;
    font-style: italic;
}

.gemini-live-audio-agent-container[data-theme="dark"] .welcome-message {
    color: #aaa;
}

.conversation-message {
    margin: 10px 0;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.conversation-message.user {
    background: #007cba;
    color: white;
    margin-left: auto;
    text-align: right;
}

.conversation-message.assistant {
    background: #f1f1f1;
    color: #333;
    margin-right: auto;
}

.gemini-live-audio-agent-container[data-theme="dark"] .conversation-message.assistant {
    background: #444;
    color: #fff;
}

.gemini-live-audio-agent-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 10px 10px;
}

.gemini-live-audio-agent-container[data-theme="dark"] .gemini-live-audio-agent-controls {
    background: #3c3c3c;
    border-top-color: #555;
}

.connect-button,
.mic-button,
.stop-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.connect-button {
    background: #007cba;
    color: white;
}

.connect-button:hover {
    background: #005a87;
}

.connect-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.mic-button {
    background: #28a745;
    color: white;
}

.mic-button:hover {
    background: #1e7e34;
}

.mic-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.mic-button.recording {
    background: #dc3545;
    animation: pulse 1.5s infinite;
}

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

.stop-button {
    background: #dc3545;
    color: white;
}

.stop-button:hover {
    background: #c82333;
}

.stop-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.volume-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
}

.volume-controls label {
    font-size: 12px;
    color: #666;
}

.gemini-live-audio-agent-container[data-theme="dark"] .volume-controls label {
    color: #aaa;
}

.volume-slider {
    width: 80px;
}

.gemini-live-audio-agent-debug {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    font-size: 12px;
}

.gemini-live-audio-agent-container[data-theme="dark"] .gemini-live-audio-agent-debug {
    background: #3c3c3c;
    border-top-color: #555;
}

.gemini-live-audio-agent-debug h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
}

.gemini-live-audio-agent-debug pre {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 11px;
    margin: 0;
}

.gemini-live-audio-agent-container[data-theme="dark"] .gemini-live-audio-agent-debug pre {
    background: #2c2c2c;
    border-color: #555;
    color: #fff;
}

.gemini-live-audio-agent-error {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    color: #721c24;
    margin: 20px 0;
}

.message-timestamp {
    display: block;
    font-size: 10px;
    opacity: 0.6;
    margin-top: 5px;
}

.typing-indicator {
    opacity: 0.7;
}

.typing-dots {
    animation: typing 1.5s infinite;
}

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

.conversation-message.system {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    text-align: center;
    font-style: italic;
}

.gemini-live-audio-agent-container[data-theme="dark"] .conversation-message.system {
    background: #664d03;
    color: #fff3cd;
    border-color: #997404;
}

/* Responsive design */
@media (max-width: 600px) {
    .gemini-live-audio-agent-container {
        margin: 10px;
        max-width: none;
    }

    .gemini-live-audio-agent-controls {
        flex-wrap: wrap;
        gap: 8px;
    }

    .volume-controls {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }

    .conversation-message {
        max-width: 90%;
    }
}
