/**
 * WhatsFloat Frontend Styles
 * Handle: whatsfloat-frontend-css
 * @package WhatsFloat
 */

/* Container */
.whatsfloat-container {
    position: fixed;
    z-index: 999999;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.whatsfloat-container.whatsfloat-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.8);
}

.whatsfloat-container.whatsfloat-visible {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

/* Button */
.whatsfloat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.whatsfloat-btn:hover {
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    transform: scale(1.1);
}

.whatsfloat-btn:focus {
    outline: 3px solid #25D366;
    outline-offset: 4px;
}

.whatsfloat-btn svg {
    width: 32px;
    height: 32px;
    fill: #fff; /* Explicitly white */
}

/* Ensure SVG stays white on hover - DO NOT CHANGE COLOR */
.whatsfloat-btn:hover svg {
    fill: #fff !important;
}

/* Lottie/Lordicon containers */
.whatsfloat-lottie-container,
.whatsfloat-lordicon-container {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Button (SVG/Lottie) - replaces default green button entirely */
.whatsfloat-btn.whatsfloat-btn-custom {
    background: transparent;
    box-shadow: none;
    width: auto;
    height: auto;
    border-radius: 0;
}

.whatsfloat-btn.whatsfloat-btn-custom:hover {
    box-shadow: none;
    transform: scale(1.1);
}

/* Custom icons should maintain their dimensions */
.whatsfloat-btn-custom svg,
.whatsfloat-btn-custom img {
    width: 60px;
    height: 60px;
    max-width: 100%;
    max-height: 100%;
}

.whatsfloat-btn-custom .whatsfloat-lottie-container,
.whatsfloat-btn-custom .whatsfloat-lordicon-container {
    width: 100%;
    height: 100%;
}

/* Ensure SVGs inside containers respect the container size */
.whatsfloat-btn-custom .whatsfloat-lordicon-container svg,
.whatsfloat-btn-custom svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/* Notification Badge */
.whatsfloat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4444;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    animation: whatsfloat-pulse 2s ease-in-out infinite;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.whatsfloat-badge.whatsfloat-badge-visible {
    opacity: 1;
    transform: scale(1);
}

/* Animations */
@keyframes whatsfloat-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 16px rgba(255, 68, 68, 0.6);
    }
}

@keyframes whatsfloat-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Accessibility: Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .whatsfloat-container,
    .whatsfloat-btn,
    .whatsfloat-badge {
        animation: none !important;
        transition: none !important;
    }
}

/* Responsive Visibility */
@media screen and (max-width: 767px) {
    .whatsfloat-container.hide-mobile {
        display: none !important;
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) {
    .whatsfloat-container.hide-tablet {
        display: none !important;
    }
}

@media screen and (min-width: 1025px) {
    .whatsfloat-container.hide-desktop {
        display: none !important;
    }
}

/* Print: Hide button */
@media print {
    .whatsfloat-container {
        display: none !important;
    }
}