/**
 * Hume Voice Bot Frontend Styles v2
 */

/* CSS Variables for theming */
:root {
    --hume-bot-primary-color: #667eea;
    --hume-bot-primary-hover: #5a6fd8;
    --hume-bot-primary-active: #4e5bc7;
    --hume-bot-secondary-color: #f093fb;
    --hume-bot-accent-color: #4facfe;
    --hume-bot-success-color: #00d4aa;
    --hume-bot-warning-color: #ffc75f;
    --hume-bot-error-color: #ff6b6b;
    --hume-bot-text-color: #ffffff;
    --hume-bot-icon-color: #667eea;
    --hume-bot-border-radius: 12px;
    --hume-bot-border-radius-small: 8px;
    --hume-bot-border-radius-large: 20px;
    --hume-bot-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
    --hume-bot-shadow-hover: 0 12px 40px rgba(102, 126, 234, 0.25);
    --hume-bot-shadow-active: 0 4px 16px rgba(102, 126, 234, 0.3);
    --hume-bot-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --hume-bot-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --hume-bot-bg-light: #f8fafc;
    --hume-bot-bg-dark: #1a1d29;
    --hume-bot-bg-card: #ffffff;
    --hume-bot-text-dark: #1e293b;
    --hume-bot-text-light: #64748b;
    --hume-bot-border-color: #e2e8f0;
    --hume-bot-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --hume-bot-gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --hume-bot-gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Base container styles */
.hume-bot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    height: 600px;
    background: var(--hume-bot-bg);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    overflow: hidden;
}

.hume-bot-container:hover {
    box-shadow: var(--hume-bot-shadow-hover);
    transform: translateY(-2px);
}

/* Header styles */
.hume-bot-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: var(--hume-bot-gradient-primary);
    color: var(--hume-bot-text-color);
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.hume-bot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.hume-bot-header:hover::before {
    transform: translateX(100%);
}

.hume-bot-avatar {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    opacity: 0.9;
}

.hume-bot-title {
    flex: 1;
    font-weight: 600;
    font-size: 16px;
}

.hume-bot-minimize {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--hume-bot-transition);
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hume-bot-minimize::after {
    content: '✕';
    font-size: 16px;
    font-weight: bold;
    transition: var(--hume-bot-transition-fast);
}

.hume-bot-minimize:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.hume-bot-minimize:hover::after {
    transform: rotate(90deg);
}

/* Messages area */
.hume-bot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-top: 60px; /* Make room for the control button */
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: 450px;
    background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

.hume-bot-messages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 20%, rgba(102, 126, 234, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(79, 172, 254, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hume-bot-message {
    margin-bottom: 16px;
    padding: 12px 18px;
    border-radius: var(--hume-bot-border-radius-large);
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: hume-bot-slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hume-bot-message-user {
    background: var(--hume-bot-gradient-accent);
    color: var(--hume-bot-text-color);
    margin-left: auto;
    text-align: right;
    border-bottom-right-radius: 6px;
}

.hume-bot-message-user::before {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-top: 8px solid var(--hume-bot-accent-color);
}

.hume-bot-message-assistant {
    background: var(--hume-bot-bg-card);
    color: var(--hume-bot-text-dark);
    margin-right: auto;
    border: 1px solid var(--hume-bot-border-color);
    border-bottom-left-radius: 6px;
}

.hume-bot-message-assistant::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 0;
    height: 0;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--hume-bot-bg-card);
}

.hume-bot-message-system {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--hume-bot-text-light);
    margin: 0 auto;
    text-align: center;
    font-size: 13px;
    font-style: italic;
    border: 1px solid var(--hume-bot-border-color);
    border-radius: var(--hume-bot-border-radius);
    max-width: 80%;
}

.hume-bot-welcome {
    text-align: center;
    margin-bottom: 16px;
}

.hume-bot-welcome .hume-bot-message {
    max-width: 90%;
    margin: 0 auto;
}

