/**
 * WP Chat Pro - Public Styles v2 Premium
 * Estilos premium con Glassmorphic Blur, 5 Temas e Interacciones Fluidas
 */

/* ===== 1. TEMAS PREMIUM Y CONFIGURACIÓN DE VARIABLES ===== */

/* Valores por defecto */
:root {
    --wp-chat-primary-color: #3b82f6;
    --wp-chat-primary-rgb: 59, 130, 246;
    --wp-chat-text-color: #ffffff;
    --wp-chat-accent-color: #f5a623;
    --wp-chat-accent-rgb: 245, 166, 35;
    --wp-chat-font-family: 'Poppins', sans-serif;
    --wp-chat-blur: blur(12px);
    --wp-chat-bg-opacity: 0.95;
    --wp-chat-border-radius: 50px;
    --wp-chat-border-color: rgba(255, 255, 255, 0.25);
    --wp-chat-glow: 0 8px 32px rgba(59, 130, 246, 0.35);
}

/* 1. Default Premium Blue */
.wp-chat-theme-default {
    --wp-chat-primary-color: #3b82f6;
    --wp-chat-primary-rgb: 59, 130, 246;
    --wp-chat-text-color: #ffffff;
    --wp-chat-accent-color: #f5a623;
    --wp-chat-accent-rgb: 245, 166, 35;
    --wp-chat-font-family: 'Poppins', sans-serif;
    --wp-chat-blur: blur(12px);
    --wp-chat-bg-opacity: 0.95;
    --wp-chat-border-radius: 50px;
    --wp-chat-border-color: rgba(255, 255, 255, 0.2);
    --wp-chat-glow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

/* 2. Futuristic Cyberpunk */
.wp-chat-theme-cyberpunk {
    --wp-chat-primary-color: #0f172a;
    --wp-chat-primary-rgb: 15, 23, 42;
    --wp-chat-text-color: #fef08a;
    --wp-chat-accent-color: #ec4899;
    --wp-chat-accent-rgb: 236, 72, 153;
    --wp-chat-font-family: 'Inter', sans-serif;
    --wp-chat-blur: blur(0px);
    --wp-chat-bg-opacity: 0.98;
    --wp-chat-border-radius: 0px;
    --wp-chat-border-color: #fef08a;
    --wp-chat-glow: 0 0 15px rgba(254, 240, 138, 0.4);
}

/* 3. Glassmorphism Dark */
.wp-chat-theme-glass-dark {
    --wp-chat-primary-color: rgba(15, 23, 42, 0.7);
    --wp-chat-primary-rgb: 15, 23, 42;
    --wp-chat-text-color: #f8fafc;
    --wp-chat-accent-color: #38bdf8;
    --wp-chat-accent-rgb: 56, 189, 248;
    --wp-chat-font-family: 'Inter', sans-serif;
    --wp-chat-blur: blur(20px);
    --wp-chat-bg-opacity: 0.7;
    --wp-chat-border-radius: 16px;
    --wp-chat-border-color: rgba(255, 255, 255, 0.08);
    --wp-chat-glow: 0 8px 32px rgba(56, 189, 248, 0.25);
}

/* 4. Warm Sunset */
.wp-chat-theme-warm-sunset {
    --wp-chat-primary-color: linear-gradient(135deg, #f97316, #a855f7);
    --wp-chat-primary-rgb: 249, 115, 22;
    --wp-chat-text-color: #ffffff;
    --wp-chat-accent-color: #facc15;
    --wp-chat-accent-rgb: 250, 204, 21;
    --wp-chat-font-family: 'Montserrat', sans-serif;
    --wp-chat-blur: blur(12px);
    --wp-chat-bg-opacity: 0.92;
    --wp-chat-border-radius: 24px;
    --wp-chat-border-color: rgba(255, 255, 255, 0.15);
    --wp-chat-glow: 0 8px 32px rgba(249, 115, 22, 0.35);
}

/* 5. Cosmic Space */
.wp-chat-theme-cosmic-space {
    --wp-chat-primary-color: linear-gradient(135deg, #4c1d95, #0d0f1a);
    --wp-chat-primary-rgb: 76, 29, 149;
    --wp-chat-text-color: #ffffff;
    --wp-chat-accent-color: #06b6d4;
    --wp-chat-accent-rgb: 6, 182, 212;
    --wp-chat-font-family: 'Poppins', sans-serif;
    --wp-chat-blur: blur(16px);
    --wp-chat-bg-opacity: 0.95;
    --wp-chat-border-radius: 50px;
    --wp-chat-border-color: rgba(255, 255, 255, 0.1);
    --wp-chat-glow: 0 8px 32px rgba(6, 182, 212, 0.4);
}

/* ===== 2. CONTENEDOR PRINCIPAL ===== */
.wp-chat-widget-v2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    font-family: var(--wp-chat-font-family);
    pointer-events: none;
}

.wp-chat-float-btn,
.wp-chat-window {
    pointer-events: auto;
}

/* ===== 3. BOTÓN FLOTANTE PREMIUM ===== */
.wp-chat-float-btn {
    position: fixed;
    transform: translate(-50%, -50%);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    z-index: 999999;
}

/* Anillos Pulsantes Concéntricos Dobles */
.wp-chat-pulse-ring {
    position: absolute;
    border-radius: 50%;
    inset: -12px;
    border: 2px solid var(--wp-chat-accent-color);
    animation: wp-chat-double-pulse 2.2s cubic-bezier(0.25, 0, 0, 1) infinite;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.wp-chat-pulse-ring::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    inset: -6px;
    border: 1px dashed var(--wp-chat-accent-color);
    animation: wp-chat-double-pulse 2.2s cubic-bezier(0.25, 0, 0, 1) infinite;
    animation-delay: 0.5s;
    opacity: 0;
}

@keyframes wp-chat-double-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.22);
        box-shadow: 0 0 0 20px transparent;
        opacity: 0;
    }
}

