/* WhatsApp Bubble Chat - Estilos principales */
.wbc-bubble-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Burbuja */
.wbc-bubble {
    background: #25D366;
    color: #fff;
    position: relative;
}

.wbc-bubble svg {
    width: 32px;
    height: 32px;
}

.wbc-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    background: #ff4444;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: wbc-pulse 2s infinite;
}

@keyframes wbc-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Ventana de chat */
.wbc-chat-window {
    font-size: 14px;
    line-height: 1.5;
}

.wbc-chat-header {
    padding: 16px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wbc-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wbc-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wbc-avatar-default svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.wbc-header-text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.wbc-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wbc-status-dot {
    width: 8px;
    height: 8px;
    background: #4ad504;
    border-radius: 50%;
    animation: wbc-blink 2s infinite;
}

@keyframes wbc-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.wbc-close-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.wbc-close-btn:hover {
    opacity: 1;
}

.wbc-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Cuerpo del chat */
.wbc-chat-body {
    padding: 16px;
    background: #f0f0f0;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.wbc-message {
    margin-bottom: 12px;
    max-width: 85%;
}

.wbc-message-incoming {
    margin-right: auto;
}

.wbc-message-content {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.wbc-message-content::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 8px 0;
    border-color: transparent #fff transparent transparent;
}

.wbc-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    display: block;
}

/* Footer */
.wbc-chat-footer {
    padding: 16px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
}

.wbc-input-preview {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
    max-height: 60px;
    overflow-y: auto;
}

.wbc-send-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    color: #fff;
    text-decoration: none;
    border-radius: 24px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wbc-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.wbc-send-btn svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 480px) {
    .wbc-bubble-wrapper.position-right {
        right: 10px;
        bottom: 10px;
    }
    
    .wbc-bubble-wrapper.position-left {
        left: 10px;
        bottom: 10px;
    }
    
    .wbc-bubble {
        width: 50px;
        height: 50px;
    }
    
    .wbc-chat-window {
        bottom: 70px;
    }
}

/* Animaciones */
.wbc-bubble-wrapper.animating .wbc-bubble {
    animation: wbc-bounce 0.5s ease;
}

@keyframes wbc-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    .wbc-bubble-wrapper,
    .wbc-chat-window,
    .wbc-bubble {
        transition: none !important;
        animation: none !important;
    }
}

/* Foco visible para navegación por teclado */
.wbc-bubble:focus,
.wbc-close-btn:focus,
.wbc-send-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}