/**
 * CSS para ícone flutuante no frontend
 */

.slm-floating-icon {
    position: fixed;
    z-index: 9999;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.slm-floating-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    text-decoration: none;
    color: white;
}

.slm-floating-icon:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.5);
}

/* Tamanhos */
.slm-floating-icon.small {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.slm-floating-icon.medium {
    width: 60px;
    height: 60px;
    font-size: 24px;
}

.slm-floating-icon.large {
    width: 80px;
    height: 80px;
    font-size: 32px;
}

/* Posições */
.slm-floating-icon.bottom-right {
    bottom: 20px;
    right: 20px;
}

.slm-floating-icon.bottom-left {
    bottom: 20px;
    left: 20px;
}

.slm-floating-icon.top-right {
    top: 20px;
    right: 20px;
}

.slm-floating-icon.top-left {
    top: 20px;
    left: 20px;
}

.slm-floating-icon.center-right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.slm-floating-icon.center-left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

/* Animações */
.slm-floating-icon.pulse {
    animation: slm-pulse 2s infinite;
}

.slm-floating-icon.bounce {
    animation: slm-bounce 2s infinite;
}

.slm-floating-icon.shake {
    animation: slm-shake 2s infinite;
}

.slm-floating-icon.glow {
    animation: slm-glow 2s infinite;
}

@keyframes slm-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slm-bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes slm-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

@keyframes slm-glow {
    0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 4px 20px rgba(255,255,255,0.5), 0 4px 12px rgba(0,0,0,0.3); }
}

/* Tooltip */
.slm-floating-icon[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10000;
    margin-bottom: 8px;
    pointer-events: none;
}

.slm-floating-icon[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0,0,0,0.8);
    z-index: 10000;
    margin-bottom: 4px;
    pointer-events: none;
}

/* Responsividade */
@media (max-width: 768px) {
    .slm-floating-icon {
        bottom: 15px;
        right: 15px;
    }
    
    .slm-floating-icon.bottom-left {
        left: 15px;
    }
    
    .slm-floating-icon.top-right {
        top: 15px;
        right: 15px;
    }
    
    .slm-floating-icon.top-left {
        top: 15px;
        left: 15px;
    }
    
    .slm-floating-icon.center-right {
        right: 15px;
    }
    
    .slm-floating-icon.center-left {
        left: 15px;
    }
    
    /* Ajustar tamanhos em mobile */
    .slm-floating-icon.large {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .slm-floating-icon.medium {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .slm-floating-icon {
        bottom: 10px;
        right: 10px;
    }
    
    .slm-floating-icon.bottom-left {
        left: 10px;
    }
    
    .slm-floating-icon.top-right {
        top: 10px;
        right: 10px;
    }
    
    .slm-floating-icon.top-left {
        top: 10px;
        left: 10px;
    }
    
    .slm-floating-icon.center-right {
        right: 10px;
    }
    
    .slm-floating-icon.center-left {
        left: 10px;
    }
}

/* Ocultar em desktop se for mobile-only */
@media (min-width: 769px) {
    .slm-floating-icon.mobile-only {
        display: none !important;
    }
}

/* Cores padrão para diferentes tipos */
.slm-floating-icon.whatsapp {
    background-color: #25D366;
}

.slm-floating-icon.phone {
    background-color: #007cba;
}

.slm-floating-icon.email {
    background-color: #ea4335;
}

.slm-floating-icon.chat {
    background-color: #0084ff;
}

.slm-floating-icon.support {
    background-color: #6c5ce7;
}

.slm-floating-icon.info {
    background-color: #00b894;
}

.slm-floating-icon.cart {
    background-color: #fd79a8;
}

.slm-floating-icon.heart {
    background-color: #e84393;
}

.slm-floating-icon.star {
    background-color: #fdcb6e;
}

.slm-floating-icon.download {
    background-color: #00cec9;
}

.slm-floating-icon.play {
    background-color: #ff7675;
}

.slm-floating-icon.custom {
    background-color: #74b9ff;
}

/* Efeitos de entrada */
.slm-floating-icon {
    animation: slm-fadeInUp 0.5s ease-out;
}

@keyframes slm-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Acessibilidade */
.slm-floating-icon:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Prevenção de conflitos com outros plugins */
.slm-floating-icon * {
    box-sizing: border-box;
}

/* Suporte para temas escuros */
@media (prefers-color-scheme: dark) {
    .slm-floating-icon[data-tooltip]:hover::after {
        background: rgba(255,255,255,0.9);
        color: #000;
    }
    
    .slm-floating-icon[data-tooltip]:hover::before {
        border-top-color: rgba(255,255,255,0.9);
    }
}