/* Botón Inner con Glassmorphism */
.wp-chat-btn-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 22px;
    position: relative;
    overflow: visible;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    white-space: nowrap;
    background: var(--wp-chat-primary-color);
    color: var(--wp-chat-text-color);
    border-radius: var(--wp-chat-border-radius);
    font-family: var(--wp-chat-font-family);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid var(--wp-chat-border-color);
    backdrop-filter: var(--wp-chat-blur);
    -webkit-backdrop-filter: var(--wp-chat-blur);
}

.wp-chat-btn-inner:hover {
    transform: scale(1.04) translateY(-3px);
    box-shadow: var(--wp-chat-glow), 0 12px 35px rgba(0, 0, 0, 0.45);
}

/* Badge Premium */
.wp-chat-badge {
    position: absolute;
    top: -12px;
    right: -4px;
    font-size: 0.7em;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    letter-spacing: 0.8px;
    background: var(--wp-chat-accent-color);
    color: #000000;
    animation: wp-chat-badge-bounce 2s ease-in-out infinite;
}

@keyframes wp-chat-badge-bounce {
    0%, 100% { transform: scale(1) translateY(0); }
    50% { transform: scale(1.06) translateY(-2px); }
}

/* Icono */
.wp-chat-btn-icon {
    font-size: 1.8em;
    line-height: 1;
    display: inline-block;
    flex-shrink: 0;
}

/* Textos */
.wp-chat-btn-texts {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wp-chat-btn-main {
    font-weight: 700;
    line-height: 1.2;
    font-size: 14px;
}

.wp-chat-btn-sub {
    opacity: 0.82;
    line-height: 1.3;
    font-size: 11px;
}

/* Flecha */
.wp-chat-btn-arrow {
    font-size: 1.4em;
    font-weight: 900;
    opacity: 0.9;
    margin-left: 4px;
    animation: wp-chat-arrow 1.8s ease-in-out infinite;
}

@keyframes wp-chat-arrow {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(4px); }
}


/* ===== 4. VENTANA DE CHAT (GLASSMORPHISM) ===== */
.wp-chat-window {
    position: absolute;
    bottom: 85px;
    right: 20px;
    width: 380px;
    height: 530px;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: wp-chat-window-elastic 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
    pointer-events: auto;
    z-index: 999999;
}

