// Shared styles for Success block (frontend + editor)
.mepr-success, .wp-block-memberpress-thank-you-success {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 80px;

    @media (max-width: 768px) {
        flex-direction: column !important;
    }

    // Hide welcome image when showImage is false
    &.mepr-hide-welcome-image {
        .mepr-image,
        .wp-block-memberpress-image,
        .wp-block-memberpress-thank-you-image {
            display: none;
        }
    }

    &::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        width: 1px;
        background: rgba(0, 0, 0, 0.15);
        display: none;
    }

    // Only show divider when there are 2 children (details + image)
    &:has(> :nth-child(2))::before {
        @media (min-width: 769px) {
            display: block;
        }
    }
}

.mepr-details,
.wp-block-memberpress-thank-you-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;

    @media (max-width: 768px) {
        margin: 0 auto;
        text-align: center;
    }

    // Center the heading by default. Saved blocks predating the template's
    // textAlign:center can lack has-text-align-center; the :not() guards let a
    // user-chosen left/right alignment still win.
    .wp-block-heading:not(.has-text-align-left):not(.has-text-align-right) {
        text-align: center;
    }
}

.mepr-thank-you-order-value {
    margin-bottom: 0.5rem;
}

.mepr-val-amount {
    font-weight: bold;
}

.mepr-image,
.wp-block-memberpress-image,
.wp-block-memberpress-thank-you-image {
    flex: 1;
    min-width: 0;
    margin: 0 !important;
    // border-left: 1px solid rgba(0, 0, 0, 0.1);
    // padding-left: 40px;
    align-self: stretch;

    @media (max-width: 768px) {
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        padding-left: 0;
        padding-top: 40px;
        align-self: auto;
    }

    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
}

.mepr-order-no {
    margin: 1rem 0;
    > * {
        margin: 0 !important;
        color: rgba(0, 0, 0, 0.56);
    }
}

.mepr-val-amount, .invoice-amount {
    font-size: 1.6em;
    font-weight: normal;
    margin-top: 0;
    line-height: 1;
}