/* ===================================
   BOTÃO FLUTUANTE WHATSAPP
   Cursos Especializados para Motoristas
   =================================== */

/* Botão Principal */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    overflow: hidden;
}

/* Hover do botão */
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(37, 211, 102, 0.4);
}

/* Ícone do WhatsApp */
.whatsapp-float img {
    width: 35px;
    height: 35px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

/* Hover do ícone */
.whatsapp-float:hover img {
    transform: scale(1.1);
}

/* Tooltip com texto */
.whatsapp-tooltip {
    position: fixed;
    bottom: 95px;
    right: 30px;
    background-color: #000;
    color: #ffc107;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 2px solid #ffc107;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 999;
}

/* Estado ativo do tooltip */
.whatsapp-tooltip.show {
    opacity: 1;
    transform: translateY(-10px);
}

/* Efeito de pulso animado */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #25d366;
    border-radius: 50%;
    animation: pulse 2s infinite;
    z-index: -1;
}

/* Animação do pulso */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Badge de notificação */
.whatsapp-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff0000;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    animation: badgePulse 1s infinite;
    /* Badge visível por padrão */
    display: flex;
}

/* Animação do badge */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ===================================
   RESPONSIVIDADE
   =================================== */

/* Tablets e dispositivos móveis */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float img {
        width: 30px;
        height: 30px;
    }

    .whatsapp-tooltip {
        bottom: 80px;
        right: 20px;
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* Dispositivos muito pequenos */
@media (max-width: 320px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-float img {
        width: 28px;
        height: 28px;
    }

    .whatsapp-badge {
        width: 18px;
        height: 18px;
        font-size: 11px;
    }
}

/* ===================================
   ANIMAÇÕES DE ENTRADA
   =================================== */

/* Animação de entrada do botão */
.whatsapp-float {
    animation: slideInUp 0.5s ease-out;
}

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

/* ===================================
   ESTADOS ESPECIAIS
   =================================== */

/* Esconder badge após clique */
.whatsapp-badge.hidden {
    display: none !important;
}

/* Botão com estado de loading (opcional) */
.whatsapp-float.loading {
    pointer-events: none;
    opacity: 0.7;
}

.whatsapp-float.loading::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border: 3px solid transparent;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================================
   MODO ESCURO/CLARO (Opcional)
   =================================== */

/* Se o site tiver modo claro */
body.light-mode .whatsapp-tooltip {
    background-color: #fff;
    color: #000;
    border-color: #25d366;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ===================================
   PRINT - Esconder botão na impressão
   =================================== */

@media print {
    .whatsapp-float,
    .whatsapp-tooltip {
        display: none !important;
    }
}