/* ============================================================
   AFRIYAH FOOTER & MODAL STYLES
   ============================================================ */

/* Hide plugin's Amara widget - use theme's button instead */
.amara-ai-widget,
#amara-ai-widget {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Footer Link Hover Effects */
.af-footer a {
    transition: color 0.3s, transform 0.3s;
}

.af-footer a:hover,
.af-footer-contact a:hover {
    color: var(--wf-main-color, #006400) !important;
    /* Fallback to green */
    transform: translateX(4px);
}

.af-footer-column a[href*="facebook"]:hover {
    background: #1877F2 !important;
    color: #fff !important;
    border-color: #1877F2 !important;
}

.af-footer-column a[href*="twitter"]:hover {
    background: #1DA1F2 !important;
    color: #fff !important;
    border-color: #1DA1F2 !important;
}

.af-footer-column a[href*="instagram"]:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.af-footer-column a[href*="linkedin"]:hover {
    background: #0077B5 !important;
    color: #fff !important;
    border-color: #0077B5 !important;
}

.af-footer-column a[href*="youtube"]:hover {
    background: #FF0000 !important;
    color: #fff !important;
    border-color: #FF0000 !important;
}

/* Newsletter Form */
.af-newsletter-form input:focus {
    border-color: var(--wf-main-color, #006400) !important;
    background: rgba(255, 255, 255, 0.15) !important;
}

.af-newsletter-form button:hover {
    background: var(--wf-main-color, #006400) !important;
    opacity: 0.9 !important;
    transform: translateY(-2px);
}

/* Floating Buttons */
.af-whatsapp-float,
.af-ai-chat-float {
    transition: transform 0.3s;
}

.af-whatsapp-float:hover,
.af-ai-chat-float:hover {
    transform: scale(1.1);
}

/* Desktop & Tablet Positioning */
@media (min-width: 769px) {
    .af-whatsapp-float {
        bottom: 30px !important;
        right: 20px !important;
    }

    .af-ai-chat-float {
        bottom: 100px !important;
        right: 20px !important;
    }
}

/* Mobile Footer Grid - 2 Columns for Links */
@media (max-width: 768px) {
    .af-footer-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
    }

    /* Company Info - Full Width */
    .af-footer-grid .af-footer-column:nth-child(1) {
        grid-column: 1 / -1 !important;
        text-align: center;
    }

    /* Quick Links & Customer Service - Side by Side */
    .af-footer-grid .af-footer-column:nth-child(2),
    .af-footer-grid .af-footer-column:nth-child(3) {
        grid-column: span 1 !important;
        margin: 0 !important;
        text-align: left;
    }

    /* Newsletter - Full Width */
    .af-footer-grid .af-footer-column:nth-child(4) {
        grid-column: 1 / -1 !important;
        text-align: center;
    }

    /* Mobile Floating Buttons */
    .af-whatsapp-float {
        bottom: 100px !important;
        right: 16px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 24px !important;
    }

    .af-ai-chat-float {
        bottom: 160px !important;
        right: 16px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }

    /* Product Page Adjustments */
    body.single-product .af-whatsapp-float,
    body.woocommerce.single-product .af-whatsapp-float {
        bottom: 160px !important;
    }

    body.single-product .af-ai-chat-float,
    body.woocommerce.single-product .af-ai-chat-float {
        bottom: 220px !important;
    }

    .af-sticky-atc {
        bottom: 70px !important;
    }
}

@media (max-width: 480px) {

    .af-whatsapp-float,
    .af-ai-chat-float {
        right: 12px !important;
    }
}

/* AI Chat Window Styles */
.afriyah-ai-chat-window {
    position: fixed;
    bottom: 160px;
    right: 20px;
    width: 380px;
    max-height: 500px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.afriyah-ai-chat-header {
    background: linear-gradient(135deg, #006400 0%, #008000 100%);
    color: #fff;
    padding: 20px 24px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.afriyah-ai-chat-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.afriyah-ai-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.afriyah-ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.afriyah-ai-chat-messages {
    flex: 1;
    max-height: 350px;
    overflow-y: auto;
    padding: 20px 24px;
    background: #fafafa;
}

.afriyah-ai-message {
    margin-bottom: 16px;
    display: flex;
}

.afriyah-ai-message.user {
    justify-content: flex-end;
}

.afriyah-ai-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.afriyah-ai-message.ai .afriyah-ai-message-content {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e8f5e9;
}

.afriyah-ai-message.user .afriyah-ai-message-content {
    background: linear-gradient(135deg, #006400 0%, #008000 100%);
    color: #ffffff;
}

.afriyah-ai-chat-input-area {
    padding: 20px 24px;
    background: #ffffff;
    border-top: 1px solid #e8f5e9;
    border-radius: 0 0 20px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

#afriyah-ai-input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid #e8f5e9;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
}

#afriyah-ai-input:focus {
    border-color: #006400;
}

#afriyah-ai-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #006400 0%, #008000 100%);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#afriyah-ai-send:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .afriyah-ai-chat-window {
        width: calc(100vw - 30px);
        max-width: 360px;
        right: 15px;
        bottom: 160px;
    }
}

@media (max-width: 480px) {
    .afriyah-ai-chat-window {
        right: 12px;
        bottom: 160px;
    }

    body.single-product .afriyah-ai-chat-window,
    body.woocommerce.single-product .afriyah-ai-chat-window {
        bottom: 220px;
    }
}

/* Cart Abandonment Animation */
@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    #af-cart-abandonment-notice {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Mobile Bottom Nav */
@media (max-width:768px) {
    .af-mobile-bottom-nav {
        display: block !important
    }

    body {
        padding-bottom: 70px
    }
}

.af-mobile-bottom-nav a:hover,
.af-mobile-bottom-nav button:hover {
    color: #006400
}

/* Search Modal Styles */
@keyframes spin {
    0% {
        transform: rotate(0deg)
    }

    100% {
        transform: rotate(360deg)
    }
}

#af-search-modal {
    backdrop-filter: blur(4px);
}

#af-search-input:focus {
    border-color: #009900 !important;
}

#af-suggestions-list a,
#af-products-list a {
    padding: 12px 16px;
    background: #f7faf7;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.3s
}

#af-suggestions-list a:hover,
#af-products-list a:hover {
    background: #e8f5e9
}

#af-products-list a img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0
}