/* WhatsApp Floating Button Styles */
/* High specificity CSS to override theme styles */

/* ==============================================
   THEME OVERRIDE RESETS
   ============================================== */
.wfb-wrapper,
.wfb-wrapper *,
.wfb-wrapper *::before,
.wfb-wrapper *::after {
    box-sizing: border-box !important;
}

/* Reset any inherited theme styles */
.wfb-wrapper .wfb-button,
.wfb-wrapper .wfb-close-button,
.wfb-wrapper .wfb-send-button {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
}

/* ==============================================
   WRAPPER STYLES
   ============================================== */
.wfb-wrapper {
    position: fixed !important;
    bottom: 20px !important;
    z-index: 9999 !important;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.wfb-wrapper.wfb-show {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

.wfb-position-right {
    right: 20px !important;
}

.wfb-position-left {
    left: 20px !important;
}

/* ==============================================
   MAIN FLOATING WHATSAPP BUTTON - FORCE GREEN
   ============================================== */
.wfb-wrapper .wfb-button,
.wfb-wrapper button.wfb-button,
.wfb-wrapper a.wfb-button,
.wfb-wrapper div.wfb-button,
#wfb-floating-button.wfb-button,
.wfb-button.wfb-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 60px !important;
    height: 60px !important;
    background: #25D366 !important;
    background-color: #25D366 !important;
    background-image: none !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    position: relative !important;
    z-index: 10000 !important;
    border: none !important;
    border-color: transparent !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: unset !important;
    min-height: unset !important;
    max-width: unset !important;
    max-height: unset !important;
}

.wfb-wrapper .wfb-button:hover,
.wfb-wrapper button.wfb-button:hover,
.wfb-wrapper a.wfb-button:hover,
.wfb-wrapper div.wfb-button:hover,
#wfb-floating-button.wfb-button:hover,
.wfb-button.wfb-button:hover {
    background: #1FAF5A !important;
    background-color: #1FAF5A !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6) !important;
    border: none !important;
    border-color: transparent !important;
}

.wfb-wrapper .wfb-button:active,
.wfb-button.wfb-button:active {
    transform: scale(0.95) !important;
    background: #25D366 !important;
    background-color: #25D366 !important;
}

.wfb-wrapper .wfb-button:focus,
.wfb-button.wfb-button:focus {
    outline: 2px solid #25d366 !important;
    outline-offset: 2px !important;
    background: #25D366 !important;
    background-color: #25D366 !important;
}

/* WhatsApp Icon - Force White */
.wfb-wrapper .wfb-icon,
.wfb-button .wfb-icon,
.wfb-wrapper .wfb-button .wfb-icon,
.wfb-wrapper .wfb-button svg,
.wfb-button svg.wfb-icon {
    color: #ffffff !important;
    fill: #ffffff !important;
    width: 32px !important;
    height: 32px !important;
}

/* ==============================================
   X CLOSE BUTTON - FORCE RED WITH NO BACKGROUND
   ============================================== */
.wfb-wrapper .wfb-close-button,
.wfb-wrapper button.wfb-close-button,
.wfb-chat-header .wfb-close-button,
.wfb-close-button.wfb-close-button,
button.wfb-close-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-color: transparent !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    color: #ff0000 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
    box-shadow: none !important;
    outline: none !important;
    min-width: unset !important;
    min-height: unset !important;
}

.wfb-wrapper .wfb-close-button:hover,
.wfb-wrapper button.wfb-close-button:hover,
.wfb-chat-header .wfb-close-button:hover,
.wfb-close-button.wfb-close-button:hover,
button.wfb-close-button:hover {
    background: transparent !important;
    background-color: transparent !important;
    color: #cc0000 !important;
    transform: scale(1.1) !important;
    border: none !important;
    box-shadow: none !important;
}

.wfb-wrapper .wfb-close-button:active,
.wfb-close-button.wfb-close-button:active {
    background: transparent !important;
    background-color: transparent !important;
    color: #ff0000 !important;
}

.wfb-wrapper .wfb-close-button:focus,
.wfb-close-button.wfb-close-button:focus {
    outline: 2px solid #ff0000 !important;
    outline-offset: 2px !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* ==============================================
   CHAT PANEL STYLES
   ============================================== */
.wfb-wrapper .wfb-chat-panel,
.wfb-chat-panel.wfb-chat-panel {
    position: absolute !important;
    bottom: 120px !important;
    width: 320px !important;
    max-width: calc(100vw - 40px) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 9998 !important;
    background: #fff !important;
    background-color: #fff !important;
}

.wfb-position-right .wfb-chat-panel {
    right: 0 !important;
}

.wfb-position-left .wfb-chat-panel {
    left: 0 !important;
}

.wfb-wrapper .wfb-chat-panel.wfb-show,
.wfb-chat-panel.wfb-chat-panel.wfb-show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
}

