/* AI Chat Links - Clickable links in messages */
.ai-chat-link {
    color: #eea234 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    border-bottom: 1px solid rgba(238, 162, 52, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
}
.ai-chat-link:hover {
    color: #d68910 !important;
    border-bottom-color: #eea234;
    text-decoration: none !important;
}
.message.assistant .ai-chat-link {
    display: inline-block;
    margin: 2px 0;
}

/* Floating Order Button */
.floating-order-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #333;
    color: #eea234;
    width: 56px;
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    border-radius: 50%;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9998;
    font-family: 'Plateia', sans-serif;
    transition: width 0.4s ease, border-radius 0.4s ease, background 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    padding: 0;
}
.floating-order-btn i {
    font-size: 1.3rem;
    transition: all 0.4s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    margin-left: 0;
    width: 56px;
    min-width: 56px;
}
.floating-order-btn span,
.floating-order-btn .d-none {
    white-space: nowrap;
    margin-left: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateX(-10px);
    width: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}
.floating-order-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    background: #3a3a3a;
    color: #eea234;
    text-decoration: none;
    width: auto;
    padding-right: 22px;
    padding-left: 0;
    border-radius: 28px;
    height: 56px;
    min-height: 56px;
    max-height: 56px;
}
.floating-order-btn:hover i {
    margin-left: 0;
}
.floating-order-btn:hover span,
.floating-order-btn:hover .d-none {
    opacity: 1;
    transform: translateX(0);
    width: auto;
}
@media (max-width: 768px) {
    .floating-order-btn {
        width: 50px;
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }
    .floating-order-btn i {
        font-size: 1.2rem;
        width: 50px;
        min-width: 50px;
    }
    .floating-order-btn:hover {
        width: 50px;
        padding: 0;
        border-radius: 50%;
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }
    .floating-order-btn:hover span,
    .floating-order-btn:hover .d-none {
        opacity: 0;
        width: 0;
    }
}

/* Chat Widget Styles */
.ai-chat-widget {
    position: fixed;
    bottom: 20px; /* Changed from 90px to 20px - bigger from bottom */
    right: 20px;
    width: 380px;
    height: 750px; /* Increased from 700px for more space */
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 99999;
    overflow: hidden;
    transition: all 0.3s ease;
    font-family: Arial, sans-serif;
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.ai-chat-widget.closed {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    visibility: hidden;
}

.ai-chat-widget:not(.closed) {
    opacity: 1 !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

.ai-chat-header {
    background: #333;
    color: #eea234;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.ai-chat-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1em;
    margin-left: 10px;
}

.ai-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 10px;
    max-width: 80%;
    line-height: 1.4;
    font-size: 0.95em;
}

.message.assistant {
    background: #e9ecef;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: #eea234;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.ai-chat-input-area {
    padding: 0 !important;
    background: #f0f0f0 !important;
    border-top: 1px solid #e0e0e0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    flex-shrink: 0;
    min-height: auto !important;
    order: 2;
}

/* Inner row: textarea + send button */
.ai-chat-input-area .input-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 12px;
}

/* Input Container - Rounded box with white background */
.input-container {
    flex: 1 !important;
    display: flex !important;
    align-items: flex-end !important;
    background: white !important;
    border-radius: 20px !important;
    padding: 6px 10px !important;
    position: relative;
    min-width: 0;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    min-height: 38px !important;
    height: auto !important;
    max-height: none !important;
}

.input-container #ai-chat-input {
    flex: 1 !important;
    border: none !important;
    background: transparent !important;
    padding: 5px 4px !important;
    outline: none !important;
    font-size: 0.95em !important;
    color: #333 !important;
    width: 100% !important;
    min-width: 0 !important;
    line-height: 1.5 !important;
    resize: none !important;
    overflow-y: auto !important;
    min-height: 26px !important;
    max-height: 120px !important;
    font-family: inherit !important;
    align-self: flex-end !important;
}

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

.input-container .input-icon {
    color: #666;
    font-size: 1.1em;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
}

