/* Virtual Trey Chat Styles */

/* Dark Mode (Default) */
[data-bs-theme="dark"] .virtual-trey-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: var(--executive-dark, #0f172a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    z-index: 100000;
    transition: all 0.3s ease;
}

/* Light Mode */
[data-bs-theme="light"] .virtual-trey-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: var(--bg-primary, #f8fbff);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 100000;
    transition: all 0.3s ease;
}

/* Collapsed state */
.virtual-trey-chat.collapsed {
    width: 60px;
    height: 60px;
    border-radius: 30px;
    cursor: pointer;
    display: none !important; /* Hide when collapsed - use FAB instead */
}

.virtual-trey-chat.collapsed .chat-header,
.virtual-trey-chat.collapsed .chat-messages,
.virtual-trey-chat.collapsed .chat-suggestions,
.virtual-trey-chat.collapsed .chat-input-area {
    display: none;
}

/* Chat Header */
[data-bs-theme="dark"] .chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-bs-theme="light"] .chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--bs-gold, #d4af37);
}

.chat-controls {
    display: flex;
    gap: 8px;
}

[data-bs-theme="dark"] .btn-icon {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-bs-theme="light"] .btn-icon {
    background: none;
    border: none;
    color: var(--bs-gray-700);
    padding: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    color: var(--bs-gold, #d4af37);
}

/* Chat Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Initial State */
.chat-initial-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px 20px;
    transition: opacity 0.3s ease;
}

