/**
 * ESTILOS PLUGIN SITO - WHATSAPP
 */

/* Contenedor principal */
.sito-whatsapp-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Burbujas flotantes */
.sito-burbujas {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.burbuja {
    position: absolute;
    background: radial-gradient(circle at 30% 30%, rgba(37, 211, 102, 0.3), rgba(37, 211, 102, 0));
    border-radius: 50%;
    opacity: 0;
}

.burbuja-1 {
    width: 20px;
    height: 20px;
    bottom: -30px;
    left: 15px;
    animation: flotarBurbuja 3s ease-in-out infinite;
}

.burbuja-2 {
    width: 15px;
    height: 15px;
    bottom: -40px;
    left: 35px;
    animation: flotarBurbuja 4s ease-in-out infinite 0.5s;
}

.burbuja-3 {
    width: 12px;
    height: 12px;
    bottom: -50px;
    left: 25px;
    animation: flotarBurbuja 5s ease-in-out infinite 1s;
}

@keyframes flotarBurbuja {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-80px);
    }
}

/* Botón principal */
.sito-boton-principal {
    position: relative;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #25d366 0%, #1fb556 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 10;
    border: none;
}

.sito-boton-principal:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.6);
}

.sito-boton-principal:active {
    transform: scale(0.95);
}

/* Icono */
.sito-icono-whatsapp {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounceIcon 1s ease-in-out infinite;
}

.sito-icono-whatsapp svg {
    width: 100%;
    height: 100%;
    fill: white;
}

@keyframes bounceIcon {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Badge */
.sito-badge {
    position: absolute;
    bottom: -8px;
    right: -5px;
    background: white;
    padding: 4px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: entradaBadge 0.5s ease-out;
}

.sito-nombre {
    font-size: 11px;
    font-weight: 700;
    color: #25d366;
    white-space: nowrap;
}

.sito-dot-verde {
    width: 6px;
    height: 6px;
    background: #25d366;
    border-radius: 50%;
    animation: pulsoVerde 1.5s ease-in-out infinite;
}

@keyframes entradaBadge {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulsoVerde {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Anillos de pulso */
.sito-pulso,
.sito-pulso-2 {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #25d366;
    border-radius: 50%;
    top: 0;
    left: 0;
    opacity: 0;
    animation: expandirPulso 2s ease-out infinite;
}

.sito-pulso-2 {
    animation: expandirPulso 2s ease-out infinite 0.7s;
}

@keyframes expandirPulso {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Panel de mensaje */
.sito-mensaje-panel {
    position: absolute;
    bottom: 90px;
    left: 0;
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: aparecePanel 0.3s ease-out;
}

.sito-mensaje-panel.activo {
    display: flex;
}

@keyframes aparecePanel {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Header */
.sito-header-panel {
    background: linear-gradient(135deg, #25d366 0%, #1fb556 100%);
    color: white;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: space-between;
}

.sito-avatar-panel {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.sito-info-panel {
    flex: 1;
}

.sito-info-panel h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sito-online {
    font-size: 11px;
    font-weight: 400;
}

.sito-info-panel p {
    margin: 2px 0 0 0;
    font-size: 11px;
    opacity: 0.9;
}

.sito-cerrar-panel {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sito-cerrar-panel:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Cuerpo */
.sito-cuerpo-panel {
    padding: 12px;
    max-height: 120px;
    overflow-y: auto;
}

.sito-mensaje-bot {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 8px;
    animation: entradaMensaje 0.4s ease-out;
}

.sito-mensaje-bot p {
    margin: 0;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

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

/* Footer */
.sito-footer-panel {
    padding: 10px;
    border-top: 1px solid #f0f0f0;
}

.sito-btn-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #25d366 0%, #1fb556 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.sito-btn-chat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

.sito-btn-chat:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
    .sito-whatsapp-container {
        bottom: 20px;
        left: 20px;
    }
    
    .sito-boton-principal {
        width: 60px;
        height: 60px;
    }
    
    .sito-icono-whatsapp {
        width: 32px;
        height: 32px;
    }
    
    .sito-mensaje-panel {
        width: 280px;
        bottom: 80px;
    }
}