/* Status indicator */
.hume-bot-status {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--hume-bot-bg-light) 0%, #f1f5f9 100%);
    border-top: 1px solid var(--hume-bot-border-color);
    font-size: 13px;
    color: var(--hume-bot-text-light);
    font-weight: 500;
    position: relative;
}

.hume-bot-status::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 2px;
    background: var(--hume-bot-gradient-primary);
    opacity: 0;
    transition: var(--hume-bot-transition);
}

.hume-bot-status.active::before {
    opacity: 1;
}

.hume-bot-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 12px;
    transition: var(--hume-bot-transition);
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hume-bot-status-indicator::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    opacity: 0;
    transition: var(--hume-bot-transition);
}

.hume-bot-status-connected .hume-bot-status-indicator {
    background: var(--hume-bot-success-color);
    box-shadow: 0 0 12px rgba(0, 212, 170, 0.4);
}

.hume-bot-status-connecting .hume-bot-status-indicator {
    background: var(--hume-bot-warning-color);
    animation: hume-bot-pulse 1.5s infinite;
    box-shadow: 0 0 12px rgba(255, 199, 95, 0.4);
}

.hume-bot-status-listening .hume-bot-status-indicator {
    background: var(--hume-bot-accent-color);
    animation: hume-bot-listening-pulse 2s infinite;
    box-shadow: 0 0 12px rgba(79, 172, 254, 0.4);
}

.hume-bot-status-processing .hume-bot-status-indicator {
    background: var(--hume-bot-secondary-color);
    animation: hume-bot-pulse 1s infinite;
    box-shadow: 0 0 12px rgba(240, 147, 251, 0.4);
}

.hume-bot-status-speaking .hume-bot-status-indicator {
    background: var(--hume-bot-success-color);
    animation: hume-bot-pulse 1.2s infinite;
    box-shadow: 0 0 12px rgba(0, 212, 170, 0.4);
}

.hume-bot-status-error .hume-bot-status-indicator {
    background: var(--hume-bot-error-color);
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.4);
}

.hume-bot-status-disconnected .hume-bot-status-indicator {
    background: var(--hume-bot-text-light);
    opacity: 0.6;
}

.hume-bot-status-idle .hume-bot-status-indicator {
    background: #6c757d;
    opacity: 0.8;
    box-shadow: 0 0 8px rgba(108, 117, 125, 0.3);
}

/* Input container */
.hume-bot-input-container {
    border-top: 1px solid var(--hume-bot-border-color);
    background: var(--hume-bot-bg-card);
    backdrop-filter: blur(10px);
    position: relative;
    padding: 16px 0;
}

.hume-bot-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--hume-bot-gradient-primary);
    opacity: 0.3;
}

/* Input Wrapper */
.hume-bot-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 32px 12px 12px 12px; /* Add top padding for button */
    background: var(--hume-bot-bg-light);
    border-top: 1px solid var(--hume-bot-border-color);
    position: relative;
    min-height: 80px; /* Ensure enough height for button */
}

.hume-bot-control-button {
    background: var(--hume-bot-gradient-primary);
    color: var(--hume-bot-text-color);
    border: 2px solid #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hume-bot-transition);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.5);
    position: absolute;
    left: 50%;
    top: -24px;
    transform: translate(-50%, 0);
    z-index: 10;
}

.hume-bot-control-button:hover {
    transform: translate(-50%, 0) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.7);
}

.hume-bot-control-button.active {
    background: var(--hume-bot-gradient-secondary);
    animation: hume-bot-recording-pulse 1.5s ease-in-out infinite;
}

.hume-bot-control-button.active:hover {
    background: var(--hume-bot-gradient-secondary);
}

/* Text Input */
.hume-bot-text-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--hume-bot-border-color);
    border-radius: var(--hume-bot-border-radius);
    background: var(--hume-bot-bg-white);
    color: var(--hume-bot-text-dark);
    font-size: 14px;
    line-height: 1.5;
    transition: var(--hume-bot-transition);
    margin: 0 60px;
}

.hume-bot-text-input:focus {
    outline: none;
    border-color: var(--hume-bot-primary-color);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Messages Container */
.hume-bot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: calc(100vh - 200px);
}

