/**
 * WhatsApp Business Integration Styles
 * Styles for floating action button, CTA buttons, and calculator sections
 */

/* ===========================
   Floating Action Button (FAB)
   =========================== */

.whatsapp-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

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

/* Pulse animation for FAB */
@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 8px rgba(37, 211, 102, 0.2);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

/* ===========================
   WhatsApp CTA Buttons
   =========================== */

.whatsapp-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    border: none;
    cursor: pointer;
}

.whatsapp-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    background: linear-gradient(135deg, #20BD5F 0%, #0F7A6F 100%);
}

.whatsapp-cta-button:active {
    transform: translateY(0);
}

.whatsapp-cta-button svg {
    flex-shrink: 0;
}

/* ===========================
   Calculator WhatsApp Sections
   =========================== */

.whatsapp-cta-section {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid #25D366;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
}

.whatsapp-cta-section h3 {
    color: #1b5e20;
    margin: 0 0 12px 0;
    font-size: 22px;
}

.whatsapp-cta-section p {
    color: #2e7d32;
    margin: 0 0 20px 0;
    font-size: 16px;
    line-height: 1.6;
}

.whatsapp-cta-section .whatsapp-cta-button {
    font-size: 18px;
    padding: 16px 32px;
}

/* Eligible result styling */
.result-positive .whatsapp-cta-section {
    background: linear-gradient(135deg, #e8f5e9 0%, #a5d6a7 100%);
    border-color: #4caf50;
}

/* Not eligible result styling */
.result-negative .whatsapp-cta-section {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%);
    border-color: #fbc02d;
}

.result-negative .whatsapp-cta-section h3 {
    color: #f57f17;
}

.result-negative .whatsapp-cta-section p {
    color: #f9a825;
}

/* ===========================
   Responsive Design
   =========================== */

@media (max-width: 768px) {
    .whatsapp-fab {
        width: 56px;
        height: 56px;
        bottom: 16px;
        left: 16px;
    }

    .whatsapp-fab svg {
        width: 24px;
        height: 24px;
    }

    .whatsapp-cta-button {
        padding: 12px 24px;
        font-size: 15px;
    }

    .whatsapp-cta-section {
        padding: 20px 16px;
    }

    .whatsapp-cta-section h3 {
        font-size: 19px;
    }

    .whatsapp-cta-section p {
        font-size: 15px;
    }

    .whatsapp-cta-section .whatsapp-cta-button {
        font-size: 16px;
        padding: 14px 28px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .whatsapp-fab {
        width: 52px;
        height: 52px;
        bottom: 12px;
        left: 12px;
    }

    .whatsapp-cta-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ===========================
   RTL Support
   =========================== */

[dir="rtl"] .whatsapp-fab {
    left: auto;
    right: 20px;
}

[dir="rtl"] .whatsapp-cta-button {
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    [dir="rtl"] .whatsapp-fab {
        left: auto;
        right: 16px;
    }
}

@media (max-width: 480px) {
    [dir="rtl"] .whatsapp-fab {
        left: auto;
        right: 12px;
    }
}

/* ===========================
   Accessibility
   =========================== */

.whatsapp-fab:focus,
.whatsapp-cta-button:focus {
    outline: 3px solid #25D366;
    outline-offset: 2px;
}

.whatsapp-fab:focus-visible,
.whatsapp-cta-button:focus-visible {
    outline: 3px solid #25D366;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-fab {
        animation: none;
    }

    .whatsapp-fab:hover,
    .whatsapp-cta-button:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .whatsapp-fab,
    .whatsapp-cta-button {
        border: 2px solid currentColor;
    }
}

/* ===========================
   Print Styles
   =========================== */

@media print {
    .whatsapp-fab,
    .whatsapp-cta-button,
    .whatsapp-cta-section {
        display: none;
    }
}