.input-container .input-icon:hover {
    background-color: rgba(238, 162, 52, 0.1);
    color: #eea234;
}

/* Mic button states - recording, paused */
.input-container .input-icon.recording {
    background-color: rgba(238, 162, 52, 0.2);
    color: #eea234;
    animation: pulse-recording 1.5s ease-in-out infinite;
}

.input-container .input-icon.paused {
    background-color: rgba(238, 162, 52, 0.15);
    color: #eea234;
}

@keyframes pulse-recording {
    0%, 100% {
        background-color: rgba(238, 162, 52, 0.2);
    }
    50% {
        background-color: rgba(238, 162, 52, 0.35);
    }
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: all 0.2s;
}

.send-btn {
    background: #eea234 !important;
    color: white !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
    padding: 0 !important;
    margin: 0 !important;
    margin-left: 8px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.send-btn:hover {
    background: #d4941f !important;
}

.icon-btn.send-btn {
    background: #eea234 !important;
    color: white !important;
}

/* Send button in mic mode (no text typed) */
.send-btn.mic-mode {
    background: #5a9fd4 !important;
}
.send-btn.mic-mode:hover {
    background: #4a8fc4 !important;
}
/* Pulse when actively listening */
.send-btn.mic-mode.listening {
    animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(90,159,212,0.6); }
    50%       { box-shadow: 0 0 0 8px rgba(90,159,212,0); }
}

.record-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* Voice Recording UI */
.voice-recording-ui {
    padding: 15px !important;
    background: white !important;
    border-top: 1px solid #eee !important;
    display: none !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0;
}

.voice-recording-ui:not([style*="display: none"]) {
    display: flex !important;
}

.recording-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #dc3545;
    font-weight: bold;
}

.recording-pulse {
    width: 12px;
    height: 12px;
    background: #dc3545;
    border-radius: 50%;
    animation: recording-pulse 1.5s infinite;
}

