/* ==========================================
   ESTILOS PREMIUM - CHATBOT WHYAWEB
   ========================================== */

#whyaweb-bot-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Burbuja flotante con degradado y pulso animado */
#whyaweb-bot-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0073aa, #005177); /* Ajustable a los colores de la academia */
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease;
}

#whyaweb-bot-bubble:hover {
    transform: scale(1.08);
}

/* Animación de pulso legal/atractivo */
.whyaweb-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    opacity: 0.6;
    animation: whyawebPulseAnim 2s infinite;
    z-index: -1;
}

@keyframes whyawebPulseAnim {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* Ventana de Chat "Pixel Perfect" */
#whyaweb-bot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 360px;
    height: 500px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.whyaweb-hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

/* Cabecera del chat */
#whyaweb-bot-header {
    background: #0073aa;
    color: #ffffff;
    padding: 15px;
    display: flex;
    align-items: center;
    position: relative;
}

.whyaweb-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
}

#whyaweb-bot-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.whyaweb-status {
    font-size: 11px;
    opacity: 0.8;
}

#whyaweb-bot-close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

/* Zona de Mensajes y Disclaimer DSGVO */
#whyaweb-bot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f7f9fb;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.whyaweb-legal-disclaimer {
    background: #ffffff;
    border-left: 4px solid #ffb900;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-size: 13px;
    line-height: 1.5;
    color: #333333;
}

.whyaweb-legal-disclaimer a {
    color: #0073aa;
    text-decoration: underline;
}

#whyaweb-accept-legal {
    background: #0073aa;
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    width: 100%;
    margin-top: 10px;
    cursor: pointer;
    font-weight: 600;
}

/* Burbujas de Mensaje */
.whyaweb-msg {
    display: flex;
}
.whyaweb-msg-user { justify-content: flex-end; }
.whyaweb-msg-bot { justify-content: flex-start; }

.whyaweb-msg-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
}

.whyaweb-msg-user .whyaweb-msg-bubble {
    background: #0073aa;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

.whyaweb-msg-bot .whyaweb-msg-bubble {
    background: #ffffff;
    color: #333333;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Área de Input inferior */
#whyaweb-bot-input-area {
    display: flex;
    padding: 12px;
    background: #ffffff;
    border-top: 1px solid #eaeaea;
}

.whyaweb-disabled {
    opacity: 0.5;
    background: #fafafa !important;
}

#whyaweb-user-input {
    flex: 1;
    border: 1px solid #cccccc;
    border-radius: 20px;
    padding: 8px 16px;
    outline: none;
    font-size: 14px;
}

#whyaweb-send-btn {
    background: none;
    border: none;
    color: #0073aa;
    margin-left: 8px;
    cursor: pointer;
}

/* Animación de los tres puntitos saltando (...) */
.whyaweb-typing span {
    content: '';
    animation: whyawebBlink 1.4s infinite both;
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #888888;
    border-radius: 50%;
    margin: 0 2px;
}
.whyaweb-typing span:nth-child(2) { animation-delay: .2s; }
.whyaweb-typing span:nth-child(3) { animation-delay: .4s; }

@keyframes whyawebBlink {
    0% { opacity: .2; }
    20% { opacity: 1; }
    100% { opacity: .2; }
}