/* Price and Affirm Widget Side-by-Side Layout */

/* On desktop, make price and affirm display inline */
@media (min-width: 769px) {
    /* Target any price widget container */
    .elementor-widget-wd_single_product_price.wd-single-price {
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Target the parent container if it has wd-negative-gap class */
    .wd-negative-gap:has(.wd-single-price) {
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
    }
    
    /* Price styling with smaller gap before separator */
    .wd-single-price .price {
        margin: 0 !important;
        padding-right: 15px;
        font-size: 32px !important;
        font-weight: 700 !important;
        line-height: 1.2;
        white-space: nowrap;
        border-right: 1px solid #ddd;
    }
    
    /* Target Stripe/Affirm widget container - multiple selectors for compatibility */
    .elementor-widget-stripe_payment_messaging,
    .wd-negative-gap + .p-HeightObserverProvider,
    .elementor-widget-wd_single_product_price + .p-HeightObserverProvider,
    .elementor-widget-wd_single_product_price + .elementor-widget-stripe_payment_messaging {
        display: inline-flex !important;
        align-items: center !important;
        vertical-align: middle !important;
        max-width: 450px;
        margin-left: 25px !important;
        margin-top: 0 !important;
    }
    
    /* Add padding inside the Stripe widget container */
    .elementor-widget-stripe_payment_messaging .elementor-widget-container {
        padding-left: 0 !important;
    }
    
    /* Style the affirm message container */
    .p-CondensedSinglePromotionView {
        display: flex;
        align-items: center;
    }
    
    /* Style the affirm message text */
    .p-CondensedSinglePromotionView--Message {
        text-align: left !important;
        line-height: 1.5;
        font-size: 14px;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }
    
    /* Make sure text appears inline */
    .p-CondensedSinglePromotionView--Message-text {
        display: inline;
        margin-right: 5px;
    }
    
    /* Affirm logo inline */
    .p-CondensedSinglePromotionView--Message-images {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
}

/* Mobile/Tablet - keep stacked */
@media (max-width: 768px) {
    .wd-negative-gap,
    .wd-single-price,
    .elementor-widget-wd_single_product_price,
    .elementor-widget-stripe_payment_messaging {
        display: flex !important;
        margin-bottom: 15px !important;
        margin-left: 0 !important;
    }
    
    .wd-single-price .price {
        border-right: none !important;
        padding-right: 0 !important;
    }
    
    .p-HeightObserverProvider {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 10px !important;
    }
}

/* Allow Stripe/Affirm widget to display properly */
.elementor-widget-stripe_payment_messaging {
    position: relative;
}

/* Ensure the Stripe widget iframe is visible and properly sized */
.elementor-widget-stripe_payment_messaging iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 40px !important;
    border: none !important;
}

/* Style the Affirm widget container to match site design */
.elementor-widget-stripe_payment_messaging .elementor-widget-container {
    background: transparent;
}

/* Custom styling for Affirm message when it loads */
.p-CondensedSinglePromotionView {
    font-family: inherit;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

.p-CondensedSinglePromotionView--Message {
    display: flex !important;
    align-items: center;
    text-align: left !important;
}

/* Ensure Affirm logo displays properly */
.p-CondensedSinglePromotionView--Message-images {
    display: inline-flex !important;
    align-items: center;
    margin-left: 5px;
}
