/* 57 Reflex WhatsApp Orders - Frontend stylesheet */

.rwo-btn-wrapper {
    margin-top: 12px;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.rwo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-family: inherit;
    box-sizing: border-box;
}

.rwo-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    text-decoration: none !important;
}

.rwo-btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Button Layout Widths */
.rwo-btn-wrapper.rwo-align-full {
    display: flex !important;
    width: 100% !important;
}
.rwo-btn-wrapper.rwo-align-full .rwo-btn {
    flex: 1 !important;
    width: 100% !important;
    display: flex !important;
}

.rwo-btn-wrapper.rwo-align-inline {
    display: inline-flex !important;
}

/* Disabled State */
.rwo-btn.rwo-disabled {
    background-color: #e0e0e0 !important;
    color: #888888 !important;
    border-color: #d0d0d0 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0.6;
}

/* Eye details button style */
.rwo-eye-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: none;
    padding: 0;
    box-sizing: border-box;
}

.rwo-eye-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.rwo-eye-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.rwo-eye-btn svg,
.rwo-eye-btn svg path {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    fill: #ffffff !important;
    stroke: none !important;
}

.rwo-label-mobile {
    display: none;
}

/* Stable two-button product-card layout across WoodMart grids. */
.rwo-btn-wrapper.rwo-context-loop,
.rwo-btn-wrapper.rwo-context-loop.rwo-align-inline,
.rwo-btn-wrapper.rwo-context-loop.rwo-align-full {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 46px !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 14px 0 16px !important;
    align-items: stretch !important;
}

.rwo-btn-wrapper.rwo-context-loop .rwo-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 46px !important;
    padding: 10px 14px !important;
    gap: 7px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    box-shadow: 0 7px 18px rgba(37, 211, 102, .20) !important;
}

.rwo-btn-wrapper.rwo-context-loop .rwo-eye-btn {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 7px 18px rgba(0, 47, 108, .18) !important;
}

.rwo-btn-wrapper.rwo-context-loop .rwo-svg-icon {
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    margin-right: 0 !important;
}

/* Cart wrapper styles */
.rwo-cart-wrapper {
    margin-top: 15px;
    margin-bottom: 15px;
}

.rwo-cart-btn {
    width: 100%;
}

/* Thank you details style */
.rwo-thankyou-btn {
    padding: 12px 20px;
    font-size: 15px;
}

/* Tooltip warning styles */
.rwo-validation-msg {
    width: 100%;
    font-size: 12px;
    color: #d9534f;
    margin-top: 5px;
    font-weight: 600;
}

.rwo-svg-icon {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
    vertical-align: middle;
}

/* RTL Support */
body.rtl .rwo-svg-icon {
    margin-right: 0;
    margin-left: 6px;
}

/* --- WhatsApp-Only Store Override Rules --- */

/* 1. Hide single-product purchase buttons in both native and Layout Builder templates. */
.single-product .single_add_to_cart_button,
.single-product button.single_add_to_cart_button,
.single-product a.single_add_to_cart_button,
.single-product .buy-now-btn,
.single-product .buy_now_button,
.single-product .single_buy_now_button,
.single-product .wd-buy-now-btn,
.single-product .woodmart-buy-now-btn,
.single-product button[name="buy-now"],
.single-product button[name="buy_now"],
.single-product button[name="wd_buy_now"],
.single-product [data-action="buy-now"],
.single-product [data-action="buy_now"],
.single-product form.cart [class*="buy-now"],
.single-product form.cart [class*="buy_now"],
.single-product .entry-summary form.cart .single_add_to_cart_button,
.single-product .entry-summary form.cart button[type="submit"],
.single-product .summary form.cart .single_add_to_cart_button,
.single-product .summary form.cart .buy-now-btn,
.single-product .summary form.cart .wd-buy-now-btn,
.single-product .summary form.cart .woodmart-buy-now-btn,
.single-product .summary .wd-buy-now-btn,
.single-product .summary .woodmart-buy-now-btn,
.single-product .summary [class*="buy-now"],
.single-product .summary [name="buy-now"] {
    display: none !important;
}

