/* Chat Widget Styles - Modern Design v2.1 */
/* Reset de estilos para evitar conflictos con temas de WordPress */

#gemini-chat-widget,
#gemini-chat-widget *,
#gemini-chat-widget *::before,
#gemini-chat-widget *::after {
    box-sizing: border-box !important;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Variables CSS */
#gemini-chat-widget {
    --gc-primary: #667eea;
    --gc-primary-dark: #5a67d8;
    --gc-primary-light: #a5b4fc;
    --gc-bg: #ffffff;
    --gc-text: #1f2937;
    --gc-text-light: #6b7280;
    --gc-border: #e5e7eb;
    --gc-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    --gc-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.1);
    --gc-radius: 20px;
    --gc-radius-sm: 16px;
}

/* Widget Container - Fijado en pantalla */
#gemini-chat-widget {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 2147483647 !important;
    /* Máximo z-index */
    font-size: 14px !important;
    line-height: 1.5 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Botón Toggle - Más visible */
#gemini-chat-toggle {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    background: linear-gradient(145deg, var(--gc-primary) 0%, var(--gc-primary-dark) 100%) !important;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.5), 0 0 0 0 rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    animation: gcPulse 3s infinite !important;
    outline: none !important;
}

@keyframes gcPulse {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.5), 0 0 0 0 rgba(102, 126, 234, 0.4);
    }

    50% {
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.5), 0 0 0 12px rgba(102, 126, 234, 0);
    }
}

#gemini-chat-toggle:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.6) !important;
    animation: none !important;
}

#gemini-chat-toggle:active {
    transform: scale(0.95) !important;
}

#gemini-chat-toggle img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

#gemini-chat-toggle svg {
    width: 28px !important;
    height: 28px !important;
    stroke: white !important;
    fill: none !important;
}

/* Badge de notificación */
.gemini-chat-badge {
    position: absolute !important;
    top: -4px !important;
    right: -4px !important;
    background: #ef4444 !important;
    color: white !important;
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid white !important;
    animation: gcBadgePulse 1.5s infinite !important;
}

@keyframes gcBadgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Ventana del Chat */
#gemini-chat-window {
    position: absolute !important;
    bottom: 80px !important;
    right: 0 !important;
    width: 400px !important;
    max-width: calc(100vw - 40px) !important;
    height: 560px !important;
    max-height: calc(100vh - 120px) !important;
    background: var(--gc-bg) !important;
    border-radius: var(--gc-radius) !important;
    box-shadow: var(--gc-shadow) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border: 1px solid var(--gc-border) !important;
    animation: gcSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

#gemini-chat-window.hidden {
    display: none !important;
}

@keyframes gcSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header del Chat */
.gemini-chat-header {
    background: linear-gradient(145deg, var(--gc-primary) 0%, var(--gc-primary-dark) 100%) !important;
    color: white !important;
    padding: 18px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-shrink: 0 !important;
    border-bottom: none !important;
}

.gemini-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
}

.gemini-header-logo {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    background: white !important;
}

.gemini-header-avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.gemini-header-avatar svg {
    width: 26px !important;
    height: 26px !important;
    stroke: white !important;
}

.gemini-header-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.gemini-header-title {
    font-weight: 700 !important;
    font-size: 16px !important;
    color: white !important;
    letter-spacing: -0.3px !important;
}

.gemini-header-status {
    font-size: 12px !important;
    opacity: 0.95 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

.gemini-status-dot {
    width: 8px !important;
    height: 8px !important;
    background: #4ade80 !important;
    border-radius: 50% !important;
    animation: gcStatusPulse 2s infinite !important;
    box-shadow: 0 0 6px #4ade80 !important;
}

@keyframes gcStatusPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 6px #4ade80;
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 2px #4ade80;
    }
}

#gemini-chat-close {
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    transition: all 0.2s !important;
    outline: none !important;
}

#gemini-chat-close:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: rotate(90deg) !important;
}

#gemini-chat-close svg {
    width: 20px !important;
    height: 20px !important;
    stroke: white !important;
}

/* Contenedor de Mensajes */
#gemini-chat-messages {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
}

#gemini-chat-messages::-webkit-scrollbar {
    width: 5px !important;
}

#gemini-chat-messages::-webkit-scrollbar-track {
    background: transparent !important;
}

#gemini-chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 10px !important;
}

#gemini-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8 !important;
}

/* Mensajes */
.gemini-message {
    display: flex !important;
    align-items: flex-end !important;
    gap: 10px !important;
    max-width: 88% !important;
    animation: gcFadeIn 0.3s ease !important;
}

@keyframes gcFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gemini-message.user {
    margin-left: auto !important;
    flex-direction: row-reverse !important;
}

.gemini-message.bot {
    margin-right: auto !important;
}