@keyframes recording-pulse {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.waveform-container {
    width: 100%;
    max-width: 250px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#waveform-canvas {
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

.recording-timer {
    font-size: 0.9em;
    color: #666;
    font-weight: bold;
}

#ai-mic-btn.listening {
    color: #28a745;
    animation: listening-pulse 2s infinite;
}

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

/* AI Chat Toggle Button Wrapper with Circular Text */
.ai-chat-toggle-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 120px;
    height: 120px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Hide toggle button when widget is open - handled by JavaScript */
.ai-chat-toggle-wrapper.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.ai-chat-circular-text {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.circular-text-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    animation: rotate-circle 15s linear infinite;
}

.circular-text {
    font-size: 20px;
    font-weight: 900;
    fill: #eea234;
    letter-spacing: 3px;
    text-transform: uppercase;
    stroke: #eea234;
    stroke-width: 0.5px;
    paint-order: stroke fill;
}

@keyframes rotate-circle {
    0% {
        transform: rotate(-90deg);
    }
    100% {
        transform: rotate(270deg);
    }
}

.ai-chat-toggle {
    position: relative;
    width: 80px; /* Increased from 60px */
    height: 80px; /* Increased from 60px */
    background: #333;
    color: #eea234;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 2em; /* Increased from 1.5em */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.ai-chat-toggle:hover {
    transform: translateY(-3px) scale(1.05);
    background: #3a3a3a;
    color: #eea234;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Quick Action Floating Buttons - REMOVED */

/* Typing Animation */
.typing-indicator {
    display: inline-block;
    padding: 5px 10px;
}

.typing-dots {
    display: inline-flex;
    gap: 2px;
    align-items: center;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: #eea234;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.6; }
    40% { transform: scale(1); opacity: 1; }
}

.typing-indicator span {
    display: inline-block;
    animation: wave 1.2s infinite ease-in-out;
    font-size: 0.9em;
    color: #666;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.1s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(4) { animation-delay: 0.3s; }
.typing-indicator span:nth-child(5) { animation-delay: 0.4s; }

/* Stop Audio Button */
.stop-audio-btn {
    display: none;
    margin-top: 8px;
    padding: 8px 16px;
    background: #eea234;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s;
    width: fit-content;
}

.stop-audio-btn[style*="display: flex"],
.stop-audio-btn[style*="display:block"] {
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.stop-audio-btn:hover {
    background: #d4941f;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(238, 162, 52, 0.3);
}

.stop-audio-btn i {
    margin-right: 4px;
}

/* Audio Playing Indicator */
.audio-playing-indicator {
    display: none;
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(238, 162, 52, 0.1);
    border-radius: 8px;
    align-items: center;
    gap: 8px;
}

.audio-playing-indicator .typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.audio-playing-indicator .typing-dots span {
    width: 6px;
    height: 6px;
    background: #eea234;
    border-radius: 50%;
    animation: wave-pulse 1.2s infinite;
}

.audio-playing-indicator .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.audio-playing-indicator .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Speaking Indicator Above Input Area */
.ai-speaking-indicator {
    display: none;
    margin: 0;
    padding: 12px 15px;
    background: rgba(238, 162, 52, 0.15);
    border-top: 1px solid rgba(238, 162, 52, 0.2);
    border-bottom: 1px solid rgba(238, 162, 52, 0.2);
    flex-shrink: 0;
    order: 1; /* Place it between messages and input */
}

.speaking-content {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}

.speaking-content .typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.speaking-content .typing-dots span {
    width: 6px;
    height: 6px;
    background: #eea234;
    border-radius: 50%;
    animation: wave-pulse 1.2s infinite;
}

.speaking-content .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.speaking-content .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.speaking-text {
    flex: 1;
    color: #eea234;
    font-size: 0.9em;
    font-weight: 500;
}

.stop-speaking-btn {
    padding: 6px 12px;
    background: #eea234;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stop-speaking-btn:hover {
    background: #d4941f;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(238, 162, 52, 0.3);
}

.stop-speaking-btn i {
    font-size: 0.85em;
}

@keyframes wave {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(-4px); opacity: 1; }
}

/* Camera Modal Styles */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 999999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 999999 !important;
    position: relative;
}

.camera-modal-header {
    background: #333;
    color: #eea234;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
}

.camera-modal-header h3 {
    margin: 0;
    font-size: 1.2em;
}

.camera-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-modal-body {
    padding: 20px;
}

.image-description-section {
    margin-top: 20px;
}

.image-description-section .image-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: block;
    border: 1px solid #ddd;
}

.image-description-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    margin-bottom: 10px;
}

.image-description-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.image-description-section .camera-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 100px;
    white-space: nowrap;
}

.image-description-buttons {
    display: flex;
    gap: 10px;
    align-items: stretch;
    width: 100%;
}

.image-description-buttons .camera-btn {
    flex: 1;
}

.image-description-buttons .camera-btn.cancel {
    flex: 0 0 auto;
    min-width: 100px;
}

.image-description-section .camera-btn:not(.cancel) {
    background: #eea234;
    color: white;
}

.image-description-section .camera-btn:not(.cancel):hover {
    background: #d68910;
}

.image-description-section .camera-btn.cancel {
    background: #6c757d;
    color: white;
}

.image-description-section .camera-btn.cancel:hover {
    background: #5a6268;
}

.camera-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 0;
    width: 100%;
    clear: both;
}

/* Ensure proper spacing and no overlap */
.camera-modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-description-section {
    width: 100%;
    clear: both;
}

.image-description-buttons {
    display: flex !important;
    gap: 10px !important;
    align-items: stretch !important;
    width: 100% !important;
    margin-top: 10px !important;
}

.image-description-buttons .camera-btn {
    flex: 1;
    min-width: 0;
}

.image-description-buttons .camera-btn.cancel {
    flex: 0 0 auto;
    min-width: 100px;
}

.camera-option-btn {
    background: #eea234;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.camera-option-btn:hover {
    background: #d68910;
    color: white;
}

