/* Cancellation Offer Popup Styles */
.cancellation-offer-popup-survey__title,
.cancellation-offer-popup-discount-offer__title {
    color: #000000;
    font-weight: 600;
}

.cancellation-offer-popup-survey__questions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex-wrap: wrap
}

.cancellation-offer-popup-survey-items {
    display: flex;
    flex-direction: column;
    padding: 0 24px;
}

.cancellation-offer-popup-survey-item {
    background: #ffffff;
    border: none;
    padding: 4px;
}

/* Updated: Changed from row-reverse to row as per your requirements */
.cancellation-offer-popup-survey__buttons {
    justify-content: center;
    flex-direction: row;
}

/* New: Added styling for fac-cancellation-buttons */
.fac-cancellation-buttons {
    flex-direction: row-reverse;
}

.cancellation-offer-popup-discount-offer .cancellation-offer-popup-discount-offer__dismiss-button {
    display: none;
}

.cancellation-offer-popup-discount-offer__buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
}

/* Updated: Green buttons - dismiss button and continue button */
.cancellation-offer-popup-survey__dismiss-button,
.cancellation-offer-popup-discount-offer__buttons .cancellation-offer-popup-discount-offer__continue-button {
    border-radius: 24px;
    background-color: #00a650 !important;
    color: #fff !important;
    padding: .6180469716em 1.41575em;
    cursor: pointer;
}

/* Updated: Continue cancelling buttons - white background with underline */
.cancellation-offer-popup-continue-cancelling,
.cancellation-offer-popup-continue-cancelling-in-list {
    border-radius: 24px;
    background-color: #fff;
    color: #888;
    text-decoration: underline;
    padding: .6180469716em 1.41575em;
}

#cancellation-offer-popup .primary-button {
    border-radius: 24px;
    background: #00a650;
    color: #ffffff;
}

#cancellation-offer-popup .primary-button:hover {
    border-radius: 24px;
    background: #52ffa5;
    color: #ffffff;
}

#cancellation-offer-popup .danger-button {
    border-radius: 24px;
    background: #fff;
    color: #888;
    text-decoration: underline;
}

/* Updated: Hover states for cancellation buttons - red background */
#cancellation-offer-popup .danger-button:hover {
    border-radius: 24px;
    text-decoration: none;
}

#cancellation-offer-popup br, 
#cancellation-offer-popup button br, 
.woocommerce-Button br, 
.woocommerce-Message br, 
.cancellation-offer-popup-survey-item__checkbox p, 
.cancellation-offer-popup-confirmation-list div br {
    display: none;
}

/* Updated: Continue button styles - white background with underline */
#cancellation-offer-popup .primary-button.cancellation-offer-popup-survey__continue-button,
#cancellation-offer-popup .cancellation-offer-popup-continue-cancelling,
#cancellation-offer-popup .primary-button.cancellation-offer-popup-continue-cancelling-in-list {
    background-color: #fff;
    color: #888;
    text-decoration: underline;
}

#cancellation-offer-popup button {
    border: 0;
}

/* Updated: Hover states for continue buttons - red background */
#cancellation-offer-popup .primary-button.cancellation-offer-popup-survey__continue-button:hover,
#cancellation-offer-popup .cancellation-offer-popup-continue-cancelling:hover,
#cancellation-offer-popup .primary-button.cancellation-offer-popup-continue-cancelling-in-list:hover,
.cancellation-offer-popup-continue-cancelling:hover,
#cancellation-offer-popup .cancellation-offer-popup-continue-cancelling:hover {
    text-decoration: none;
}

#cancellation-offer-popup .mfp-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    color: #666666;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    line-height: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#cancellation-offer-popup .mfp-close:hover {
    background-color: #DC2626;
}

.woocommerce-shipping-fields {
    display: none !important;
}

/* Customer Details Form Styling */
#customer_details p {
    position: relative;
}

#customer_details p label {
    position: absolute;
    left: 16px;
    top: 16px;
    transform: translateY(-50%);
    color: gray;
    font-size: 12px;
    transition: 0.2s;
    visibility: visible;
}

#customer_details p input {
    padding: 20px 10px !important;
    box-sizing: border-box;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.25px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1) !important;
    margin: 4px 0;
    background-color: #fff !important;
}

#customer_details p .select2-selection{
    margin: 30px 0 18px !important;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1) !important;
    background-color: #fff !important;
}

#customer_details p label.label-up {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: blue;
}

#billing_state_field label,
#billing_country_field label {
    top: 42px !important;
    z-index: 1;
}

#customer_details .select2-selection {
    height: 62px !important;
    display: flex !important;
    align-items: center;
}

#customer_details .select2-selection__arrow {
    top: 24px !important;
}

/* Checkout Order Review Styling */
.e-checkout__order_review .e-checkout-secondary-title,
.e-checkout__order_review .e-coupon-anchor-description {
    display: none;
}

.e-checkout__order_review .e-coupon-anchor {
    margin: 0 !important;
    display: block !important;
}

.e-checkout__order_review .e-coupon-box {
    padding: 0 !important;
    background: #fff !important;
    border: none !important;
}

.e-checkout__order_review #coupon_code {
    background: #fff !important;
    box-shadow: none !important;
}

.woocommerce-checkout-review-order-table {
    border-collapse: collapse;
    border: thin solid #e2e2e2;
}

.woocommerce-checkout-review-order-table td,
.woocommerce-checkout-review-order-table th {
    padding: 8px;
    border-bottom: thin solid #e2e2e2;
    color: #020617;
    background: #fff !important;
}

/* Mobile Responsive Styles */
@media only screen and (max-width: 632px) {
    .cancellation-offer-popup-survey__questions {
        display: flex!important;
        flex-direction: column;
    }

    .fac-cancellation-plan-details {
        grid-template-columns: auto !important;
    }

    /* Updated: Mobile override for survey buttons */
    .cancellation-offer-popup-survey__buttons {
        flex-direction: column-reverse !important;
    }

    /* Updated: Mobile override for fac-cancellation-buttons */
    .fac-cancellation-buttons {
        margin-top: 16px;
        flex-direction: column !important;
        gap: 12px;
    }

    .fac-cancellation-final-block {
        flex-direction: column;
    }

    .fac-cancellation-blog-content {
        width: 100% !important;
    }

    .fac-cancellation-plan-details {
        width: 100% !important;
    }

    #cancellation-offer-popup img {
        height: 64px;
        width: 64px;
        margin: 0 auto;
    }
    
    #cancellation-offer-popup .wp-block-media-text>.wp-block-media-text__content {
        padding:0px;
    }
}