.gemini-message-content {
    padding: 14px 18px !important;
    border-radius: var(--gc-radius-sm) !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    line-height: 1.55 !important;
    font-size: 14px !important;
}

.gemini-message.user .gemini-message-content {
    background: linear-gradient(145deg, var(--gc-primary) 0%, var(--gc-primary-dark) 100%) !important;
    color: white !important;
    border-bottom-right-radius: 6px !important;
    box-shadow: var(--gc-shadow-sm) !important;
}

.gemini-message.bot .gemini-message-content {
    background: white !important;
    color: var(--gc-text) !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid rgba(0, 0, 0, 0.04) !important;
}

/* Estilos de contenido del mensaje */
.gemini-message-content strong,
.gemini-message-content b {
    font-weight: 700 !important;
}

.gemini-message-content em,
.gemini-message-content i {
    font-style: italic !important;
}

.gemini-message-content ul,
.gemini-message-content ol {
    margin: 8px 0 !important;
    padding-left: 20px !important;
}

.gemini-message-content li {
    margin: 4px 0 !important;
}

.gemini-message-content code {
    background: rgba(0, 0, 0, 0.08) !important;
    padding: 3px 7px !important;
    border-radius: 5px !important;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace !important;
    font-size: 13px !important;
}

.gemini-message-content pre {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    padding: 14px !important;
    border-radius: 10px !important;
    overflow-x: auto !important;
    margin: 10px 0 !important;
    font-size: 13px !important;
}

.gemini-message-content pre code {
    background: none !important;
    padding: 0 !important;
    color: inherit !important;
}

.gemini-message-content a {
    color: var(--gc-primary) !important;
    text-decoration: underline !important;
}

.gemini-message.user .gemini-message-content code {
    background: rgba(255, 255, 255, 0.2) !important;
}

.gemini-message.user .gemini-message-content a {
    color: white !important;
}

/* Indicador de escritura */
.gemini-typing {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 14px 18px !important;
    background: white !important;
    border-radius: var(--gc-radius-sm) !important;
    border-bottom-left-radius: 6px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    width: fit-content !important;
}

.gemini-typing-dot {
    width: 9px !important;
    height: 9px !important;
    background: var(--gc-primary) !important;
    border-radius: 50% !important;
    animation: gcTypingBounce 1.4s infinite ease-in-out !important;
}

.gemini-typing-dot:nth-child(1) {
    animation-delay: 0s !important;
}

.gemini-typing-dot:nth-child(2) {
    animation-delay: 0.2s !important;
}

.gemini-typing-dot:nth-child(3) {
    animation-delay: 0.4s !important;
}

@keyframes gcTypingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.5);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Área de Input */
.gemini-chat-input-area {
    padding: 16px 18px !important;
    background: white !important;
    border-top: 1px solid var(--gc-border) !important;
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
}

#gemini-chat-input {
    flex: 1 !important;
    border: 2px solid var(--gc-border) !important;
    border-radius: 28px !important;
    padding: 13px 22px !important;
    font-size: 14px !important;
    outline: none !important;
    transition: all 0.25s ease !important;
    background: #f9fafb !important;
    color: var(--gc-text) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

#gemini-chat-input:focus {
    border-color: var(--gc-primary) !important;
    background: white !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12) !important;
}

#gemini-chat-input::placeholder {
    color: var(--gc-text-light) !important;
}

#gemini-chat-send {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: linear-gradient(145deg, var(--gc-primary) 0%, var(--gc-primary-dark) 100%) !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    transition: all 0.25s ease !important;
    flex-shrink: 0 !important;
    outline: none !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35) !important;
}

#gemini-chat-send:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}

#gemini-chat-send:active {
    transform: scale(0.95) !important;
}

#gemini-chat-send:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

#gemini-chat-send svg {
    width: 20px !important;
    height: 20px !important;
    stroke: white !important;
    fill: none !important;
}

/* Footer */
.gemini-chat-footer {
    padding: 10px !important;
    text-align: center !important;
    font-size: 11px !important;
    color: var(--gc-text-light) !important;
    background: #fafbfc !important;
    border-top: 1px solid var(--gc-border) !important;
}

/* ==========================================
   RESPONSIVE DESIGN - Mobile First v2.4.0
   ========================================== */

