#upsell-place-order {
    background: #1e5da7;
    border-radius: 20px;
    text-transform: uppercase;
    color: #fff;
    font-weight: bold;
    border: none;
    padding: 10px;
    cursor: pointer;
}
.upsell-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.upsell-popup {
    background: #fff;
    padding: 30px;
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    border: 3px solid #1e5da7;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.upsell-product-list {
    margin-bottom: 30px;
}

.upsell-product {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.card-item {
    height: 300px;
}

.upsell-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e2e2e2;
    margin-bottom: 20px;
}

.upsell-popup-header h3 {
    font-size: 24px;
    color: #154785;
    margin: 0;
}

.upsell-popup-header .close-popup {
    cursor: pointer;
    font-size: 24px;
    color: #333;
}

.upsell-product-img img {
    margin-bottom: 10px;
}

.upsell-product h4 {
    font-size: 18px;
    color: #333;
    margin: 0 0 10px;
}

.upsell-product .product-price {
    font-size: 16px;
    color: #4CAF50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin: 10px 0;
}

.original-price {
    text-decoration: line-through;
    color: #1e5da7;
    font-size: 1.2em;
    font-weight: bold;
}

.sale-price {
    color: #e41e31;
    font-weight: bold;
    font-size: 1.2em;
}

.regular-price {
    font-size: 1.2em;
    font-weight: bold;
}

.upsell-product .product-title {
    text-align: center;
    font-size: 16px;
    color: #333;
    margin: 5px 0;
    padding: 10px;
    font-weight: 600;
}

/* Add responsive styles for mobile */
@media only screen and (max-width: 769px) {
    .upsell-product .product-title {
        font-size: 15px;
        margin: 10px 0;
        padding: 5px;
    }
}

.upsell-actions {
    display: flex;
    justify-content: space-between;
}

/* Update the place-order-upsell styles */
.place-order-upsell, .decline-upsell {
    background-color: #03a84e;
    color: #fff;
    width: auto; /* Remove if you want full width */
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block !important; /* Always show the button */
}

.place-order-upsell.loading, .decline-upsell.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
    padding-right: 2.5em;
}

.place-order-upsell.loading::after, .decline-upsell.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.7em;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-left-color: #ffffff;
    border-radius: 50%;
    animation: loader-spin 0.8s infinite linear;
    margin-top: -0.5em;
}


.decline-upsell {
    background-color: #838383;
    color: #fff;
}

.decline-upsell:hover {
    background-color: #838383;
}

.upsell-add-to-cart-button a {
    display: inline-block;
    padding: 10px 15px;
    margin-bottom: 10px;
    background: #1e5da7;
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    transition: background 0.3s, opacity 0.3s;
}

.upsell-remove-from-cart {
    background: #e84d4d !important;
}

.upsell-add-to-cart-button a:hover {
    background: #154785;
}

.upsell-add-to-cart-button a.added {
    background: #4CAF50 !important;
    cursor: default;
}

.upsell-add-to-cart-button a.added:hover {
    background: #4CAF50 !important;
    opacity: 0.8;
}

.hidden {
    display: none;
}

.popup-header-txt {
    text-align: center;
    color: #1e5da7;
    font-size: xx-large;
    font-weight: 700;
    margin-bottom: 30px;
}

.popup-sub-heading {
    text-align: center;
    font-size: medium;
}

.timer-container {
    text-align: center;
    margin-bottom: 20px;
    color: #e74c3c;
}

.countdown-timer {
    font-size: 24px;
    font-weight: bold;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
}

.timer-label {
    font-size: 14px;
    margin-top: 5px;
    color: #666;
}

.countdown-timer.warning {
    color: #e74c3c;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.upsell-add-to-cart-button {
    position: relative;
}

.upsell-add-to-cart-button .button {
    position: relative;
    transition: all 0.3s ease;
}

.upsell-add-to-cart-button .button.loading {
    opacity: 0.7;
    pointer-events: none;
    padding-right: 2.5em;
}

.upsell-add-to-cart-button .button.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.7em;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-left-color: #ffffff;
    border-radius: 50%;
    animation: loader-spin 0.8s infinite linear;
    margin-top: -0.5em;
    pointer-events: none;
}

@keyframes loader-spin {
    100% {
        transform: rotate(360deg);
    }
}

@media only screen and (max-width: 769px) {
    .upsell-popup {
        background: #fff;
        padding: 15px;
        width: 95%;
        border-radius: 10px;
    }

    .popup-header-txt {
        margin-bottom: 15px;
    }

    .upsell-product {
        text-align: center;
        padding: 10px;
        background: #f9f9f9;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        height: 100%;
    }

    .card-item {
        height: 290px;
    }

    .upsell-product h4 {
        font-size: 10px;
        color: #333;
        margin: 0 0 10px;
    }

    .upsell-add-to-cart-button a {
        display: flex;
        padding: 5px 5px;
        margin-bottom: 15px;
        font-size: 10px !important;
        justify-content: center;
        width: 100%;
    }

    .add_to_cart_button::before {
        font-size: 10px !important;
    }

    .cart-totals {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .place-order-upsell, .decline-upsell {
        padding: 10px 10px;
        font-size: 11px;
    }
}
