/* WhatsApp Widget Styles */

.btn-whatsapp {
    background-color: #25D366;
    animation: breathe 2s ease-in-out infinite;
}

.btn-whatsapp i {
    color: #fff;
    font-size: 24px;
    animation: beat 2s ease-in-out infinite;
    text-decoration: none;
}

.btn-whatsapp:hover {
    background-color: #25D366;
}

.bg-whatsapp {
    background-color: #25D366;
}

.typing {
    position: relative;
}

.typing span {
    content: '';
    animation: blink 1.5s infinite;
    animation-fill-mode: both;
    height: 8px;
    width: 8px;
    background: #000;
    position: absolute;
    left: 20%;
    top: 40%;
    border-radius: 50%;
}

.typing span:nth-child(2) {
    animation-delay: .2s;
    margin-left: calc(8px * 1.5);
}

.typing span:nth-child(3) {
    animation-delay: .4s;
    margin-left: calc(8px * 3);
}

.whatsContainer {
    z-index: 99 !important;
}

.whatsChatContainer {
    bottom: 5rem;
    right: 2rem;
    width: 20rem;
    animation-name: fadeInUp;
    animation-duration: 0.5s;
    border-radius: .8rem;
    position: fixed;
    box-shadow: 0 .25rem 1.75rem rgba(30, 34, 40, .2);
}

@media (max-width: 450px) {
    .whatsChatContainer {
        right: 5vw;
        width: 92vw;
    }
}

.fade-in {
    opacity: 1;
    animation-name: fadeInOpacity;
    animation-iteration-count: 1;
    animation-timing-function: ease-in;
    animation-duration: 1s;
}

.fade-in-up {
    animation-name: fadeInUp;
    animation-duration: 0.5s;
}

/* Animations */

@keyframes fadeInUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0%);
        opacity: 1;
    }
}

@keyframes fadeInOpacity {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes blink {
    0% {
        opacity: .1;
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: .1;
    }
}

@keyframes breathe {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

@keyframes beat {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.progress-wrap {
    left: 1.5rem;
}

/* Mobile-specific styles */
.wa-mobile-btn {
    width: 50px;
    height: 50px;
}

.wa-mobile-btn i {
    font-size: 20px;
}

/* Mobile hint bubble */
.wa-mobile-hint {
    position: fixed;
    bottom: 80px;
    right: 16px;
    background: #25D366;
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 12px rgba(37, 211, 102, 0.4);
    animation: hintSlideIn 0.4s ease-out, hintPulse 2s ease-in-out infinite 0.4s;
    z-index: 98;
    cursor: pointer;
    white-space: nowrap;
}

.wa-mobile-hint::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #25D366;
}

@keyframes hintSlideIn {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hintPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}

/* Reduce animation intensity on mobile for battery/performance */
@media (max-width: 768px) {
    .btn-whatsapp {
        animation: none;
        box-shadow: 0 2px 10px rgba(37, 211, 102, 0.35);
    }
    
    .btn-whatsapp i {
        animation: none;
    }
    
    .btn-whatsapp:active {
        transform: scale(0.95);
    }
}

/* Reduced motion preference support */
@media (prefers-reduced-motion: reduce) {
    .btn-whatsapp,
    .btn-whatsapp i,
    .wa-mobile-hint,
    .whatsChatContainer {
        animation: none !important;
    }
}