/* Very Small Phones (iPhone SE, Galaxy S8) */
@media (max-width: 375px) {
    #gemini-chat-widget {
        bottom: 12px !important;
        right: 12px !important;
        left: 12px !important;
    }

    #gemini-chat-toggle {
        width: 52px !important;
        height: 52px !important;
    }

    #gemini-chat-window {
        position: fixed !important;
        top: 10px !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 70px !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 16px !important;
    }

    .gemini-chat-header {
        padding: 12px 14px !important;
    }

    .gemini-header-avatar,
    .gemini-header-logo {
        width: 36px !important;
        height: 36px !important;
    }

    .gemini-header-title {
        font-size: 14px !important;
    }

    #gemini-chat-messages {
        padding: 12px !important;
    }

    .gemini-message-content {
        padding: 10px 14px !important;
        font-size: 13px !important;
    }

    .gemini-chat-input-area {
        padding: 10px 12px !important;
        gap: 8px !important;
    }

    #gemini-chat-input {
        padding: 10px 16px !important;
        font-size: 14px !important;
    }

    #gemini-chat-send,
    #gemini-chat-mic {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
    }

    .gemini-quick-reply {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

/* Standard Mobile Phones */
@media (min-width: 376px) and (max-width: 480px) {
    #gemini-chat-widget {
        bottom: 16px !important;
        right: 16px !important;
    }

    #gemini-chat-toggle {
        width: 56px !important;
        height: 56px !important;
    }

    #gemini-chat-window {
        position: fixed !important;
        top: 16px !important;
        left: 16px !important;
        right: 16px !important;
        bottom: 80px !important;
        width: auto !important;
        height: auto !important;
        max-width: none !important;
        max-height: none !important;
        border-radius: 16px !important;
    }

    .gemini-chat-header {
        padding: 14px 16px !important;
    }

    #gemini-chat-messages {
        padding: 14px !important;
    }

    .gemini-chat-input-area {
        padding: 12px 14px !important;
    }

    #gemini-chat-input {
        padding: 12px 18px !important;
    }

    #gemini-chat-send,
    #gemini-chat-mic {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
}

/* Tablets Portrait */
@media (min-width: 481px) and (max-width: 768px) {
    #gemini-chat-widget {
        bottom: 20px !important;
        right: 20px !important;
    }

    #gemini-chat-window {
        width: 360px !important;
        height: 520px !important;
        max-height: calc(100vh - 100px) !important;
    }
}

/* Tablets Landscape & Small Laptops */
@media (min-width: 769px) and (max-width: 1024px) {
    #gemini-chat-window {
        width: 380px !important;
        height: 540px !important;
    }
}

/* Landscape Mode on Phones */
@media (max-height: 500px) and (orientation: landscape) {
    #gemini-chat-widget {
        bottom: 10px !important;
        right: 10px !important;
    }

    #gemini-chat-toggle {
        width: 48px !important;
        height: 48px !important;
    }

    #gemini-chat-window {
        position: fixed !important;
        top: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
        left: auto !important;
        width: 320px !important;
        height: auto !important;
        max-height: none !important;
    }

    .gemini-chat-header {
        padding: 10px 14px !important;
    }

    .gemini-header-avatar,
    .gemini-header-logo {
        width: 32px !important;
        height: 32px !important;
    }

    #gemini-chat-messages {
        padding: 10px !important;
    }

    .gemini-chat-input-area {
        padding: 8px 10px !important;
    }
}

/* iPhone Safe Areas (Notch & Home Indicator) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 480px) {
        #gemini-chat-widget {
            bottom: calc(12px + env(safe-area-inset-bottom)) !important;
            right: calc(12px + env(safe-area-inset-right)) !important;
            left: calc(12px + env(safe-area-inset-left)) !important;
        }

        #gemini-chat-window {
            top: calc(10px + env(safe-area-inset-top)) !important;
            bottom: calc(70px + env(safe-area-inset-bottom)) !important;
            left: calc(10px + env(safe-area-inset-left)) !important;
            right: calc(10px + env(safe-area-inset-right)) !important;
        }

        .gemini-chat-input-area {
            padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
        }
    }
}

/* Touch-friendly sizes - ensure minimum 44px tap targets */
@media (pointer: coarse) {

    #gemini-chat-toggle,
    #gemini-chat-send,
    #gemini-chat-mic,
    #gemini-chat-close,
    #gemini-chat-new,
    .gemini-quick-reply {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    .gemini-quick-reply {
        padding: 10px 16px !important;
    }
}

/* Accesibilidad - movimiento reducido */
@media (prefers-reduced-motion: reduce) {

    #gemini-chat-window,
    .gemini-message,
    #gemini-chat-toggle,
    .gemini-typing-dot,
    .gemini-status-dot,
    .gemini-chat-badge {
        animation: none !important;
    }

    #gemini-chat-toggle:hover,
    #gemini-chat-send:hover,
    #gemini-chat-close:hover {
        transform: none !important;
    }
}

/* Override para temas oscuros de WordPress */
body.dark-mode #gemini-chat-widget,
.wp-dark-mode-active #gemini-chat-widget,
[data-theme="dark"] #gemini-chat-widget {
    --gc-bg: #1e293b;
    --gc-text: #f1f5f9;
    --gc-text-light: #94a3b8;
    --gc-border: #334155;
}