/* Message Bubbles */
.hume-bot-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--hume-bot-border-radius);
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
}

.hume-bot-message-user {
    align-self: flex-end;
    background: var(--hume-bot-gradient-primary);
    color: var(--hume-bot-text-color);
}

.hume-bot-message-assistant {
    align-self: flex-start;
    background: var(--hume-bot-bg-light);
    color: var(--hume-bot-text-dark);
}

/* Status Bar */
.hume-bot-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--hume-bot-bg-light);
    border-top: 1px solid var(--hume-bot-border-color);
    font-size: 12px;
    color: var(--hume-bot-text-light);
}

/* Modern Button Styles with Icons */
.hume-bot-voice-button,
.hume-bot-send-button {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--hume-bot-gradient-primary);
    color: var(--hume-bot-text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hume-bot-transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
}

.hume-bot-voice-button::before,
.hume-bot-send-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.hume-bot-voice-button:hover::before,
.hume-bot-send-button:hover::before {
    transform: translateX(100%);
}

.hume-bot-voice-button:hover,
.hume-bot-send-button:hover {
    background: var(--hume-bot-gradient-accent);
    transform: scale(1.1) translateY(-2px);
    box-shadow: var(--hume-bot-shadow-hover);
}

.hume-bot-voice-button:active,
.hume-bot-send-button:active {
    transform: scale(0.95);
    box-shadow: var(--hume-bot-shadow-active);
}

/* Voice Button Icons and States */
.hume-bot-voice-button {
    position: relative;
}

.hume-bot-voice-button::after {
    content: '🎙️';
    font-size: 20px;
    transition: var(--hume-bot-transition-fast);
}

.hume-bot-voice-button.recording {
    background: var(--hume-bot-gradient-secondary);
    animation: hume-bot-recording-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(240, 147, 251, 0.6);
}

.hume-bot-voice-button.recording::after {
    content: '⏹️';
    animation: hume-bot-recording-icon 0.5s ease;
}

.hume-bot-voice-button.listening {
    background: var(--hume-bot-gradient-accent);
    animation: hume-bot-listening-pulse 2s ease-in-out infinite;
}

.hume-bot-voice-button.listening::after {
    content: '👂';
    animation: hume-bot-listening-icon 0.3s ease;
}

/* Send Button Icon */
.hume-bot-send-button::after {
    content: '➤';
    font-size: 18px;
    font-weight: bold;
    transition: var(--hume-bot-transition-fast);
}

.hume-bot-send-button:hover::after {
    transform: translateX(2px);
}

