/* =========================================================
   1. STANDARD HEART OVERLAYS (Shop & Single Product)
========================================================= */

/* Shop Loop Heart */
.product .wc-sool-heart {
    position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; cursor: pointer; z-index: 10; transition: transform 0.2s ease;
}
.product .wc-sool-heart svg { fill: rgba(255, 255, 255, 0.8); stroke: #ff4757; stroke-width: 2px; }
.product .wc-sool-heart:hover { transform: scale(1.1); }

/* Single Product Page Gallery Heart (Moved left to avoid zoom trigger) */
.woocommerce-product-gallery .wc-sool-heart-single {
    position: absolute;
    top: 15px;
    right: 60px !important; 
    width: 35px;
    height: 35px;
    cursor: pointer;
    z-index: 9999 !important;
    transition: transform 0.2s ease;
}
.woocommerce-product-gallery .wc-sool-heart-single svg {
    fill: rgba(255, 255, 255, 0.9);
    stroke: #ff4757;
    stroke-width: 2px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); 
}
.woocommerce-product-gallery .wc-sool-heart-single:hover {
    transform: scale(1.15);
}

/* Liked State overrides (Theme Agnostic) */
.wc-sool-heart.liked svg,
.wc-sool-heart-block.liked svg,
.wc-sool-heart-featured.liked svg,
.wc-sool-heart-single.liked svg {
    fill: #ff4757 !important; stroke: #ff4757 !important;
}

/* =========================================================
   2. PRODUCT PAGE BUTTONS (Theme Native)
========================================================= */
.wc-sool-actions-wrapper {
    display: flex; gap: 10px; margin: 20px 0; clear: both; flex-wrap: wrap;
}
.wc-sool-like-btn {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s ease;
}
.wc-sool-like-btn .wc-sool-btn-icon { width: 22px; height: 22px; fill: currentColor; }
.wc-sool-like-btn.liked { opacity: 0.8; }

* Message Seller Button - White Border Style */

.wc-sool-open-msg-btn, 
.wc-sool-open-msg-btn * {
    color: #000000 !important;
}

.button, 
.elementor-button-wrapper .elementor-button, 
.wc-sool-open-msg-btn {
    white-space: nowrap !important;
    width: auto !important;
    display: inline-flex !important; /* Ensures it only takes up as much space as the text needs */
}

/* Message Seller Button - White Border Style */
.wc-sool-open-msg-btn {
    display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; transition: all 0.3s ease !important;
    background-color: #00a0f6 !important; 
    color: #000000 !important;                
    border: 2px solid #CCCCCC !important;     
    padding: 10px 24px !important;
    border-radius: 5px !important;
    font-weight: bold !important;
    font-size: 16px !important;
    cursor: pointer !important;
    text-transform: uppercase;
}
.wc-sool-open-msg-btn:hover,
.wc-sool-open-msg-btn:focus,
.wc-sool-open-msg-btn:active {
    background-color: #cecece !important;     
    color: #000000 !important;                
    border: 2px solid #000000 !important;     
    transform: scale(1.03) !important;        
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3) !important; 
}

/* Main Button State */
.button.wc-sool-btn-main {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    border-radius: 50px !important; /* Matches your previous pill-style preference */
    padding: 10px 24px !important;
    font-weight: bold !important;
    text-transform: uppercase;
    
    /* Fix for the two-line stretching issue */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    width: auto !important;
    min-width: max-content;
}

/* Message Seller Button - Light Blue Style */
.button.wc-sool-open-msg-btn {
    background-color: #add8e6 !important; /* Light Blue */
    color: #000000 !important;           /* Black Text */
    border: 2px solid #555555 !important;  /* Dark Grey Border */
    border-radius: 0px !important;
    padding: 10px 24px !important;
    font-weight: bold !important;
    text-transform: uppercase;
    
    /* Prevents stretching/wrapping */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    width: auto !important;
    transition: all 0.3s ease !important;
}

/* Hover State - Grey Blue */
.button.wc-sool-open-msg-btn:hover,
.button.wc-sool-open-msg-btn:focus {
    background-color: #708090 !important; /* Slate/Grey Blue */
    color: #ffffff !important;           /* Switching to white for contrast on darker hover */
    border-color: #333333 !important;
    transform: translateY(-1px);
}

/* Hover, Focus, and Active States */
.button.wc-sool-btn-main:hover,
.button.wc-sool-btn-main:focus,
.button.wc-sool-btn-main:active {
    background-color: #eeeeee !important; /* Light grey */
    color: #000000 !important;
    border-color: #000000 !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
    transform: translateY(-1px);
    transition: all 0.2s ease-in-out !important;
}

