/* Voice Assistant Widget Styles */

/* Arabic Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&family=Tajawal:wght@400;500;700&display=swap');

/* Reset and Base Styles */
.wp-vaw-widget-root {
    font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    direction: rtl;
}

/* Floating Robot Button - No Circle */
.wp-vaw-toggle-button {
    position: fixed;
    bottom: 6.5rem; /* Positioned above chat button (1.5rem + 4rem button height + 1rem spacing) */
    right: 1.5rem; /* Match chat button right position */
    z-index: 999; /* Below chat container (1000) to avoid overlap */
    width: auto;
    height: auto;
    background: transparent;
    background-image: none !important;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    /* Smooth floating animation */
    animation: button-entrance 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), 
               button-float-smooth 3s ease-in-out infinite;
}

/* Hide robot button when chat widget is open - handled by JavaScript */
.wp-vaw-toggle-button.chat-open {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(20px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hide toast when chat widget is open */
.wp-vaw-toast.chat-open {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    animation: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Floating Robot Icon with Vertical Rotation - Bigger, No Background */
.wp-vaw-robot-icon {
    width: 7rem;
    height: 7rem;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4)) 
            drop-shadow(0 0 20px rgba(20, 184, 166, 0.3));
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    /* Slight vertical rotation for fancy look */
    transform: perspective(500px) rotateX(-8deg) rotateY(2deg);
    animation: robot-idle 3s ease-in-out infinite;
    pointer-events: none;
    /* Remove any background */
    background: transparent !important;
    background-image: none !important;
}

@keyframes robot-idle {
    0%, 100% {
        transform: perspective(500px) rotateX(-8deg) rotateY(2deg) translateY(0);
    }
    25% {
        transform: perspective(500px) rotateX(-10deg) rotateY(-2deg) translateY(-4px);
    }
    50% {
        transform: perspective(500px) rotateX(-8deg) rotateY(2deg) translateY(-6px);
    }
    75% {
        transform: perspective(500px) rotateX(-6deg) rotateY(4deg) translateY(-4px);
    }
}

.wp-vaw-toggle-button:hover .wp-vaw-robot-icon {
    transform: perspective(500px) rotateX(-5deg) rotateY(0deg) scale(1.2);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5)) 
            drop-shadow(0 0 30px rgba(20, 184, 166, 0.5));
}

.wp-vaw-icon-fallback {
    width: 1.75rem;
    height: 1.75rem;
    position: relative;
    z-index: 2;
    color: white;
}

.wp-vaw-toggle-button:hover {
    transform: scale(1.05);
}

.wp-vaw-toggle-button:active {
    transform: scale(0.95);
}

.wp-vaw-toggle-button:active .wp-vaw-robot-icon {
    transform: perspective(500px) rotateX(-8deg) rotateY(2deg) scale(0.95);
}