.hume-bot-send-button:disabled {
    background: var(--hume-bot-bg-light);
    color: var(--hume-bot-text-light);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.hume-bot-send-button:disabled::after {
    content: '⏸️';
    opacity: 0.5;
}

/* Start/Stop Conversation Buttons */
.hume-bot-start-conversation,
.hume-bot-stop-conversation {
    background: var(--hume-bot-gradient-primary);
    color: var(--hume-bot-text-color);
    border: none;
    padding: 12px 24px;
    border-radius: var(--hume-bot-border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: var(--hume-bot-transition);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 140px;
}

.hume-bot-start-conversation::before,
.hume-bot-stop-conversation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.hume-bot-start-conversation:hover::before,
.hume-bot-stop-conversation:hover::before {
    transform: translateX(100%);
}

.hume-bot-start-conversation::after {
    content: '▶️';
    font-size: 16px;
}

.hume-bot-stop-conversation {
    background: var(--hume-bot-gradient-secondary);
    box-shadow: 0 4px 16px rgba(240, 147, 251, 0.3);
}

.hume-bot-stop-conversation::after {
    content: '⏹️';
    font-size: 16px;
}

.hume-bot-start-conversation:hover,
.hume-bot-stop-conversation:hover {
    transform: translateY(-2px);
    box-shadow: var(--hume-bot-shadow-hover);
}

.hume-bot-start-conversation:active,
.hume-bot-stop-conversation:active {
    transform: scale(0.98);
    box-shadow: var(--hume-bot-shadow-active);
}

/* Hide buttons based on state */
.hume-bot-start-conversation[style*="display: none"],
.hume-bot-stop-conversation[style*="display: none"] {
    display: none !important;
}

/* Voice visualizer */
.hume-bot-voice-visualizer {
    padding: 8px 16px;
    background-color: var(--hume-bot-bg-light);
}

.hume-bot-waveform {
    width: 100%;
    height: 40px;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.1);
}

/* Error container */
.hume-bot-error-container {
    padding: 20px;
    background: linear-gradient(135deg, #ffebee 0%, #fde2e7 100%);
    border-top: 2px solid var(--hume-bot-error-color);
    text-align: center;
    position: relative;
}

.hume-bot-error-container::before {
    content: '⚠️';
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
    animation: hume-bot-bounce 2s infinite;
}

.hume-bot-error-message {
    color: var(--hume-bot-error-color);
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.hume-bot-error-retry {
    background: var(--hume-bot-gradient-secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--hume-bot-border-radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--hume-bot-transition);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.hume-bot-error-retry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.hume-bot-error-retry:hover::before {
    transform: translateX(100%);
}

.hume-bot-error-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Site-wide chat styles */
.hume-bot-site-wide {
    position: fixed;
    z-index: 999999;
    bottom: 20px;
    right: 20px;
}

.hume-bot-position-bottom-left {
    bottom: 20px;
    left: 20px;
    right: auto;
}

.hume-bot-position-top-right {
    top: 20px;
    bottom: auto;
    right: 20px;
}

.hume-bot-position-top-left {
    top: 20px;
    bottom: auto;
    left: 20px;
    right: auto;
}

.hume-bot-chat-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--hume-bot-gradient-primary);
    color: var(--hume-bot-text-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--hume-bot-shadow);
    transition: var(--hume-bot-transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.hume-bot-chat-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.hume-bot-chat-icon:hover::before {
    transform: translateX(100%);
}

.hume-bot-chat-icon::after {
    content: '💬';
    font-size: 28px;
    transition: var(--hume-bot-transition-fast);
    z-index: 1;
    position: relative;
}

.hume-bot-chat-icon:hover {
    transform: scale(1.15) translateY(-4px);
    box-shadow: var(--hume-bot-shadow-hover);
    background: var(--hume-bot-gradient-accent);
}

.hume-bot-chat-icon:hover::after {
    transform: scale(1.1) rotate(10deg);
}

.hume-bot-chat-icon:active {
    transform: scale(0.95);
}

.hume-bot-chat-icon-active {
    transform: scale(1.05);
    background: var(--hume-bot-gradient-secondary);
    animation: hume-bot-chat-active 2s ease-in-out infinite;
}

.hume-bot-chat-icon-active::after {
    content: '🗨️';
}

.hume-bot-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #f44336;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Chat widget */
.hume-bot-chat-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: var(--hume-bot-border-radius);
    box-shadow: var(--hume-bot-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999998;
}

.hume-bot-position-bottom-left .hume-bot-chat-widget {
    left: 20px;
    right: auto;
}

.hume-bot-position-top-right .hume-bot-chat-widget {
    top: 90px;
    bottom: auto;
}

.hume-bot-position-top-left .hume-bot-chat-widget {
    top: 90px;
    bottom: auto;
    left: 20px;
    right: auto;
}

.hume-bot-widget-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: var(--hume-bot-primary-color);
    color: var(--hume-bot-text-color);
}

.hume-bot-widget-title {
    display: flex;
    align-items: center;
    flex: 1;
    font-weight: 600;
    font-size: 16px;
}

.hume-bot-widget-title svg {
    margin-right: 8px;
}

.hume-bot-widget-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--hume-bot-transition);
}

.hume-bot-widget-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hume-bot-widget-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hume-bot-widget-footer {
    border-top: 1px solid var(--hume-bot-border-color);
    background-color: #ffffff;
}

/* Theme variations */
.hume-theme-minimal {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hume-theme-minimal .hume-bot-header {
    background-color: transparent;
    color: var(--hume-bot-text-dark);
    border-bottom: 1px solid var(--hume-bot-border-color);
}

.hume-theme-dark {
    background-color: var(--hume-bot-bg-dark);
    color: var(--hume-bot-text-color);
}

.hume-theme-dark .hume-bot-messages {
    background-color: var(--hume-bot-bg-dark);
}

.hume-theme-dark .hume-bot-message-user {
    background-color: #424242;
    color: var(--hume-bot-text-color);
}

.hume-theme-dark .hume-bot-text-input {
    background-color: #424242;
    border-color: #616161;
    color: var(--hume-bot-text-color);
}

.hume-theme-dark .hume-bot-input-container,
.hume-theme-dark .hume-bot-widget-footer {
    background-color: var(--hume-bot-bg-dark);
}

/* Enhanced Animations */
@keyframes hume-bot-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes hume-bot-recording-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(240, 147, 251, 0.6);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(240, 147, 251, 0.8);
    }
}