/* ==============================================
   CHAT HEADER STYLES
   ============================================== */
.wfb-wrapper .wfb-chat-header,
.wfb-chat-panel .wfb-chat-header,
.wfb-chat-header.wfb-chat-header {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
    padding: 14px 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.wfb-chat-header-info {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.wfb-chat-header-icon {
    width: 40px !important;
    height: 40px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wfb-chat-header-icon svg {
    width: 24px !important;
    height: 24px !important;
    color: #fff !important;
    fill: #fff !important;
}

.wfb-chat-header-text {
    display: flex !important;
    flex-direction: column !important;
}

.wfb-chat-header-title {
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    line-height: 1.2 !important;
}

.wfb-chat-header-status {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 12px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ==============================================
   CHAT BODY STYLES
   ============================================== */
.wfb-wrapper .wfb-chat-body,
.wfb-chat-body.wfb-chat-body {
    padding: 20px 16px !important;
    background: #f0f2f5 !important;
    background-color: #f0f2f5 !important;
    min-height: 80px !important;
}

/* ==============================================
   CHAT BUBBLE STYLES
   ============================================== */
.wfb-wrapper .wfb-chat-bubble,
.wfb-chat-bubble.wfb-chat-bubble {
    background: #fff !important;
    background-color: #fff !important;
    padding: 12px 16px !important;
    border-radius: 0 12px 12px 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
    max-width: 90% !important;
    position: relative !important;
}

.wfb-chat-bubble::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -8px !important;
    width: 0 !important;
    height: 0 !important;
    border-style: solid !important;
    border-width: 0 8px 10px 0 !important;
    border-color: transparent #fff transparent transparent !important;
}

.wfb-chat-bubble-icon {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 6px !important;
}

.wfb-chat-bubble-icon svg {
    width: 20px !important;
    height: 20px !important;
    color: #25d366 !important;
    fill: #25d366 !important;
}

.wfb-chat-bubble-message {
    color: #303030 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ==============================================
   SEND AREA (simplified - no input field)
   ============================================== */
.wfb-wrapper .wfb-send-area,
.wfb-send-area.wfb-send-area {
    background: #fff !important;
    background-color: #fff !important;
    padding: 12px 16px !important;
    border-top: 1px solid #e8e8e8 !important;
}

/* ==============================================
   SEND BUTTON - FORCE GREEN
   ============================================== */
.wfb-wrapper .wfb-send-button,
.wfb-wrapper button.wfb-send-button,
.wfb-message-input-area .wfb-send-button,
.wfb-send-button.wfb-send-button,
button.wfb-send-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 14px 20px !important;
    background: #25d366 !important;
    background-color: #25d366 !important;
    background-image: none !important;
    color: #fff !important;
    border: none !important;
    border-color: transparent !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.wfb-wrapper .wfb-send-button:hover,
.wfb-wrapper button.wfb-send-button:hover,
.wfb-message-input-area .wfb-send-button:hover,
.wfb-send-button.wfb-send-button:hover,
button.wfb-send-button:hover {
    background: #20ba5a !important;
    background-color: #20ba5a !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
    border: none !important;
    color: #fff !important;
}

.wfb-wrapper .wfb-send-button:active,
.wfb-send-button.wfb-send-button:active {
    transform: translateY(0) !important;
    background: #25d366 !important;
    background-color: #25d366 !important;
}

.wfb-wrapper .wfb-send-button:focus,
.wfb-send-button.wfb-send-button:focus {
    outline: 2px solid #25d366 !important;
    outline-offset: 2px !important;
    background: #25d366 !important;
    background-color: #25d366 !important;
}

.wfb-send-button svg {
    width: 20px !important;
    height: 20px !important;
    color: #fff !important;
    fill: #fff !important;
}

/* ==============================================
   ONLINE QUOTE BUTTON (above WhatsApp button)
   ============================================== */
.wfb-wrapper .wfb-quote-button,
.wfb-wrapper a.wfb-quote-button,
a.wfb-quote-button.wfb-quote-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: linear-gradient(135deg, #1B2A4A 0%, #0D1B3E 100%) !important;
    background-color: #1B2A4A !important;
    background-image: linear-gradient(135deg, #1B2A4A 0%, #0D1B3E 100%) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    padding: 11px 20px !important;
    margin-bottom: 18px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(27, 42, 74, 0.45), 0 1px 3px rgba(0,0,0,0.12) !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    z-index: 10000 !important;
    position: relative !important;
    min-width: unset !important;
    min-height: unset !important;
    outline: none !important;
    line-height: 1.3 !important;
}

.wfb-wrapper .wfb-quote-button:hover,
a.wfb-quote-button.wfb-quote-button:hover {
    background: linear-gradient(135deg, #243558 0%, #152850 100%) !important;
    background-color: #243558 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(27, 42, 74, 0.6), 0 2px 6px rgba(0,0,0,0.15) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    text-decoration: none !important;
}

.wfb-wrapper .wfb-quote-button:active,
a.wfb-quote-button.wfb-quote-button:active {
    transform: translateY(0) !important;
    background: linear-gradient(135deg, #1B2A4A 0%, #0D1B3E 100%) !important;
    background-color: #1B2A4A !important;
}

.wfb-wrapper .wfb-quote-button:focus,
a.wfb-quote-button.wfb-quote-button:focus {
    outline: 2px solid #1B2A4A !important;
    outline-offset: 2px !important;
    background: linear-gradient(135deg, #1B2A4A 0%, #0D1B3E 100%) !important;
    background-color: #1B2A4A !important;
}

.wfb-quote-button .wfb-quote-icon,
.wfb-quote-button svg.wfb-quote-icon {
    width: 18px !important;
    height: 18px !important;
    color: #fff !important;
    stroke: #fff !important;
    fill: none !important;
    flex-shrink: 0 !important;
}

.wfb-quote-button .wfb-quote-text {
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

@keyframes wfb-quote-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(27, 42, 74, 0.45), 0 1px 3px rgba(0,0,0,0.12) !important;
        border-color: rgba(255, 255, 255, 0.15) !important;
    }
    50% {
        box-shadow: 0 4px 15px rgba(27, 42, 74, 0.7), 0 0 0 6px rgba(27, 42, 74, 0.12) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
    }
}

.wfb-wrapper .wfb-quote-button,
a.wfb-quote-button.wfb-quote-button {
    animation: wfb-quote-glow 3s infinite !important;
}

.wfb-wrapper .wfb-quote-button:hover,
a.wfb-quote-button.wfb-quote-button:hover {
    animation: none !important;
}

/* ==============================================
   MOBILE RESPONSIVENESS
   ============================================== */
@media (max-width: 768px) {
    .wfb-wrapper {
        bottom: 15px !important;
    }
    
    .wfb-position-right {
        right: 15px !important;
    }
    
    .wfb-position-left {
        left: 15px !important;
    }
    
    .wfb-wrapper .wfb-button,
    .wfb-button.wfb-button {
        width: 56px !important;
        height: 56px !important;
    }
    
    .wfb-wrapper .wfb-icon,
    .wfb-button .wfb-icon {
        width: 28px !important;
        height: 28px !important;
    }
    
    .wfb-wrapper .wfb-chat-panel,
    .wfb-chat-panel.wfb-chat-panel {
        width: 290px !important;
        bottom: 110px !important;
    }
    
    .wfb-wrapper .wfb-chat-header,
    .wfb-chat-header.wfb-chat-header {
        padding: 12px 14px !important;
    }
    
    .wfb-chat-header-icon {
        width: 36px !important;
        height: 36px !important;
    }
    
    .wfb-chat-header-icon svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .wfb-chat-header-title {
        font-size: 15px !important;
    }
    
    .wfb-wrapper .wfb-send-button,
    .wfb-send-button.wfb-send-button {
        padding: 12px 16px !important;
        font-size: 15px !important;
    }
    
    .wfb-wrapper .wfb-quote-button,
    a.wfb-quote-button.wfb-quote-button {
        padding: 9px 16px !important;
        font-size: 12px !important;
        margin-bottom: 14px !important;
        border-radius: 10px !important;
    }
    
    .wfb-quote-button .wfb-quote-icon,
    .wfb-quote-button svg.wfb-quote-icon {
        width: 16px !important;
        height: 16px !important;
    }
    
    .wfb-quote-button .wfb-quote-text {
        font-size: 12px !important;
    }
}

/* ==============================================
   ANIMATION FOR ATTENTION
   ============================================== */
@keyframes wfb-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4) !important;
    }
    50% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.8), 0 0 0 8px rgba(37, 211, 102, 0.2) !important;
    }
}

.wfb-wrapper .wfb-button,
.wfb-button.wfb-button {
    animation: wfb-pulse 2s infinite !important;
}

.wfb-wrapper .wfb-button:hover,
.wfb-button.wfb-button:hover {
    animation: none !important;
}

/* ==============================================
   ACCESSIBILITY
   ============================================== */
@media (prefers-reduced-motion: reduce) {
    .wfb-wrapper,
    .wfb-wrapper .wfb-button,
    .wfb-wrapper .wfb-chat-panel,
    .wfb-wrapper .wfb-close-button,
    .wfb-wrapper .wfb-send-button,
    .wfb-wrapper .wfb-quote-button {
        transition: none !important;
        animation: none !important;
    }
}