/* Pulse Animation - Around Robot */
.wp-vaw-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7rem;
    height: 7rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.4) 0%, transparent 70%);
    animation: pulse-ring-robot 2s ease-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes pulse-ring-robot {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

/* Floating animation - Same as chat button */
@keyframes button-entrance {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes button-float-smooth {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-8px) translateX(2px);
    }
    50% {
        transform: translateY(-12px) translateX(0);
    }
    75% {
        transform: translateY(-8px) translateX(-2px);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Animated Toast Notification - Always Appearing */
.wp-vaw-toast {
    position: fixed;
    bottom: 15rem; /* Above the bigger robot */
    right: 1.5rem;
    z-index: 1003; /* Above button */
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    animation: toast-loop 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes toast-loop {
    /* Entrance */
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    5% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    /* Visible and bouncing */
    5.1%, 75% {
        opacity: 1;
        transform: translateY(0) scale(1);
        animation-timing-function: ease-in-out;
    }
    /* Bounce animation during visible phase */
    10%, 20%, 30%, 40%, 50%, 60%, 70% {
        transform: translateY(-8px) scale(1.02);
    }
    15%, 25%, 35%, 45%, 55%, 65% {
        transform: translateY(0) scale(1);
    }
    /* Fade out */
    75% {
        opacity: 1;
    }
    80% {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    /* Hidden for 10 seconds */
    80.1%, 100% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
}

.wp-vaw-toast-content {
    background: linear-gradient(135deg, #0a1e3d 0%, #0d2847 50%, #0f172a 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1.25rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(20, 184, 166, 0.2),
                0 0 40px rgba(20, 184, 166, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 2px solid rgba(20, 184, 166, 0.4);
    backdrop-filter: blur(20px);
    min-width: 200px;
    position: relative;
    font-weight: 600;
}

.wp-vaw-toast-icon {
    font-size: 1.5rem;
    animation: icon-pulse 1.2s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(20, 184, 166, 0.6));
}

.wp-vaw-toast-text {
    font-size: 1rem;
    font-weight: 700;
    color: #f3f4f6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    animation: text-glow 2s ease-in-out infinite;
}

@keyframes text-glow {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 0 rgba(20, 184, 166, 0);
    }
    50% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(20, 184, 166, 0.5);
    }
}

.wp-vaw-toast-arrow {
    position: absolute;
    bottom: -0.6rem;
    right: 2.5rem;
    width: 1.2rem;
    height: 1.2rem;
    background: linear-gradient(135deg, #0a1e3d 0%, #0d2847 100%);
    border-right: 2px solid rgba(20, 184, 166, 0.4);
    border-bottom: 2px solid rgba(20, 184, 166, 0.4);
    transform: rotate(45deg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}


@keyframes icon-pulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.15) rotate(-5deg);
    }
    50% {
        transform: scale(1.25) rotate(0deg);
    }
    75% {
        transform: scale(1.15) rotate(5deg);
    }
}

/* Modal Styles */
.wp-vaw-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.wp-vaw-modal.wp-vaw-modal-open {
    opacity: 1;
    visibility: visible;
}

.wp-vaw-backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    cursor: pointer;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), backdrop-filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-vaw-modal.wp-vaw-modal-open .wp-vaw-backdrop {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.wp-vaw-modal-content {
    position: relative;
    width: 100%;
    max-width: 48rem; /* Increased from 32rem (512px) to 48rem (768px) for better width */
    max-height: 90vh; /* Increased height to fit form properly */
    margin: 0 1rem;
    background-color: #0a1e3d;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    border: 1px solid rgba(20, 184, 166, 0.2);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.wp-vaw-modal.wp-vaw-modal-open .wp-vaw-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Modal Header */
.wp-vaw-modal-header {
    position: relative;
    background: linear-gradient(135deg, #0a1e3d 0%, #0d2847 50%, #0f1b2e 100%);
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid rgba(20, 184, 166, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.wp-vaw-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wp-vaw-icon-wrapper {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.3) 0%, rgba(20, 184, 166, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-vaw-icon-wrapper:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.3);
}

.wp-vaw-icon-volume {
    width: 1.5rem;
    height: 1.5rem;
    color: #5eead4;
}

.wp-vaw-modal-title {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.wp-vaw-modal-status {
    color: #5eead4;
    margin: 0;
    font-size: 0.75rem;
}

.wp-vaw-close-button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-vaw-close-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wp-vaw-close-button:active {
    transform: rotate(90deg) scale(0.95);
}

.wp-vaw-icon-x {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

/* Messages Area */
.wp-vaw-messages-area {
    padding: 1.25rem;
    max-height: 28rem; /* Increased from 21.875rem to 28rem (448px) to fit form better */
    min-height: 20rem; /* Ensure minimum height for better form display */
    overflow-y: auto;
    direction: rtl;
    scroll-behavior: smooth;
    background: linear-gradient(to bottom, rgba(10, 30, 61, 0.5) 0%, rgba(13, 40, 71, 0.3) 100%);
    flex: 1; /* Allow it to grow to fill available space */
}

.wp-vaw-messages-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Empty State */
.wp-vaw-empty-state {
    text-align: center;
    padding: 3rem 0;
}

.wp-vaw-empty-icon-wrapper {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background-color: rgba(20, 184, 166, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-vaw-icon-mic-large {
    width: 2.5rem;
    height: 2.5rem;
    color: #5eead4;
}

.wp-vaw-empty-text {
    color: #d1d5db;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.wp-vaw-empty-subtext {
    color: #6b7280;
    font-size: 0.75rem;
}

/* Messages */
.wp-vaw-message {
    display: flex;
    margin-bottom: 1rem;
    animation: messageSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

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

.wp-vaw-message-user {
    justify-content: flex-end;
}

.wp-vaw-message-assistant {
    justify-content: flex-start;
}

.wp-vaw-message-content {
    max-width: 85%;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    word-wrap: break-word;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(10px);
    font-size: 0.875rem;
    line-height: 1.5;
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

.wp-vaw-message-content:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.wp-vaw-message-user .wp-vaw-message-content {
    background: linear-gradient(to right, #14b8a6, #0d9488);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.wp-vaw-message-assistant .wp-vaw-message-content {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f3f4f6;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wp-vaw-message-text {
    line-height: 1.5;
    margin: 0;
    font-size: 0.875rem;
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext; /* Ensures proper Arabic text rendering */
}

.wp-vaw-message-time {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    display: block;
}

/* Real-time Transcription Styles */
.wp-vaw-realtime-transcription {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease;
}

.wp-vaw-realtime-input {
    align-self: flex-end;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(8px);
    color: #e2e8f0;
    padding: 0.5rem 0.75rem;
    border-radius: 1rem 1rem 0.25rem 1rem;
    font-size: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 85%;
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
    line-height: 1.4;
    transition: opacity 0.1s ease;
}

.wp-vaw-realtime-output {
    align-self: flex-start;
    background: rgba(45, 212, 191, 0.1);
    backdrop-filter: blur(8px);
    color: #2dd4bf;
    padding: 0.5rem 0.75rem;
    border-radius: 1rem 1rem 1rem 0.25rem;
    font-size: 0.75rem;
    border: 1px solid rgba(45, 212, 191, 0.2);
    max-width: 85%;
    direction: rtl;
    text-align: right;
    unicode-bidi: plaintext;
    line-height: 1.4;
    transition: opacity 0.1s ease;
}

/* Email Input Form */
.wp-vaw-email-form {
    margin: 1rem 0;
    animation: messageSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wp-vaw-email-form-content {
    background: rgba(20, 184, 166, 0.15);
    border: 1px solid rgba(20, 184, 166, 0.3);
    border-radius: 1rem;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
}

.wp-vaw-email-form-label {
    color: #5eead4;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    text-align: center;
    direction: rtl;
}

.wp-vaw-contact-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.wp-vaw-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wp-vaw-form-label {
    color: #5eead4;
    font-size: 0.75rem;
    font-weight: 500;
    direction: rtl;
    text-align: right;
}

.wp-vaw-contact-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wp-vaw-contact-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.2);
}

.wp-vaw-contact-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.wp-vaw-form-submit-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
}

.wp-vaw-email-submit {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.wp-vaw-email-submit:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.3);
}

.wp-vaw-email-submit:active {
    transform: translateY(0);
}

.wp-vaw-email-form-error {
    color: #ef4444;
    font-size: 0.75rem;
    margin: 0.5rem 0 0 0;
    text-align: center;
    direction: rtl;
}

/* Processing Indicator */
.wp-vaw-processing {
    display: flex;
    justify-content: flex-start;
}

.wp-vaw-processing-content {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wp-vaw-dots {
    display: flex;
    gap: 0.5rem;
}

.wp-vaw-dot {
    width: 0.625rem;
    height: 0.625rem;
    background-color: #5eead4;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.wp-vaw-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.wp-vaw-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Voice Controls */
.wp-vaw-voice-controls {
    padding: 1.5rem;
    border-top: 1px solid rgba(20, 184, 166, 0.2);
}

.wp-vaw-visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 4rem;
    margin-bottom: 1rem;
}

.wp-vaw-visualizer-bars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    height: 100%;
}

.wp-vaw-visualizer-bar {
    width: 0.25rem;
    background-color: #5eead4;
    border-radius: 9999px;
    animation: pulse-visualizer 0.5s ease-in-out infinite;
}

@keyframes pulse-visualizer {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

.wp-vaw-control-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    width: 100%;
}

/* Meeting Booking Button - Positioned on the far left */
.wp-vaw-meeting-button {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 2rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.3), 0 0 15px rgba(20, 184, 166, 0.2);
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    color: white;
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    animation: fadeInButton 0.5s ease-in forwards;
    position: absolute;
    left: 0;
    margin-left: 0;
}

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

.wp-vaw-meeting-button:hover {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(20, 184, 166, 0.4), 0 0 25px rgba(20, 184, 166, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.wp-vaw-meeting-button:active {
    transform: scale(0.98);
}

.wp-vaw-meeting-icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke: currentColor;
    stroke-width: 2;
}

.wp-vaw-meeting-text {
    white-space: nowrap;
}

/* Microphone Button */
.wp-vaw-mic-button {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 25px rgba(20, 184, 166, 0.4), 0 0 20px rgba(20, 184, 166, 0.2);
    position: relative;
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
    overflow: hidden;
}

.wp-vaw-mic-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wp-vaw-mic-button:hover:not(:disabled)::before {
    opacity: 1;
}

.wp-vaw-mic-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    transform: scale(1.1);
    box-shadow: 0 15px 35px rgba(20, 184, 166, 0.5), 0 0 30px rgba(20, 184, 166, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.wp-vaw-mic-button:active:not(:disabled) {
    transform: scale(0.95);
}

.wp-vaw-mic-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: scale(1);
}

.wp-vaw-mic-button.listening {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4), 0 0 30px rgba(239, 68, 68, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
    animation: pulse-mic 2s ease-in-out infinite;
}

.wp-vaw-mic-button.listening::before {
    opacity: 1;
    animation: micGlow 1.5s ease-in-out infinite;
}

.wp-vaw-mic-button.listening:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: scale(1.15);
}

@keyframes micGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.wp-vaw-mic-icon {
    width: 2rem;
    height: 2rem;
    color: white;
    position: relative;
    z-index: 1;
}

.wp-vaw-mic-icon-off {
    display: none;
}

.wp-vaw-mic-button.listening .wp-vaw-mic-icon {
    display: none;
}

.wp-vaw-mic-button.listening .wp-vaw-mic-icon-off {
    display: block;
}

.wp-vaw-mic-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: #ef4444;
    animation: pulse-mic 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.75;
    display: none;
}

@keyframes pulse-mic {
    0% {
        transform: scale(1);
        opacity: 0.75;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.wp-vaw-mic-button.listening .wp-vaw-mic-pulse {
    display: block;
}

/* Status Indicator */
.wp-vaw-status-indicator {
    padding: 0 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.wp-vaw-status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}

.wp-vaw-status-idle {
    background-color: #5eead4;
}

.wp-vaw-status-listening {
    background-color: #ef4444;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.wp-vaw-status-processing {
    background-color: #eab308;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.wp-vaw-status-speaking {
    background-color: #22c55e;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.wp-vaw-status-text {
    font-size: 0.75rem;
    color: #5eead4;
}

/* Scrollbar Styling */
.wp-vaw-messages-area::-webkit-scrollbar {
    width: 8px;
}

.wp-vaw-messages-area::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.wp-vaw-messages-area::-webkit-scrollbar-thumb {
    background: rgba(20, 184, 166, 0.3);
    border-radius: 4px;
}

.wp-vaw-messages-area::-webkit-scrollbar-thumb:hover {
    background: rgba(20, 184, 166, 0.5);
}

/* Responsive Design */
@media (max-width: 640px) {
    .wp-vaw-toggle-button {
        bottom: 6rem; /* Keep above chat button on mobile too */
        right: 1.5rem;
    }
    
    .wp-vaw-robot-icon {
        width: 5.5rem;
        height: 5.5rem;
    }
    
    .wp-vaw-pulse {
        width: 5.5rem;
        height: 5.5rem;
    }
    
    .wp-vaw-toast {
        bottom: 12rem;
    }
    
    .wp-vaw-toast {
        bottom: 10.5rem;
        right: 1rem;
    }
    
    .wp-vaw-toast-content {
        min-width: 160px;
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }
    
    .wp-vaw-modal-content {
        margin: 0 0.5rem;
        max-height: 90vh;
    }
    
    .wp-vaw-messages-area {
        max-height: 15rem;
    }
    
    .wp-vaw-mic-button {
        width: 4rem;
        height: 4rem;
    }
    
    .wp-vaw-mic-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