@keyframes wp-chat-window-elastic {
    from {
        opacity: 0;
        transform: translateY(25px) scale(0.94);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Soporte para modo oscuro por clase de tema */
.wp-chat-theme-glass-dark .wp-chat-window,
.wp-chat-theme-cyberpunk .wp-chat-window {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    color: #f8fafc;
}

/* Header Premium con Gradiente y Avatar */
.wp-chat-header {
    background: var(--wp-chat-primary-color);
    color: var(--wp-chat-text-color);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
    min-height: 75px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.wp-chat-header-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.wp-chat-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.wp-chat-header-icon {
    font-size: 1.8em;
}

.wp-chat-header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.wp-chat-header-text h4 {
    margin: 0;
    font-size: 1.08em;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.wp-chat-status {
    font-size: 0.76em;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.95;
    margin-top: 3px;
    font-weight: 600;
}

.wp-chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: wp-chat-pulse-status 2s infinite;
}

.wp-chat-status.offline::before {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    animation: none;
}

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

.wp-chat-close, .wp-chat-end-session {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: all 0.25s ease;
    border-radius: 50%;
}

.wp-chat-close:hover, .wp-chat-end-session:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.08);
}


/* ===== 5. FORMULARIO DE BIENVENIDA ===== */
.wp-chat-start-form {
    flex: 1;
    padding: 28px 24px;
    overflow-y: auto;
    background: transparent;
}

.wp-chat-welcome-text {
    margin: 0 0 20px;
    color: #334155;
    line-height: 1.6;
    font-size: 1.02em;
    text-align: center;
    font-weight: 500;
}

.wp-chat-theme-glass-dark .wp-chat-welcome-text,
.wp-chat-theme-cyberpunk .wp-chat-welcome-text {
    color: #cbd5e1;
}

.wp-chat-form-group {
    margin-bottom: 18px;
    text-align: left;
}

.wp-chat-form-group label {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-weight: 600;
    font-size: 0.88em;
}

.wp-chat-theme-glass-dark .wp-chat-form-group label,
.wp-chat-theme-cyberpunk .wp-chat-form-group label {
    color: #cbd5e1;
}

.wp-chat-form-group label small {
    color: #94a3b8;
    font-weight: normal;
}

.wp-chat-form-group input,
.wp-chat-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.94em;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.25s, box-shadow 0.25s;
    color: #0f172a;
}

.wp-chat-theme-glass-dark .wp-chat-form-group input,
.wp-chat-theme-glass-dark .wp-chat-form-group textarea,
.wp-chat-theme-cyberpunk .wp-chat-form-group input,
.wp-chat-theme-cyberpunk .wp-chat-form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.wp-chat-form-group input:focus,
.wp-chat-form-group textarea:focus {
    outline: none;
    border-color: var(--wp-chat-accent-color);
    box-shadow: 0 0 0 3px rgba(var(--wp-chat-accent-rgb), 0.15);
}

.wp-chat-start-btn {
    width: 100%;
    padding: 14px;
    background: var(--wp-chat-primary-color);
    color: var(--wp-chat-text-color);
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.02em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.wp-chat-start-btn:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: var(--wp-chat-glow), 0 6px 18px rgba(0, 0, 0, 0.15);
}


/* ===== 6. MENSAJES Y BURBUJAS ===== */
.wp-chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8fafc;
}

.wp-chat-theme-glass-dark .wp-chat-messages,
.wp-chat-theme-cyberpunk .wp-chat-messages {
    background: rgba(15, 23, 42, 0.4);
}

.wp-chat-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: wp-chat-message-in 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
    opacity: 0;
}

@keyframes wp-chat-message-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wp-chat-message-agent {
    align-self: flex-start;
}

.wp-chat-message-visitor {
    align-self: flex-end;
}

.wp-chat-message-system {
    align-self: center;
    max-width: 90%;
}

.wp-chat-message-bubble {
    padding: 13px 18px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.55;
    font-size: 0.94em;
    box-sizing: border-box;
}

/* Mensajes de Agente */
.wp-chat-message-agent .wp-chat-message-bubble {
    background: #ffffff;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.wp-chat-theme-glass-dark .wp-chat-message-agent .wp-chat-message-bubble,
.wp-chat-theme-cyberpunk .wp-chat-message-agent .wp-chat-message-bubble {
    background: rgba(255, 255, 255, 0.06);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mensajes de Visitante (Glow & Gradients) */
.wp-chat-message-visitor .wp-chat-message-bubble {
    background: var(--wp-chat-primary-color);
    color: var(--wp-chat-text-color);
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(var(--wp-chat-primary-rgb), 0.2);
}

.wp-chat-message-system .wp-chat-message-bubble {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.85em;
    padding: 8px 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.wp-chat-theme-glass-dark .wp-chat-message-system .wp-chat-message-bubble,
.wp-chat-theme-cyberpunk .wp-chat-message-system .wp-chat-message-bubble {
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    border-color: rgba(255, 255, 255, 0.06);
}

/* Typing Indicator */
.wp-chat-message-typing .wp-chat-message-bubble {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px 18px;
    min-width: 60px;
    height: 38px;
}

.wp-chat-typing-dot {
    width: 6px;
    height: 6px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: wp-chat-typing-bounce 1.4s infinite ease-in-out both;
}

.wp-chat-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.wp-chat-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes wp-chat-typing-bounce {
    0%, 80%, 100% { transform: scale(0.3); opacity: 0.5; }
    40% { transform: scale(1.1); opacity: 1; }
}

.wp-chat-message-time {
    font-size: 0.72em;
    color: #94a3b8;
    padding: 2px 5px 0;
}

.wp-chat-message-visitor .wp-chat-message-time {
    text-align: right;
}

/* ===== 7. RESPUESTAS RÁPIDAS ===== */
.wp-chat-quick-replies {
    padding: 12px 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.wp-chat-theme-glass-dark .wp-chat-quick-replies,
.wp-chat-theme-cyberpunk .wp-chat-quick-replies {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.06);
}

.wp-chat-qr-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: var(--wp-chat-accent-color);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.86em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
    white-space: nowrap;
}

.wp-chat-theme-glass-dark .wp-chat-qr-btn,
.wp-chat-theme-cyberpunk .wp-chat-qr-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--wp-chat-accent-color);
}