/* Target the button AND any nested text/spans/icons */
.button.wc-sool-open-msg-btn,
.button.wc-sool-open-msg-btn span,
.button.wc-sool-open-msg-btn i {
    color: #000000 !important;
}

/* Ensure hover text also follows your rules */
.button.wc-sool-open-msg-btn:hover,
.button.wc-sool-open-msg-btn:hover span,
.button.wc-sool-open-msg-btn:hover i {
    color: #000000 !important; /* White text for the darker grey-blue hover */
}

/* Alt Main Button - High Contrast Style */
.button.alt.wc-sool-btn-main {
    background-color: #000000 !important; /* Black background */
    color: #ffffff !important;           /* White text */
    border: 2px solid #000000 !important;
    border-radius: 0 !important;         /* Sharp corners per your last request */
    padding: 10px 24px !important;
    font-weight: bold !important;
    text-transform: uppercase;
    
    /* Layout fixes */
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    width: auto !important;
}

/* Ensure nested text is white (Elementor Fix) */
.button.alt.wc-sool-btn-main span,
.button.alt.wc-sool-btn-main .elementor-button-text {
    color: #ffffff !important;
}

/* Hover State - Dark Grey */
.button.alt.wc-sool-btn-main:hover,
.button.alt.wc-sool-btn-main:focus {
    background-color: #333333 !important; /* Dark grey hover */
    color: #ffffff !important;
    border-color: #333333 !important;
    transform: translateY(-1px);
    transition: all 0.2s ease-in-out !important;
}

/* =========================================================
   3. MY ACCOUNT TABLES & CHAT UI
========================================================= */
.wc-sool-direct-badge { color: #ff4757; font-weight: bold; }
.wc-sool-right-align { text-align: right !important; }
.wc-sool-product-cell { display: flex; align-items: center; gap: 15px; }

/* Flexbox Action Buttons */
.wc-sool-actions-cell .wc-sool-btn-group { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: nowrap; }

/* The X Unlike Button */
.wc-sool-unlike-btn {
    background: transparent !important; color: #ff4757 !important; border: 2px solid currentColor !important;
    padding: 5px 12px !important; font-weight: bold !important; cursor: pointer; border-radius: 4px;
}
.wc-sool-unlike-btn:hover { background: #ff4757 !important; color: #ffffff !important; }

/* Chat Interface */
.wc-sool-chat-header { margin-bottom: 20px; }
.wc-sool-chat-header h3 { margin-top: 15px; }

.wc-sool-chat-box {
    background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.1); padding: 20px; border-radius: 8px;
    height: 400px; overflow-y: auto; overflow-x: hidden; margin-bottom: 20px; display: flex; flex-direction: column;
}
.wc-sool-chat-row { display: flex; margin-bottom: 15px; width: 100%; }
.wc-sool-chat-row.seller { justify-content: flex-start; }
.wc-sool-chat-row.customer { justify-content: flex-end; }

.wc-sool-chat-bubble { padding: 12px 18px; border-radius: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); word-break: break-word; max-width: 90%; font-size: 15px; line-height: 1.5; }
@media (min-width: 768px) { .wc-sool-chat-bubble { max-width: 65%; } }