body.dark-mode .gemini-message.bot .gemini-message-content,
.wp-dark-mode-active .gemini-message.bot .gemini-message-content,
[data-theme="dark"] .gemini-message.bot .gemini-message-content {
    background: #334155 !important;
    color: #f1f5f9 !important;
}

body.dark-mode #gemini-chat-input,
.wp-dark-mode-active #gemini-chat-input,
[data-theme="dark"] #gemini-chat-input {
    background: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

body.dark-mode #gemini-chat-messages,
.wp-dark-mode-active #gemini-chat-messages,
[data-theme="dark"] #gemini-chat-messages {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
}

body.dark-mode .gemini-chat-input-area,
.wp-dark-mode-active .gemini-chat-input-area,
[data-theme="dark"] .gemini-chat-input-area {
    background: #1e293b !important;
}

body.dark-mode .gemini-typing,
.wp-dark-mode-active .gemini-typing,
[data-theme="dark"] .gemini-typing {
    background: #334155 !important;
}

/* Quick Replies */
.gemini-quick-replies {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 0 20px 15px !important;
    animation: gcFadeIn 0.3s ease !important;
}

.gemini-quick-reply {
    background: white !important;
    border: 1px solid var(--gc-primary, #667eea) !important;
    color: var(--gc-primary, #667eea) !important;
    padding: 8px 14px !important;
    border-radius: 18px !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.gemini-quick-reply:hover {
    background: var(--gc-primary, #667eea) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

/* Header Actions */
.gemini-header-actions {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}

#gemini-chat-new {
    background: rgba(255, 255, 255, 0.15) !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    transition: all 0.2s !important;
    outline: none !important;
}

#gemini-chat-new:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: rotate(15deg) !important;
}

#gemini-chat-new svg {
    width: 16px !important;
    height: 16px !important;
    stroke: white !important;
}

/* Cache indicator */
.gemini-cached-indicator {
    font-size: 10px !important;
    color: var(--gc-text-light, #6b7280) !important;
    margin-top: 4px !important;
}

/* Loading shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.gemini-loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ==========================================
   ESTILOS DE VOZ v2.3.0
   ========================================== */

/* Botón de micrófono */
#gemini-chat-mic {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #f3f4f6 !important;
    border: 2px solid var(--gc-border) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--gc-text-light) !important;
    transition: all 0.25s ease !important;
    outline: none !important;
    flex-shrink: 0 !important;
}

#gemini-chat-mic svg {
    width: 20px !important;
    height: 20px !important;
    stroke: currentColor !important;
}

#gemini-chat-mic:hover {
    background: #e5e7eb !important;
    color: var(--gc-primary) !important;
    border-color: var(--gc-primary) !important;
}

/* Estado grabando */
#gemini-chat-mic.recording {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    animation: gcRecordingPulse 1s infinite !important;
}

@keyframes gcRecordingPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
        transform: scale(1.05);
    }
}

/* Indicador de estado de voz */
.gemini-voice-status {
    position: absolute !important;
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(0, 0, 0, 0.85) !important;
    color: white !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    margin-bottom: 10px !important;
    animation: gcFadeIn 0.2s ease !important;
    z-index: 10 !important;
    pointer-events: none !important;
}

.gemini-voice-status::after {
    content: '' !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    border: 6px solid transparent !important;
    border-top-color: rgba(0, 0, 0, 0.85) !important;
}

/* Contenedor de mensaje con speaker */
.gemini-message.bot .gemini-message-content {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}

.gemini-message-text {
    flex: 1 !important;
}

/* Botón de speaker en mensajes */
.gemini-speak-btn {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 16px !important;
    opacity: 0.4 !important;
    transition: all 0.2s ease !important;
    padding: 4px !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

.gemini-speak-btn:hover {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

.gemini-speak-btn.speaking {
    opacity: 1 !important;
    animation: gcSpeakerPulse 0.6s infinite !important;
}

@keyframes gcSpeakerPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Responsive para voz */
@media (max-width: 480px) {
    #gemini-chat-mic {
        width: 40px !important;
        height: 40px !important;
    }

    #gemini-chat-mic svg {
        width: 18px !important;
        height: 18px !important;
    }

    .gemini-speak-btn {
        font-size: 14px !important;
    }
}

/* Tema oscuro para elementos de voz */
body.dark-mode #gemini-chat-mic,
.wp-dark-mode-active #gemini-chat-mic,
[data-theme="dark"] #gemini-chat-mic {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #94a3b8 !important;
}

body.dark-mode #gemini-chat-mic:hover,
.wp-dark-mode-active #gemini-chat-mic:hover,
[data-theme="dark"] #gemini-chat-mic:hover {
    background: #475569 !important;
    color: var(--gc-primary) !important;
}