.chat-avatar {
    color: var(--bs-gold, #d4af37);
    margin-bottom: 16px;
}

.chat-avatar-img {
    width: 61px;
    height: 61px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bs-gold, #d4af37);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Custom Confirmation Modal */
.chat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(0px);
    transition: all 0.3s ease;
}

.chat-modal-overlay.show {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.chat-confirmation-modal {
    background-color: #1a1d29;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
    width: 90%;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.chat-confirmation-modal.show {
    transform: scale(1);
    opacity: 1;
}

.chat-modal-content {
    padding: 24px;
}

.chat-modal-title {
    color: var(--bs-gold, #d4af37);
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.chat-modal-message {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.chat-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.chat-modal-buttons .btn {
    min-width: 80px;
}

.chat-initial-state h5 {
    color: var(--bs-gold, #d4af37);
    margin-bottom: 12px;
    font-weight: 600;
}

[data-bs-theme="dark"] .chat-initial-state p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
    font-size: 14px;
}

[data-bs-theme="light"] .chat-initial-state p {
    color: var(--bs-gray-700);
    margin-bottom: 24px;
    font-size: 14px;
}

[data-bs-theme="dark"] .btn-talk-to-trey {
    background: var(--bs-gold, #d4af37);
    color: var(--executive-dark, #0f172a);
    border: none;
    padding: 12px 32px;
    border-radius: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

[data-bs-theme="light"] .btn-talk-to-trey {
    background: var(--bs-gold, #d4af37);
    color: var(--text-on-dark, #ffffff);
    border: none;
    padding: 12px 32px;
    border-radius: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-talk-to-trey:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

/* Chat Messages */
.chat-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: messageSlideIn 0.3s ease;
}

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

.message-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
}

/* Ensure user message text is always dark on gold background */
.virtual-trey-chat .chat-message-user .message-bubble {
    color: #0f172a !important;
}

/* Additional specificity for user messages */
#virtual-trey-chat .chat-messages .chat-message.chat-message-user .message-bubble {
    color: #0f172a !important;
    background-color: #d4af37 !important;
}

/* Override any Bootstrap text utilities */
.chat-message-user .message-bubble,
.chat-message-user .message-bubble * {
    color: #0f172a !important;
}

[data-bs-theme="dark"] .chat-message-assistant .message-bubble {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border-bottom-left-radius: 4px;
}

[data-bs-theme="light"] .chat-message-assistant .message-bubble {
    background: rgba(0, 0, 0, 0.05);
    color: var(--bs-gray-900);
    border-bottom-left-radius: 4px;
}

[data-bs-theme="dark"] .chat-message-user .message-bubble {
    background: #d4af37;
    color: #0f172a !important;
    border-bottom-right-radius: 4px;
}

[data-bs-theme="light"] .chat-message-user .message-bubble {
    background: #d4af37;
    color: #0f172a !important;
    border-bottom-right-radius: 4px;
}

[data-bs-theme="dark"] .message-timestamp {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    padding: 4px 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

[data-bs-theme="light"] .message-timestamp {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.chat-message:hover .message-timestamp {
    opacity: 1;
}

/* Typing Animation */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 16px;
    background: var(--bs-gold, #d4af37);
    margin-left: 2px;
    animation: cursorBlink 1s infinite;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Suggestions */
[data-bs-theme="dark"] .chat-suggestions {
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .chat-suggestions {
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .suggestion-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-bs-theme="light"] .suggestion-pill {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--bs-gray-900);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .suggestion-pill:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--bs-gold, #d4af37);
}

[data-bs-theme="light"] .suggestion-pill:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--bs-gold, #d4af37);
    color: var(--bs-gray-900);
}

/* Input Area */
[data-bs-theme="dark"] .chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative; /* For absolute positioning of typing indicator */
}

[data-bs-theme="light"] .chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    position: relative; /* For absolute positioning of typing indicator */
}

/* Subtle typing indicator - just tiny dots in the corner */
.typing-indicator {
    position: absolute;
    bottom: 8px;
    right: 52px; /* Position next to send button */
    display: none;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    z-index: 10;
}

[data-bs-theme="dark"] .typing-indicator {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="light"] .typing-indicator {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.typing-indicator.active {
    display: flex;
    animation: subtleFadeIn 0.2s forwards;
}

[data-bs-theme="dark"] .typing-indicator.active {
    animation: subtleFadeIn 0.2s forwards, indicatorPulseDark 1.5s 0.2s infinite ease-in-out;
}

[data-bs-theme="light"] .typing-indicator.active {
    animation: subtleFadeIn 0.2s forwards, indicatorPulseLight 1.5s 0.2s infinite ease-in-out;
}

/* Pulsing animation for dark mode - grey to white gradient */
@keyframes indicatorPulseDark {
    0%, 100% {
        transform: scale(1);
        background: rgba(128, 128, 128, 0.2);
        border-color: rgba(128, 128, 128, 0.3);
    }
    50% {
        transform: scale(1.05);
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.4);
    }
}

/* Pulsing animation for light mode - light grey to darker */
@keyframes indicatorPulseLight {
    0%, 100% {
        transform: scale(1);
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.05);
        background: rgba(0, 0, 0, 0.15);
        border-color: rgba(0, 0, 0, 0.25);
    }
}

/* Remove the ugly text completely */
.typing-text {
    display: none;
}

@keyframes subtleFadeIn {
    to {
        opacity: 1;
    }
}

/* Elegant tiny dots */
[data-bs-theme="dark"] .typing-bubble span {
    width: 4px;
    height: 4px;
    background: rgba(212, 175, 55, 0.8); /* Gold color */
    border-radius: 50%;
    animation: elegantPulse 1.2s infinite ease-in-out;
}

[data-bs-theme="light"] .typing-bubble span {
    width: 4px;
    height: 4px;
    background: rgba(212, 175, 55, 0.9); /* Gold color */
    border-radius: 50%;
    animation: elegantPulse 1.2s infinite ease-in-out;
}

.typing-bubble span:nth-child(1) { animation-delay: 0s; }
.typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.4s; }

@keyframes elegantPulse {
    0%, 60%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    30% {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

[data-bs-theme="dark"] .chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 16px;
    border-radius: 20px;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    max-height: 80px;
    transition: all 0.2s ease;
}

[data-bs-theme="light"] .chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--bs-gray-900);
    padding: 10px 16px;
    border-radius: 20px;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    max-height: 80px;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .chat-input:focus {
    outline: none;
    border-color: var(--bs-gold, #d4af37);
    background: rgba(255, 255, 255, 0.15);
}

[data-bs-theme="light"] .chat-input:focus {
    outline: none;
    border-color: var(--bs-gold, #d4af37);
    background: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="dark"] .chat-send {
    background: var(--bs-gold, #d4af37);
    color: var(--executive-dark, #0f172a);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

[data-bs-theme="light"] .chat-send {
    background: var(--bs-gold, #d4af37);
    color: var(--text-on-dark, #ffffff);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-send:hover {
    transform: scale(1.1);
}

.chat-send:active {
    transform: scale(0.95);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .virtual-trey-chat {
        width: 100%;
        height: 100vh;
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        bottom: auto;
        border-radius: 0;
        z-index: 10000;
        transition: transform 0.3s ease;
    }
    
    .virtual-trey-chat.active {
        transform: translateY(-100%);
    }
    
    .virtual-trey-chat.fullscreen {
        height: 100%;
        border-radius: 0;
    }
    
    .virtual-trey-chat.collapsed {
        width: 48px;
        height: 48px;
        position: fixed;
        bottom: 16px;
        right: 16px;
        top: auto;
        left: auto;
        border-radius: 24px;
        z-index: 1000;
        transform: none;
    }
    
    .chat-header {
        padding: 10px 14px;
        position: relative;
        z-index: 1000000;
    }
    
    [data-bs-theme="dark"] .chat-header {
        background: var(--executive-dark, #0f172a);
    }
    
    [data-bs-theme="light"] .chat-header {
        background: var(--bg-primary, #f8fbff);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .chat-header h4 {
        font-size: 16px;
    }
    
    /* Hide fullscreen button on mobile since it's always fullscreen */
    #chat-fullscreen {
        display: none;
    }
    
    /* Make close button more prominent on mobile */
    #chat-close {
        background: rgba(255, 0, 0, 0.8);
        color: white !important;
        padding: 8px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    #chat-close:hover {
        background: rgba(255, 0, 0, 1);
    }
    
    .chat-messages {
        padding: 12px;
    }
    
    .message-bubble {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .chat-suggestions {
        padding: 6px 12px;
    }
    
    .suggestion-pill {
        font-size: 12px;
        padding: 5px 10px;
    }
    
    .chat-input-area {
        padding: 10px 14px;
        padding-bottom: env(safe-area-inset-bottom, 10px);
    }
    
    .chat-input {
        font-size: 13px;
        padding: 8px 14px;
    }
    
    .chat-send {
        width: 36px;
        height: 36px;
    }
}

/* Animations */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating Action Button */
.chat-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: var(--bs-gold, #d4af37);
    border: none;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99999;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    outline: none !important;
}

.chat-fab:focus {
    outline: none !important;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.chat-fab:focus-visible {
    outline: none !important;
}

[data-bs-theme="dark"] .chat-fab {
    color: #ffffff;
}

[data-bs-theme="light"] .chat-fab {
    color: var(--text-on-dark, #ffffff);
}

.chat-fab.show {
    opacity: 1;
    transform: scale(1);
}

.chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.chat-fab:active {
    transform: scale(0.95);
}

/* Mobile FAB adjustments */
@media (max-width: 768px) {
    .chat-fab {
        bottom: 16px;
        right: 16px;
        width: 48px;
        height: 48px;
        border-radius: 24px;
    }
    
    .chat-fab .mdi {
        font-size: 20px;
    }
}

/* Remove any potential overlays or pseudo-elements */
.chat-fab::before,
.chat-fab::after {
    display: none !important;
}

/* Ensure no Bootstrap button styles interfere */
.chat-fab.btn:focus,
.chat-fab:focus {
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3) !important;
}

/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

[data-bs-theme="dark"] .chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

[data-bs-theme="dark"] .chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="light"] .chat-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

[data-bs-theme="light"] .chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Phase 2: Conversation Restoration Banner */
.conversation-restore-banner {
    background: linear-gradient(135deg, var(--executive-purple, #6366f1), var(--executive-blue, #3b82f6));
    border-radius: 12px;
    margin: 12px;
    padding: 16px;
    color: white;
    animation: slideInDown 0.3s ease-out;
}

[data-bs-theme="light"] .conversation-restore-banner {
    background: linear-gradient(135deg, var(--executive-purple, #6366f1), var(--executive-blue, #3b82f6));
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.restore-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.restore-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    flex-shrink: 0;
}

.restore-icon .mdi {
    font-size: 20px;
    color: white;
}

.restore-text {
    flex: 1;
}

.restore-text h6 {
    margin: 0 0 4px 0;
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
}

.restore-text p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    line-height: 1.3;
}

.restore-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
    align-items: flex-start;
}

.restore-actions .btn {
    padding: 6px 16px !important;
    font-size: 0.875rem !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
}

/* Primary Continue button - make it stand out */
.restore-actions .btn-restore-primary {
    background: var(--bs-gold, #d4af37) !important;
    color: var(--executive-dark, #0f172a) !important;
    border: 1px solid var(--bs-gold, #d4af37) !important;
}

.restore-actions .btn-restore-primary:hover {
    background: #b8941f !important;
    color: var(--executive-dark, #0f172a) !important;
    border-color: #b8941f !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* Secondary Start Fresh button - subtle */
.restore-actions .btn-restore-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.restore-actions .btn-restore-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-1px);
}

/* Restored message styling */
.message.restored {
    opacity: 0.85;
    border-left: 3px solid var(--executive-purple, #6366f1);
    background: rgba(99, 102, 241, 0.05);
}

[data-bs-theme="dark"] .message.restored {
    background: rgba(99, 102, 241, 0.1);
}

.message.restored::before {
    content: "restored";
    position: absolute;
    top: -8px;
    right: 8px;
    font-size: 0.65rem;
    color: var(--executive-purple, #6366f1);
    background: var(--bg-primary, #f8fbff);
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.7;
}

[data-bs-theme="dark"] .message.restored::before {
    background: var(--executive-dark, #0f172a);
    color: var(--executive-purple-light, #a5b4fc);
}

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

/* Voice Feature Styles */
#voice-toggle {
    transition: color 0.3s ease;
}

#voice-toggle.active {
    color: var(--executive-gold, #d4af37) !important;
}

#voice-toggle:hover {
    transform: scale(1.1);
}

/* Speaking indicator */
.speaking-indicator {
    color: var(--executive-gold, #d4af37);
    margin-left: 8px;
    font-size: 14px;
    display: inline-block;
}

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

/* Voice wave animation */
.voice-wave {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 8px;
}

.voice-wave span {
    display: inline-block;
    width: 3px;
    height: 12px;
    background: var(--executive-gold, #d4af37);
    border-radius: 2px;
    animation: wave 0.8s ease-in-out infinite;
}

.voice-wave span:nth-child(2) {
    animation-delay: 0.1s;
    height: 16px;
}

.voice-wave span:nth-child(3) {
    animation-delay: 0.2s;
    height: 10px;
}

@keyframes wave {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.5);
    }
}

/* Ensure voice button is visible in both themes */
[data-bs-theme="light"] #voice-toggle {
    color: var(--text-primary, #0f172a);
}

[data-bs-theme="light"] #voice-toggle.active {
    color: var(--executive-gold, #d4af37) !important;
}

[data-bs-theme="dark"] #voice-toggle {
    color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="dark"] #voice-toggle.active {
    color: var(--executive-gold, #d4af37) !important;
}