/* 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;
}

/* 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;
} */

/* 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;
}