/* 2. Hide shop loop card Add to Cart buttons (WooCommerce + WoodMart theme selectors) */
.product-grid-item .woodmart-add-btn,
.product-grid-item .add_to_cart_button,
.product-grid-item .ajax_add_to_cart,
.product-grid-item .wd-add-btn,
.product-grid-item .wd-buy-now-btn,
.product-grid-item .woodmart-buy-now-btn,
.wd-hover-quick .wd-add-btn,
.wd-hover-standard .wd-add-btn {
    display: none !important;
}

/* 3. Hide header cart icon, badges, dropdowns, mini-cart sidebar, and counters */
.wd-header-cart,
.woodmart-shopping-cart,
.wd-cart-number,
.woodmart-cart-number,
.cart-widget-side,
.widget_shopping_cart,
.woocommerce-mini-cart__buttons,
.wd-header-my-account-cart,
.wd-dropdown-cart {
    display: none !important;
}

/* Keep our replacement visible even when nested near a WoodMart cart node. */
.rwo-header-wa-btn-container,
.rwo-header-wa-btn-container .rwo-header-btn {
    display: inline-flex !important;
}

/* Single-product premium full-width WhatsApp CTA. Layout-builder independent. */
.single-product .rwo-btn-wrapper.rwo-context-single {
    width: 100% !important;
    display: flex !important;
    flex: 0 0 100% !important;
    clear: both !important;
    margin: 16px 0 20px !important;
    padding: 0 !important;
}

.single-product .rwo-btn-wrapper.rwo-context-single .rwo-btn {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 100% !important;
    display: inline-flex !important;
    min-height: 56px !important;
    padding: 14px 22px !important;
    justify-content: center !important;
    gap: 9px !important;
    border: 1px solid #18b953 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #25d366 0%, #16bd55 100%) !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: .1px !important;
    box-shadow: 0 10px 24px rgba(37, 211, 102, .24) !important;
}

.single-product .rwo-btn-wrapper.rwo-context-single .rwo-btn:not(.rwo-disabled):hover {
    background: linear-gradient(135deg, #1fc45d 0%, #119f46 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 14px 30px rgba(37, 211, 102, .32) !important;
}

.single-product .rwo-btn-wrapper.rwo-context-single .rwo-svg-icon {
    width: 21px !important;
    height: 21px !important;
    margin-right: 0 !important;
}

.single-product .rwo-btn-wrapper.rwo-context-single .rwo-validation-msg {
    flex-basis: 100% !important;
}

@media (max-width: 767px) {
    .rwo-btn-wrapper.rwo-context-loop,
    .rwo-btn-wrapper.rwo-context-loop.rwo-align-inline,
    .rwo-btn-wrapper.rwo-context-loop.rwo-align-full {
        grid-template-columns: minmax(0, 1fr) 42px !important;
        gap: 6px !important;
        margin: 12px 0 14px !important;
    }

    .rwo-btn-wrapper.rwo-context-loop .rwo-label-desktop {
        display: none !important;
    }

    .rwo-btn-wrapper.rwo-context-loop .rwo-label-mobile {
        display: inline !important;
    }

    .rwo-btn-wrapper.rwo-context-loop .rwo-btn {
        min-height: 42px !important;
        padding: 8px 9px !important;
        border-radius: 9px !important;
        font-size: 13px !important;
        gap: 5px !important;
    }

    .rwo-btn-wrapper.rwo-context-loop .rwo-eye-btn {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
        border-radius: 9px !important;
    }

    .rwo-btn-wrapper.rwo-context-loop .rwo-svg-icon {
        flex-basis: 16px !important;
        width: 16px !important;
        height: 16px !important;
    }

    .single-product .rwo-btn-wrapper.rwo-context-single .rwo-btn {
        min-height: 52px !important;
        padding: 12px 16px !important;
        border-radius: 10px !important;
        font-size: 15px !important;
    }
}

/* 4. Hide generic cart & checkout forward buttons on other pages */
.checkout-button,
.wc-forward,
.checkout-forward,
.shipping-calculator-button {
    display: none !important;
}

/* Premium Validation message styling */
.rwo-validation-msg {
    display: block;
    background-color: #ffeef0;
    border: 1px solid #ffccd3;
    color: #d8000c;
    padding: 10px 14px;
    margin-top: 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}