@keyframes hume-bot-listening-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

@keyframes hume-bot-chat-active {
    0%, 100% {
        transform: scale(1.05);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes hume-bot-recording-icon {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes hume-bot-listening-icon {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(10deg);
    }
}

@keyframes hume-bot-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hume-bot-slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hume-bot-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes hume-bot-shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.hume-bot-message {
    animation: hume-bot-fadeIn 0.3s ease;
}

/* Responsive styles */
@media (max-width: 768px) {
    .hume-bot-chat-widget {
        width: calc(100vw - 20px);
        height: calc(100vh - 40px);
        bottom: 10px;
        right: 10px;
        left: 10px;
        top: 10px;
        border-radius: var(--hume-bot-border-radius);
    }
    
    .hume-bot-position-bottom-left .hume-bot-chat-widget,
    .hume-bot-position-top-right .hume-bot-chat-widget,
    .hume-bot-position-top-left .hume-bot-chat-widget {
        left: 10px;
        right: 10px;
        top: 10px;
        bottom: 10px;
    }
    
    .hume-bot-container {
        height: auto;
        min-height: 300px;
    }
    
    .hume-bot-messages {
        min-height: 150px;
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .hume-bot-site-wide {
        bottom: 15px;
        right: 15px;
    }
    
    .hume-bot-position-bottom-left {
        left: 15px;
        right: auto;
    }
    
    .hume-bot-position-top-right {
        top: 15px;
        right: 15px;
        bottom: auto;
    }
    
    .hume-bot-position-top-left {
        top: 15px;
        left: 15px;
        right: auto;
        bottom: auto;
    }
    
    .hume-bot-chat-icon {
        width: 50px;
        height: 50px;
    }
    
    .hume-bot-input-wrapper {
        padding: 8px 12px;
    }
    
    .hume-bot-voice-button,
    .hume-bot-send-button {
        width: 44px;
        height: 44px;
    }
    
    .hume-bot-voice-button::after {
        font-size: 18px;
    }
    
    .hume-bot-send-button::after {
        font-size: 16px;
    }
}

/* Print styles */
@media print {
    .hume-bot-site-wide,
    .hume-bot-chat-widget {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hume-bot-container {
        border: 2px solid currentColor;
    }
    
    .hume-bot-text-input {
        border: 2px solid currentColor;
    }
    
    .hume-bot-voice-button,
    .hume-bot-send-button {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hume-bot-status-indicator {
        animation: none !important;
    }
}

/* Control Button */
.hume-bot-control-button {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--hume-bot-primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 16px auto;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.hume-bot-control-button:hover {
    transform: scale(1.1);
    background: var(--hume-bot-primary-hover);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.hume-bot-control-button.active {
    background: var(--hume-bot-error-color);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.hume-bot-control-button.active:hover {
    background: var(--hume-bot-error-color);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.hume-bot-icon-start,
.hume-bot-icon-stop {
    width: 24px;
    height: 24px;
    fill: white;
}