/**
 * Floating WhatsApp Button Styles
 * This component creates a fixed WhatsApp button that appears on all pages
 * UPDATED: Enhanced specificity and consistency across all pages
 */

/* High specificity to ensure these styles are not overridden */
body .floating-whatsapp,
html .floating-whatsapp,
.floating-whatsapp {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 10002 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 65px !important;
    height: 65px !important;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    cursor: pointer !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease !important;
    text-decoration: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: 1 !important;
    overflow: visible !important;
    animation: waFadeIn 0.3s ease forwards !important;
}

@keyframes waFadeIn {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); }
}

body .floating-whatsapp:hover,
html .floating-whatsapp:hover,
.floating-whatsapp:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    color: white !important;
}

body .floating-whatsapp svg,
html .floating-whatsapp svg,
.floating-whatsapp svg {
    width: 30px !important;
    height: 30px !important;
    color: white !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .floating-whatsapp::after,
html .floating-whatsapp::after,
.floating-whatsapp::after {
    content: '' !important;
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    z-index: -1 !important;
    animation: pulse 2s infinite !important;
    top: 0 !important;
    left: 0 !important;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    70% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    body .floating-whatsapp,
    html .floating-whatsapp,
    .floating-whatsapp {
        bottom: 80px !important;
        right: 20px !important;
        left: auto !important;
        width: 60px !important;
        height: 60px !important;
        border-radius: 50% !important;
        border: none !important;
        z-index: 2147483647 !important;
        position: fixed !important;
    }

    body .floating-whatsapp svg,
    html .floating-whatsapp svg,
    .floating-whatsapp svg {
        width: 28px !important;
        height: 28px !important;
    }
}



.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    z-index: -1;
    animation: pulse 2s infinite;
}

/* Floating Call Button - same style as WhatsApp, positioned between ScrollToTop and WhatsApp */
body .floating-call-button,
html .floating-call-button,
.floating-call-button {
    position: fixed !important;
    bottom: 107px !important;
    right: 30px !important;
    z-index: 10003 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 65px !important;
    height: 65px !important;
    background: linear-gradient(135deg, #6D001A 0%, #4A0012 100%) !important;
    color: white !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(109, 0, 26, 0.4) !important;
    cursor: pointer !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease !important;
    text-decoration: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    animation: waFadeIn 0.3s ease forwards !important;
}

body .floating-call-button:hover,
html .floating-call-button:hover,
.floating-call-button:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(109, 0, 26, 0.5) !important;
}

body .floating-call-button svg,
html .floating-call-button svg,
.floating-call-button svg {
    width: 28px !important;
    height: 28px !important;
    color: white !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

body .floating-call-button::after,
html .floating-call-button::after,
.floating-call-button::after {
    content: '' !important;
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #6D001A 0%, #4A0012 100%) !important;
    z-index: -1 !important;
    animation: pulse 2s infinite !important;
    top: 0 !important;
    left: 0 !important;
}

.call-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #6D001A 0%, #4A0012 100%);
    z-index: -1;
    animation: pulse 2s infinite;
}

@media (max-width: 768px) {
    body .floating-call-button,
    html .floating-call-button,
    .floating-call-button {
        bottom: 152px !important;
        right: 20px !important;
        width: 60px !important;
        height: 60px !important;
        z-index: 2147483647 !important;
    }
}

/* Page-specific mobile offsets - 12px gaps between all buttons */
@media (max-width: 768px) {
  body:has(.productsMain) .floating-whatsapp,
  body.products-page .floating-whatsapp {
    bottom: calc(56px + 48px + env(safe-area-inset-bottom) + 16px) !important;
  }
  body:has(.productsMain) .floating-call-button,
  body.products-page .floating-call-button {
    bottom: calc(56px + 48px + 60px + 12px + env(safe-area-inset-bottom) + 16px) !important;
  }
  body:has(.productsMain) .chatTab,
  body.products-page .chatTab {
    bottom: calc(56px + 48px + 60px + 60px + 24px + env(safe-area-inset-bottom) + 16px) !important;
  }
  body:has(.productsMain) .scroll-to-top-btn,
  body.products-page .scroll-to-top-btn {
    bottom: calc(56px + 48px + 60px + 60px + 60px + 36px + env(safe-area-inset-bottom) + 16px) !important;
  }

  body:has(.productView) .floating-whatsapp,
  body.product-page .floating-whatsapp {
    bottom: calc(56px + env(safe-area-inset-bottom) + 16px) !important;
  }
  body:has(.productView) .floating-call-button,
  body.product-page .floating-call-button {
    bottom: calc(56px + 60px + 12px + env(safe-area-inset-bottom) + 16px) !important;
  }
  body:has(.productView) .chatTab,
  body.product-page .chatTab {
    bottom: calc(56px + 60px + 60px + 24px + env(safe-area-inset-bottom) + 16px) !important;
  }
  body:has(.productView) .scroll-to-top-btn,
  body.product-page .scroll-to-top-btn {
    bottom: calc(56px + 60px + 60px + 60px + 36px + env(safe-area-inset-bottom) + 16px) !important;
  }
}
