/**
 * WhatsApp Inquiry Plugin - Floating Widget Styles
 * Version: 1.0.1
 * Description: Floating WhatsApp widget and inquiry cart button styles
 */

/* ============================================
   FLOATING INQUIRY CART BUTTON
   ============================================ */

.wainq-inquiry-cart-float {
    position: fixed;
    bottom: 170px;
    right: 20px;
    z-index: 999997;
    transition: all 0.3s ease;
}

.wainq-open-inquiry-cart {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.wainq-open-inquiry-cart:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.wainq-open-inquiry-cart svg {
    width: 30px;
    height: 30px;
    color: white;
}

.wainq-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

.wainq-cart-count:empty,
.wainq-cart-count[data-count="0"] {
    display: none;
}

/* ============================================
   FLOATING WHATSAPP WIDGET STYLES
   ============================================ */

.wainq-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.wainq-button {
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.wainq-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.wainq-chat {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.wainq-widget:hover .wainq-chat {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wainq-chat-header {
    background-color: #25D366;
    color: white;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
}

.wainq-chat-body {
    padding: 15px;
}

.wainq-chat-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    resize: none;
    font-size: 14px;
    min-height: 80px;
}

.wainq-send-button {
    width: 100%;
    padding: 12px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.wainq-send-button:hover {
    background-color: #128C7E;
}

/* Floating Widget Container */
.wainq-floating-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999996;
}

.wainq-floating-button {
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    border: none;
}

.wainq-floating-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.wainq-floating-button svg {
    width: 32px;
    height: 32px;
}

.wainq-floating-chat {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* Add padding area to bridge the gap */
.wainq-floating-chat::before {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

/* Desktop: Show chat on hover */
@media (min-width: 769px) {
    .wainq-floating-widget:hover .wainq-floating-chat {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    
    /* Keep chat open when hovering over it */
    .wainq-floating-chat:hover {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* Mobile: Show chat on click (active class) */
@media (max-width: 768px) {
    .wainq-floating-widget.active .wainq-floating-chat {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
}

.wainq-floating-chat-header {
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
}

.wainq-floating-chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    color: white;
}

.wainq-floating-chat-body {
    padding: 15px;
}

.wainq-floating-chat-message {
    background-color: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.wainq-floating-chat-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
    resize: none;
    font-size: 14px;
    min-height: 80px;
    box-sizing: border-box;
}

.wainq-floating-chat-input:focus {
    outline: none;
    border-color: #25D366;
}

.wainq-floating-send-button {
    width: 100%;
    padding: 12px;
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.wainq-floating-send-button:hover {
    background-color: #128C7E;
}

/* Floating Cart Icon */
.wainq-floating-cart-icon {
    position: fixed;
    bottom: 95px;
    right: 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);
    transition: all 0.3s ease;
    z-index: 999997;
}

.wainq-floating-cart-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
}

.wainq-floating-cart-icon:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

/* Hide cart icon pointer events when WhatsApp widget is hovered */
.wainq-floating-widget:hover ~ .wainq-floating-cart-icon {
    pointer-events: none;
    opacity: 0.5;
    z-index: 999995;
}

.wainq-floating-chat:not([style*="visibility: hidden"]) ~ .wainq-floating-cart-icon {
    pointer-events: none;
    opacity: 0.5;
}

.wainq-floating-cart-icon svg {
    color: white;
}

.wainq-cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

/* ============================================
   RESPONSIVE DESIGN - WIDGET
   ============================================ */

/* Tablet View */
@media (max-width: 1024px) {
    .wainq-floating-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .wainq-floating-button {
        width: 56px;
        height: 56px;
    }
    
    .wainq-floating-button svg {
        width: 30px;
        height: 30px;
    }
    
    .wainq-floating-chat {
        width: 300px;
        bottom: 70px;
    }
    
    .wainq-floating-cart-icon {
        bottom: 90px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .wainq-inquiry-cart-float {
        bottom: 160px;
        right: 20px;
    }

    .wainq-open-inquiry-cart {
        width: 56px;
        height: 56px;
    }

    .wainq-open-inquiry-cart svg {
        width: 28px;
        height: 28px;
    }

    .wainq-cart-count {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
}

/* Mobile View */
@media (max-width: 768px) {
    .wainq-floating-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .wainq-floating-button {
        width: 54px;
        height: 54px;
    }
    
    .wainq-floating-button svg {
        width: 28px;
        height: 28px;
    }
    
    .wainq-floating-chat {
        width: calc(100vw - 50px);
        max-width: 320px;
        right: 0;
        bottom: 68px;
    }
    
    .wainq-floating-cart-icon {
        bottom: 88px;
        right: 20px;
        width: 54px;
        height: 54px;
    }

    .wainq-inquiry-cart-float {
        bottom: 156px;
        right: 20px;
    }

    .wainq-open-inquiry-cart {
        width: 54px;
        height: 54px;
    }

    .wainq-open-inquiry-cart svg {
        width: 26px;
        height: 26px;
    }

    .wainq-cart-count {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .wainq-floating-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .wainq-floating-button {
        width: 52px;
        height: 52px;
    }
    
    .wainq-floating-button svg {
        width: 26px;
        height: 26px;
    }
    
    .wainq-floating-chat {
        width: calc(100vw - 45px);
        max-width: 300px;
        right: 0;
        bottom: 66px;
        font-size: 13px;
    }
    
    .wainq-floating-chat-header {
        padding: 12px;
    }
    
    .wainq-floating-chat-header h4 {
        font-size: 14px;
    }
    
    .wainq-floating-chat-body {
        padding: 12px;
    }
    
    .wainq-floating-chat-message {
        font-size: 13px;
        padding: 8px;
        margin-bottom: 12px;
    }
    
    .wainq-floating-chat-input {
        padding: 8px;
        font-size: 13px;
        min-height: 70px;
        margin-bottom: 8px;
    }
    
    .wainq-floating-send-button {
        padding: 10px;
        font-size: 13px;
    }
    
    .wainq-floating-cart-icon {
        bottom: 86px;
        right: 20px;
        width: 52px;
        height: 52px;
    }
    
    .wainq-inquiry-cart-float {
        bottom: 152px;
        right: 20px;
    }

    .wainq-open-inquiry-cart {
        width: 52px;
        height: 52px;
    }

    .wainq-open-inquiry-cart svg {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 360px) {
    .wainq-floating-widget {
        bottom: 16px;
        right: 16px;
    }
    
    .wainq-floating-button {
        width: 50px;
        height: 50px;
    }
    
    .wainq-floating-button svg {
        width: 24px;
        height: 24px;
    }
    
    .wainq-floating-chat {
        width: calc(100vw - 38px);
        max-width: 280px;
        bottom: 64px;
    }
    
    .wainq-floating-chat-header h4 {
        font-size: 13px;
    }
    
    .wainq-floating-chat-body {
        padding: 10px;
    }
    
    .wainq-floating-cart-icon {
        bottom: 80px;
        right: 16px;
        width: 50px;
        height: 50px;
    }
    
    .wainq-inquiry-cart-float {
        bottom: 144px;
        right: 16px;
    }

    .wainq-open-inquiry-cart {
        width: 50px;
        height: 50px;
    }

    .wainq-open-inquiry-cart svg {
        width: 24px;
        height: 24px;
    }

    .wainq-cart-count {
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
}
