/* No gap between Stripe tab and content (register or sign-up with saved cards) */
/* Parent is a wrapper only – no background; saved cards sit in here, style only the new-card input */
.dmem-stripe-card-element {
    padding-top: 0;
    margin-top: 0;
    background: none;
    background-color: transparent;
}

/* When saved cards are shown, no gap between tab and saved card list */
.dmem-stripe-card-element.dmem-saved-card-form > .et_pb_column:first-child,
.dmem-stripe-card-element.dmem-saved-card-form > .divi-membership-gateway-field:first-child {
    margin-top: 0;
    padding-top: 0;
    margin-bottom: 10px;
}

.dmem-stripe-card-element.dmem-saved-card-form .divi-membership-form-row:first-child {
    margin-top: 0;
}

/* When saved cards are shown, hide new-card form until "Add New Card" is selected. !important overrides inline display: block from other scripts. */
.dmem-stripe-card-element.dmem-saved-card-form .dmem-stripe-new-card-form.card-element:not(.dmem-show-new-card-form) {
    display: none !important;
}
.dmem-stripe-card-element.dmem-saved-card-form .dmem-stripe-new-card-form.card-element.dmem-show-new-card-form {
    display: block !important;
}

/* Loaded Stripe form – same as Form Builder D5 (.et_pb_contact .card-element) */
/* Apply card-field look only to the new-card input container, not the parent (saved cards stay unstyled) */
.et_pb_contact .card-element,
.et_pb_contact p.et_pb_contact_field .card-element,
.dmem-stripe-card-element .dmem-stripe-new-card-form.card-element {
    -webkit-appearance: none;
    background-color: #eee;
    width: 100%;
    border-width: 0;
    border-radius: 0;
    color: #999;
    font-size: 14px;
    padding: 16px;
    min-height: 50px;
    margin-bottom: 1em;
    float: left;
    width: 100%;
}

.et_pb_contact .card-element iframe,
.et_pb_contact p.et_pb_contact_field .card-element iframe,
.dmem-stripe-card-element .dmem-stripe-new-card-form.card-element iframe {
    width: 100% !important;
}

/* Ensure Stripe payment form is visible when gateway form is not hidden */
.stripe-gateway-form:not(.hide) #new-card-form {
    display: block !important;
    visibility: visible !important;
}

/* Override inline display:none when gateway is active */
.stripe-gateway-form:not(.hide) #new-card-form[style*="display: none"] {
    display: block !important;
}

/* Bank redirect return: block interaction while plan fields restore and the form auto-submits */
.dmem-stripe-return-loading {
    position: relative;
}

.dmem-stripe-return-overlay {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-sizing: border-box;
    padding: 16px;
    background: rgba(255, 255, 255, 0.92);
    cursor: wait;
}

.dmem-stripe-return-spinner {
    display: block;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 0, 0, 0.12);
    border-top-color: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    animation: dmem-stripe-spin 0.75s linear infinite;
}

@keyframes dmem-stripe-spin {
    to {
        transform: rotate(360deg);
    }
}

.dmem-stripe-return-msg {
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    text-align: center;
    max-width: 28em;
}

/* Override the hide class for Stripe gateway form when it's the only option */
.stripe-gateway-form.hide {
    display: block !important;
}
/* .divi-membership-gateway-field{
    -webkit-appearance: none;
    background-color: #eee;
    width: 100%;
    border-width: 0;
    border-radius: 0;
    color: #999;
    font-size: 14px;
    padding: 16px;
} */