.wp-chat-qr-btn:hover {
    background: var(--wp-chat-primary-color);
    color: var(--wp-chat-text-color);
    border-color: var(--wp-chat-primary-color);
    transform: translateY(-2px);
    box-shadow: var(--wp-chat-glow);
}


/* ===== 8. INPUT AREA ===== */
.wp-chat-input-area {
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.wp-chat-theme-glass-dark .wp-chat-input-area,
.wp-chat-theme-cyberpunk .wp-chat-input-area {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(255, 255, 255, 0.08);
}

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

.wp-chat-attach-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
    border-radius: 50%;
}

.wp-chat-attach-btn:hover {
    color: var(--wp-chat-accent-color);
    background: #f1f5f9;
}

.wp-chat-theme-glass-dark .wp-chat-attach-btn:hover,
.wp-chat-theme-cyberpunk .wp-chat-attach-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

#wp-chat-message {
    flex: 1;
    padding: 11px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    font-family: inherit;
    font-size: 0.94em;
    resize: none;
    min-height: 20px;
    max-height: 100px;
    background: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.25s, box-shadow 0.25s;
    color: #0f172a;
}

.wp-chat-theme-glass-dark #wp-chat-message,
.wp-chat-theme-cyberpunk #wp-chat-message {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

#wp-chat-message:focus {
    outline: none;
    border-color: var(--wp-chat-accent-color);
}

.wp-chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wp-chat-primary-color);
    color: var(--wp-chat-text-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.wp-chat-send-btn:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--wp-chat-glow);
}

.wp-chat-send-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.wp-chat-typing {
    font-size: 0.8em;
    color: #94a3b8;
    margin-top: 8px;
    font-style: italic;
    text-align: left;
}


/* ===== 9. CYBER-SHIELD DLP ALERT ===== */
#wp-chat-dlp-alert {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border: 1px solid #ef4444 !important;
    border-radius: 10px !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.25) !important;
    padding: 10px 14px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 12px !important;
    animation: wp-chat-pulse-dlp 1.5s ease-in-out infinite !important;
}

@keyframes wp-chat-pulse-dlp {
    0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.2); }
    50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.45); }
}


/* ===== 10. GOLDEN GLOWING RATING STARS ===== */
.wp-chat-rating {
    padding: 26px 24px;
    text-align: center;
    background: transparent;
}

.wp-chat-rating p {
    margin: 0 0 18px;
    color: inherit;
    font-weight: 600;
}

.wp-chat-rating-stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}

.wp-chat-rating-stars button {
    background: none;
    border: none;
    font-size: 2.3em;
    color: rgba(148, 163, 184, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 0;
    line-height: 1;
}

.wp-chat-rating-stars button:hover,
.wp-chat-rating-stars button.active {
    color: #fbbf24 !important;
    text-shadow: 0 0 15px #f59e0b, 0 0 30px #f59e0b;
    transform: scale(1.3) rotate(8deg);
}


/* ===== 11. ADJUNTOS DE ARCHIVOS ===== */
.wp-chat-file-attachment {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.25s ease;
    font-size: 0.9em;
    font-weight: 600;
}

.wp-chat-theme-glass-dark .wp-chat-file-attachment,
.wp-chat-theme-cyberpunk .wp-chat-file-attachment {
    background: rgba(255, 255, 255, 0.06);
}

.wp-chat-file-attachment:hover {
    background: rgba(0, 0, 0, 0.1);
}

.wp-chat-theme-glass-dark .wp-chat-file-attachment:hover,
.wp-chat-theme-cyberpunk .wp-chat-file-attachment:hover {
    background: rgba(255, 255, 255, 0.12);
}


/* ===== 12. SCROLLBARS ===== */
.wp-chat-messages::-webkit-scrollbar,
.wp-chat-start-form::-webkit-scrollbar {
    width: 6px;
}

.wp-chat-messages::-webkit-scrollbar-track,
.wp-chat-start-form::-webkit-scrollbar-track {
    background: transparent;
}

.wp-chat-messages::-webkit-scrollbar-thumb,
.wp-chat-start-form::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 3px;
}