.camera-preview {
    text-align: center;
}

#camera-video {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.camera-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.camera-btn {
    background: #eea234;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.3s;
}

.camera-btn:hover {
    background: #d4941f;
}

.camera-btn.cancel {
    background: #6c757d;
}

.camera-btn.cancel:hover {
    background: #5a6268;
}

/* Voice Status Indicator */
.voice-status {
    position: absolute;
    top: 60px;
    left: 15px;
    right: 15px;
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: bold;
    text-align: center;
    z-index: 1000;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    animation: status-fade-in 0.3s ease-out;
}

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

.voice-status.speaking {
    background: rgba(238, 162, 52, 0.9);
}

/* Voice Message Animations */
@keyframes wave-pulse {
    0%, 100% { height: 4px; opacity: 0.4; }
    50% { height: 16px; opacity: 1; }
}

.play-voice-btn:hover {
    background: #d4941f !important;
}

.wave-bar {
    animation: wave-pulse 1.5s infinite;
    animation-play-state: paused;
}

/* Inline image attachment bar (above input) */
.ai-image-attachment {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #fff8ee;
    border-bottom: 1px solid #eea234;
    flex-shrink: 0;
}
.ai-image-attachment img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #ddd;
    flex-shrink: 0;
}
#ai-attachment-label {
    flex: 1;
    font-size: 0.82em;
    color: #666;
}
#ai-attachment-remove {
    background: none;
    border: none;
    font-size: 1.2em;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0 2px;
    flex-shrink: 0;
}
#ai-attachment-remove:hover {
    color: #c0392b;
}

/* Proactive Toast Notification — positioned above AI widget toggle */
.wsw-proactive-toast {
    position: fixed;
    bottom: 150px;
    right: 20px;
    width: 340px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2), 0 2px 8px rgba(0,0,0,0.08);
    z-index: 99998;
    display: flex;
    align-items: flex-start;
    padding: 18px;
    gap: 14px;
    cursor: pointer;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.35s ease;
    border-left: 5px solid #eea234;
}
.wsw-proactive-toast.wsw-toast-visible {
    transform: translateY(0);
    opacity: 1;
}
.wsw-toast-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: #333;
    color: #eea234;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.wsw-toast-content {
    flex: 1;
    min-width: 0;
}
.wsw-toast-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    margin-bottom: 5px;
}
.wsw-toast-message {
    font-size: 1rem;
    color: #444;
    line-height: 1.5;
}
.wsw-toast-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.wsw-toast-close:hover {
    color: #333;
}

@media (max-width: 480px) {
    .wsw-proactive-toast {
        width: calc(100% - 30px);
        right: 15px;
        bottom: 150px;
    }
}

@media (max-width: 480px) {
    .ai-chat-toggle-wrapper {
        width: 90px;
        height: 90px;
        bottom: 15px;
        right: 15px;
    }

    .ai-chat-toggle {
        width: 70px;
        height: 70px;
        font-size: 1.8em;
    }

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

    .ai-chat-widget {
        width: 90%;
        height: 85vh; /* Increased from 80vh for more space */
        bottom: 15px; /* Changed from 80px to 15px - bigger from bottom */
        right: 5%;
    }
    .message {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .camera-modal-content {
        width: 95%;
        margin: 10px;
    }
    .camera-options {
        flex-direction: column;
    }
    .voice-status {
        top: 50px;
        left: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.8em;
    }
    .voice-recording-ui {
        padding: 10px;
    }
    .waveform-container {
        max-width: 200px;
    }

}

/* Chat panel fills remaining widget height — min-height:0 allows flex shrink when input grows */
.widget-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ── Mic recording state — green pulse ───────────────────────────── */
#ai-mic-btn.recording {
    color: #27ae60 !important;
    animation: mic-pulse 1s ease-in-out infinite;
}
@keyframes mic-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.2); opacity: 0.8; }
}

/* ── Speaker button muted state ─────────────────────────────────── */
#ai-speaker-btn.muted { color: #e74c3c !important; }