.wc-sool-chat-bubble.seller { background: var(--wp--preset--color--background, #ffffff); color: var(--wp--preset--color--text, #333333); border: 1px solid rgba(0,0,0,0.1); }
.wc-sool-chat-bubble.customer { background: var(--wp--preset--color--primary, #2271b1); color: #ffffff; }

.wc-sool-chat-sender { display: block; margin-bottom: 5px; font-weight: bold; opacity: 0.7; }
.wc-sool-chat-offer-link { margin-top: 10px; }
.wc-sool-chat-offer-link a { padding: 5px 10px !important; font-size: 12px !important; line-height: 1 !important; }

.wc-sool-reply-area textarea { width: 100%; margin-bottom: 10px; box-sizing: border-box; padding: 10px; }

/* =========================================================
   4. MODALS & LOADERS
========================================================= */

/* The actual popup background and structure */
.wc-sool-modal { 
    display: none; 
    position: fixed; 
    z-index: 999999 !important; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.7); 
}
.wc-sool-modal-content { 
    background: #ffffff !important; 
    margin: 15% auto; 
    padding: 30px; 
    width: 90%; 
    max-width: 400px; 
    border-radius: 8px; 
    text-align: center; 
    position: relative; 
    box-shadow: 0 5px 25px rgba(0,0,0,0.5); 
    border: 1px solid #dddddd; 
}

/* Modal text forced to Black */
.wc-sool-modal-content *,
.wc-sool-modal-content h1,
.wc-sool-modal-content h2,
.wc-sool-modal-content h3,
.wc-sool-modal-content h4,
.wc-sool-modal-content p,
.wc-sool-modal-content span,
.wc-sool-modal-content strong,
.wc-sool-modal-content small { 
    color: #000000 !important; 
    text-shadow: none !important; 
}

/* Message Modal specific fixes */
.wc-sool-msg-content { text-align: left; }
.wc-sool-msg-content textarea { 
    width: 100%; 
    padding: 10px; 
    box-sizing: border-box; 
    color: #000000 !important; 
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
}

/* Modal Close Button (X) */
body .wc-sool-modal .wc-sool-modal-content .wc-sool-close { 
    position: absolute !important; 
    top: 5px !important; 
    right: 15px !important; 
    font-size: 38px !important; 
    font-weight: bold !important; 
    cursor: pointer !important; 
    line-height: 1 !important; 
    opacity: 1 !important; 
    color: #000000 !important; 
    text-decoration: none !important;
}
body .wc-sool-modal .wc-sool-modal-content .wc-sool-close:hover { 
    color: #ff4757 !important; 
    transform: scale(1.1) !important;
}

/* --- THE SPINNER & LOADING TEXT --- */
.wc-sool-loader { 
    text-align: center !important; 
    padding: 20px 0 !important; 
}
.wc-sool-loader p { 
    font-size: 16px !important; 
    font-weight: bold !important; 
    color: #333333 !important; 
    margin-top: 15px !important;
}
.wc-sool-spinner { 
    animation: wc_sool_rotate 2s linear infinite !important; 
    width: 40px !important; 
    height: 40px !important; 
    margin: 0 auto !important; 
    display: block !important;
}
.wc-sool-spinner .path { 
    stroke: #ff4757 !important; 
    stroke-linecap: round !important; 
    animation: wc_sool_dash 1.5s ease-in-out infinite !important; 
    stroke-width: 5 !important; 
    fill: none !important; 
}
.wc-sool-success-text { color: green !important; font-weight: bold !important; }
.wc-sool-error-text { color: #ff4757 !important; font-weight: bold !important; }

@keyframes wc_sool_rotate { 100% { transform: rotate(360deg); } }
@keyframes wc_sool_dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* =========================================================
   5. GUTENBERG BLOCKS & ASNP BADGES
========================================================= */
.asnp-sale-badge-image-wrapper, .wc-block-grid__product-image, .wc-block-grid__product-image a, .wp-block-woocommerce-product-image, .wp-block-woocommerce-product-image a, .wc-block-components-product-image, .wc-block-grid__product, .wc-block-components-product-card, .wp-block-woocommerce-featured-product {
    position: relative !important; overflow: visible !important; 
}
.wc-sool-heart-block {
    position: absolute !important; top: 15px !important; right: 15px !important; width: 35px !important; height: 35px !important; z-index: 99999 !important;
    cursor: pointer !important; transition: transform 0.2s ease !important; display: flex !important; align-items: center !important; justify-content: center !important; pointer-events: auto !important; 
}
.wc-sool-heart-block svg { fill: rgba(255, 255, 255, 0.9) !important; stroke: #ff4757 !important; stroke-width: 2px !important; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.6)) !important; }
.wc-sool-heart-block:hover { transform: scale(1.15) !important; }

.wp-block-woocommerce-featured-product .wc-sool-heart-featured, .wc-block-featured-product .wc-sool-heart-featured {
    position: absolute !important; top: 25px !important; right: 25px !important; width: 45px !important; height: 45px !important; z-index: 99999 !important; cursor: pointer !important; transition: transform 0.2s ease !important;
}
.wp-block-woocommerce-featured-product .wc-sool-heart-featured svg, .wc-block-featured-product .wc-sool-heart-featured svg {
    fill: rgba(255, 255, 255, 0.9) !important; stroke: #ff4757 !important; stroke-width: 2px !important; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5)) !important; 
}
.wp-block-woocommerce-featured-product .wc-sool-heart-featured:hover, .wc-block-featured-product .wc-sool-heart-featured:hover { transform: scale(1.15) !important; }