.enhanced-upsell-container {
    font-family: Arial, sans-serif;
    color: #2f4f2f;
}

.enhanced-upsell-container h3 {
    font-size: 1.2em;
    margin-bottom: 5px;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.enhanced-upsell-container p {
    font-size: 1em;
    margin-bottom: 15px;
    color: #3D3D3D !important;
}

.upsell-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

button.upsell-button {
    background-color: transparent !important;
    color: #465c43 !important;
    border: none !important;
    padding: 16px 50px 16px 0px !important;
    border-radius: 0px !important;
    cursor: default !important;
}

.upsell-button:hover {
    background-color: #3c6f3c;
}

.upsell-price {
    font-size: 1.2em;
    margin-right: 10px;
    font-weight: bold;
}

.enhanced-upsell-container button.add-to-cart-button {
    background: transparent !important;
    border: 3px solid #465C43 !important;
    color: #465C43 !important;
    padding: 6px 25px 10px 25px !important;
}

.enhanced-upsell-container button.add-to-cart-button:hover {
    background-color: #465C43 !important;
    color: #fff !important;
    border-color: #465C43 !important;
}

/* Exclamation mark tooltip styles - Updated to match screenshot */
.exclamation-tooltip {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.exclamation-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background-color: #ffffff;
    color: #465C43;
    border-radius: 50%;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    border: 2px solid #465C43;
}

.exclamation-mark:hover {
    background-color: #465C43;
    color: #fff !important;
}

.tooltip-content {
    display: none;
    width: 500px;
    background-color: white;
    color: #333;
    text-align: left;
    border-radius: 8px;
    padding: 20px;
    position: absolute;
    z-index: 1000;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: #dce2db transparent transparent transparent;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
}

.tooltip-content::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -9px;
    border-width: 9px;
    border-style: solid;
    border-color: #e0e0e0 transparent transparent transparent;
    z-index: -1;
}

/* Show tooltip only on hover */
.exclamation-tooltip:hover .tooltip-content {
    display: block;
    background: #dce2db;
}

.tooltip-content ul {
    margin: 10px 0px 0px 20px;
    padding-left: 0;
    list-style: disc;
}

.tooltip-content li {
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
    color: #000000 !important;
    font-family: "Sofia Pro Soft", Sans-serif !important;
}

.tooltip-content p {
    font-weight: 400;
    color: #000000 !important;
    font-size: 18px;
    position: relative;
    line-height: 28px;
}

.tooltip-content p:last-of-type {
    margin-bottom: 5px !important;
}

.upsell-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-product .product form.cart .variations th.label label p b {
    font-size: 16px !important;
    color: black !important;
    font-weight: 500 !important;
}

.single-product .product form.cart .variations th.label span {
    display: block !important;
    font-size: 16px !important;
    color: #000000 !important;
    font-weight: 500 !important;
    font-family: Sofia Pro Soft !important;
}

.upsell-item button.upsell-button {
    pointer-events: none !important;
}

.single-product .product form.cart .variations th.label {
    display: flex;
    align-items: baseline;
    justify-content: flex-start !important;
}
.single-product .product form.cart .variations th.label label {
    display: block !important;
}
.single-product .product form.cart .variations th.label span {
    display: block !important;
}

/* Add this CSS rule to your style.css file */
.enhanced-upsell-container button.add-to-cart-button.added-to-cart {
    background-color: #465C43 !important;
    color: #fff !important;
    border-color: #465C43 !important;
}

.upsell-price span.woocommerce-Price-amount.amount bdi {
    font-family: "Sofia Pro Soft", Sans-serif !important;
}

.single-product .single_variation_wrap .enhanced-upsell-container h3 {
    font-family: "Sofia Pro Soft", Sans-serif !important;
    font-size: 20px;
}

.single-product .single_variation_wrap .enhanced-upsell-container p {
    font-family: "Sofia Pro Soft", Sans-serif !important;
}

button.upsellbtn.add-to-cart-button.button.add_to_cart_button.ajax_add_to_cart.added::after{
    display: none !important;
}

button.upsellbtn.add-to-cart-button.button.add_to_cart_button.ajax_add_to_cart {
    opacity: 1 !important;
}

@media only screen and (max-width: 600px) {
    .single-product table.variations {
        left: 10px !important;
        position: relative;
    }
    button.upsell-button {
        padding: 0px 15px 7px 0px !important;
    }
    
    /* Mobile adjustments for info button */
    .info-circle-btn {
        width: 20px !important;
        height: 20px !important;
        font-size: 11px !important;
        margin-left: 8px !important;
    }
    
    .enhanced-upsell-container h3 {
        font-size: 1.1em;
        flex-wrap: nowrap !important;
        align-items: flex-start;
    }
    
    /* FIXED: Mobile tooltip positioning - centered with high specificity */
    .enhanced-upsell-container .exclamation-tooltip .tooltip-content {
        width: 370px !important;
        left: 0px !important;
        transform: translateX(-100%) !important;
    }
    
    .enhanced-upsell-container .exclamation-tooltip .tooltip-content::after {
        left: 50% !important;
        right: auto !important;
        margin-left: -8px !important;
    }
    
    .enhanced-upsell-container .exclamation-tooltip .tooltip-content::before {
        left: 50% !important;
        right: auto !important;
        margin-left: -9px !important;
    }

    .exclamation-mark {
        background-color: #eeeae7 !important;
    }
}

/* Additional mobile fallback with even higher specificity */
@media only screen and (max-width: 480px) {
    .enhanced-upsell-container .upsell-header .exclamation-tooltip .tooltip-content {
        width: 370px !important;
        left: 0px !important;
        transform: translateX(-100%) !important;
    }
    
    .enhanced-upsell-container .upsell-header .exclamation-tooltip .tooltip-content::after {
        left: 50% !important;
        right: auto !important;
        margin-left: -8px !important;
    }
    
    .enhanced-upsell-container .upsell-header .exclamation-tooltip .tooltip-content::before {
        left: 50% !important;
        right: auto !important;
        margin-left: -9px !important;
    }
}

.enhanced-upsell-container button.add-to-cart-button {
    padding: 6px 25px 10px 25px !important;
    background: transparent !important;
    border: 3px solid #465C43 !important;
    color: #465C43 !important;
}

.single-product .variations{
    justify-content: start !important;
}

.single-product .variations .variable-items-wrapper {
    justify-content: start !important;
}