/**
 * Custom CSS for Go Back button
 * Moves the Go Back button to bottom center of the form
 * Ensures it appears BELOW social login buttons with proper spacing
 */

/* Override the default cancel button position */
.digits-form_container .digits-cancel,
.dig_ma-box .digits-cancel,
.digits-form_footer_go_back .digits-form_go_back,
.digits-form_go_back.dig_login_cancel {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    margin-top: 20px !important;
    padding: 12px !important;
    text-align: center !important;
    display: block !important;
    right: auto !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    background-image: none !important;
}

/* Add "Go Back" text */
.digits-form_container .digits-cancel::after,
.dig_ma-box .digits-cancel::after {
    content: 'Go Back' !important;
    color: #fff !important;
    font-size: 14px !important;
    text-decoration: none !important;
    display: inline-block !important;
}

/* Hover effect */
.digits-form_container .digits-cancel:hover::after,
.dig_ma-box .digits-cancel:hover::after {
    text-decoration: underline !important;
}

/* Ensure the footer wrapper is centered and has enough space AFTER social buttons */
.digits-form_footer_go_back,
.digits-form_footer_go_back_wrapper,
#digits_go_back_wrap {
    text-align: center !important;
    width: 100% !important;
    margin-top: 40px !important;
    padding-top: 30px !important;
    padding-bottom: 20px !important;
    position: relative !important;
    z-index: 10 !important;
    clear: both !important;
    display: block !important;
}

/* Ensure the container has proper spacing */
.digits-form_container {
    padding-bottom: 30px !important;
}

/* Make sure social login buttons don't overlap Go Back */
.digits-form_wrapper {
    margin-bottom: 0 !important;
    padding-bottom: 20px !important;
}

/* Add spacing after social login buttons if they exist */
.digits-social-logins-box {
    margin-bottom: 20px !important;
    padding-bottom: 20px !important;
}

/* Ensure social login box stays within form boundaries */
.digits-form_footer,
.digits-form_social_login,
.dig_login_social_wrapper {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    position: relative !important;
}

/* Alternative: If you want to keep the X icon but move it to bottom */
/*
.digits-cancel {
    position: relative !important;
    width: 100% !important;
    margin-top: 20px !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    right: auto !important;
    top: auto !important;
}
*/