.wp-chat-messages::-webkit-scrollbar-thumb:hover,
.wp-chat-start-form::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}


/* ===== 13. RESPONSIVE ===== */
@media screen and (max-width: 480px) {
    .wp-chat-widget-v2 {
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
    }

    .wp-chat-float-btn {
        position: fixed;
        bottom: 20px;
        right: 20px;
    }

    .wp-chat-window {
        position: fixed;
        bottom: 0px;
        right: 0px;
        left: 0px;
        width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0 !important;
        z-index: 9999999;
    }

    .wp-chat-btn-texts {
        display: none;
    }

    .wp-chat-btn-inner {
        padding: 12px;
    }
}

/* Animación de entrada del botón */
.wp-chat-widget-v2 {
    animation: wp-chat-widget-fade-in 0.5s ease;
}

@keyframes wp-chat-widget-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* ===== 14. ANIMACIONES DEL ICONO (REBOTES / GIROS / PULSOS) ===== */

/* Bounce - Rebote */
.wp-chat-btn-icon.animation-bounce {
    animation: anim-bounce 2s ease-in-out infinite;
}

@keyframes anim-bounce {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-6px) rotate(3deg); }
}

/* Pulse - Pulso */
.wp-chat-btn-icon.animation-pulse {
    animation: anim-pulse 2s ease-in-out infinite;
}

@keyframes anim-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Spin - Giro */
.wp-chat-btn-icon.animation-spin {
    animation: anim-spin 4s linear infinite;
}

@keyframes anim-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Wiggle - Saludo/Balanceo */
.wp-chat-btn-icon.animation-wiggle {
    animation: anim-wiggle 2s ease-in-out infinite;
}

@keyframes anim-wiggle {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

/* Glow - Brillo */
.wp-chat-btn-icon.animation-glow {
    animation: anim-glow 2s ease-in-out infinite;
}

@keyframes anim-glow {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
        text-shadow: 0 0 5px currentColor;
    }
    50% {
        opacity: 0.85;
        filter: brightness(1.4);
        text-shadow: 0 0 15px currentColor, 0 0 25px currentColor;
    }
}

/* Shake - Vibrar */
.wp-chat-btn-icon.animation-shake {
    animation: anim-shake 0.5s ease-in-out infinite;
}

@keyframes anim-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px) rotate(-2deg); }
    75% { transform: translateX(3px) rotate(2deg); }
}

/* Float - Flotar */
.wp-chat-btn-icon.animation-float {
    animation: anim-float 3s ease-in-out infinite;
}

@keyframes anim-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== VELOCIDADES DE ANIMACIÓN ===== */
.animation-speed-slow { animation-duration: 3s !important; }
.animation-speed-normal { animation-duration: 2s !important; }
.animation-speed-fast { animation-duration: 1s !important; }

/* ===== 15. GLOBOS DE CAMPAÑA FESTIVAS (SPEECH BALLOONS) ===== */
.wp-chat-campaign-balloon {
    position: absolute;
    bottom: 100%;
    right: 0;
    margin-bottom: 15px;
    width: 260px;
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
    font-family: var(--wp-chat-font-family);
    font-size: 13px;
    line-height: 1.45;
    z-index: 100000;
    animation: wp-campaign-balloon-bounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Animación de entrada con bote de goma */
@keyframes wp-campaign-balloon-bounce {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.85);
    }
    70% {
        transform: translateY(-4px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.wp-chat-campaign-close {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    line-height: 1;
}

.wp-chat-campaign-close:hover {
    opacity: 1;
}

.wp-chat-campaign-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.wp-chat-campaign-emoji {
    font-size: 20px;
    line-height: 1;
}

.wp-chat-campaign-text {
    flex: 1;
    font-weight: 500;
    white-space: normal;
}

.wp-chat-campaign-arrow {
    position: absolute;
    bottom: -8px;
    right: 28px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid transparent;
}