/**
 * @fileoverview WhatsApp Floating Action Button styles
 * 
 * This file contains all the CSS styles for the WhatsApp FAB component.
 * Converted from React Tailwind CSS to vanilla CSS for compatibility.
 */

/* WhatsApp FAB Container */
.whatsapp-fab {
    position: fixed;
    z-index: 9999;
    transition: all 0.3s ease-in-out;
    display: block;
    /* Default display */
    /* Allow JavaScript to control display */
}

/* Visibility control classes for JavaScript */
.whatsapp-fab.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.whatsapp-fab.visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Position classes */
.whatsapp-fab--bottom-right {
    bottom: 24px;
    right: 24px;
}

.whatsapp-fab--bottom-left {
    bottom: 24px;
    left: 24px;
}

.whatsapp-fab--top-right {
    top: 24px;
    right: 24px;
}

.whatsapp-fab--top-left {
    top: 24px;
    left: 24px;
}

/* Size classes */
.whatsapp-fab--sm {
    width: 67.2px;
    height: 67.2px;
}

.whatsapp-fab--md {
    width: 78.4px;
    height: 78.4px;
}

.whatsapp-fab--lg {
    width: 89.6px;
    height: 89.6px;
}

/* Label styles */
.whatsapp-fab__label {
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background-color: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
}

.whatsapp-fab__label span {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Show label on hover */
.whatsapp-fab:hover .whatsapp-fab__label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Mobile optimization - hide label on mobile devices */
@media (max-width: 768px) {
    .whatsapp-fab__label {
        display: none;
    }

    /* Make button slightly larger on mobile for better touch target */
    .whatsapp-fab__button {
        width: 65px;
        height: 65px;
    }

    .whatsapp-fab__icon--md {
        width: 55px;
        height: 55px;
        font-size: 55px;
    }
}

/* WhatsApp Button */
.whatsapp-fab__button {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #25d366;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    text-decoration: none;
}

.whatsapp-fab__button:hover {
    background-color: #128c7e;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.whatsapp-fab__button:active {
    transform: scale(0.95);
}

.whatsapp-fab__button:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Disabled state */
.whatsapp-fab__button--disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.whatsapp-fab__button--disabled:hover {
    background-color: #9ca3af;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: none;
}

/* Icon sizes */
.whatsapp-fab__icon--sm {
    width: 42px;
    height: 42px;
    display: block;
    font-size: 42px;
}

.whatsapp-fab__icon--md {
    width: 50.4px;
    height: 50.4px;
    display: block;
    font-size: 50.4px;
}

.whatsapp-fab__icon--lg {
    width: 58.8px;
    height: 58.8px;
    display: block;
    font-size: 58.8px;
}

/* Pulse animation */
.whatsapp-fab__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: #4ade80;
    opacity: 0.21;
    animation: whatsapp-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes whatsapp-pulse {

    0%,
    100% {
        opacity: 0.21;
        transform: scale(1);
    }

    50% {
        opacity: 0.42;
        transform: scale(1.21);
    }
}

/* Custom color support */
.whatsapp-fab__button--custom {
    background-color: var(--whatsapp-fab-custom-color, #25d366);
}

.whatsapp-fab__button--custom:hover {
    background-color: var(--whatsapp-fab-custom-hover-color, #128c7e);
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .whatsapp-fab--bottom-right,
    .whatsapp-fab--bottom-left {
        bottom: 16px;
    }

    .whatsapp-fab--bottom-right {
        right: 16px;
    }

    .whatsapp-fab--bottom-left {
        left: 16px;
    }

    .whatsapp-fab--top-right,
    .whatsapp-fab--top-left {
        top: 16px;
    }

    .whatsapp-fab--top-right {
        right: 16px;
    }

    .whatsapp-fab--top-left {
        left: 16px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {

    .whatsapp-fab__button,
    .whatsapp-fab__pulse {
        animation: none;
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .whatsapp-fab__button {
        border: 2px solid #000;
    }
}