/* InstaPay enrolment: payment card and review page. Logical properties keep it right in RTL and LTR. */

.enrol-instapay {
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, .08);
    max-width: 46rem;
}

.enrol-instapay-amount {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bs-primary, #0f6cbf);
    background: rgba(15, 108, 191, .08);
    border-radius: .75rem;
    padding: .35rem .9rem;
    white-space: nowrap;
}

.enrol-instapay-steps {
    counter-reset: none;
}

.enrol-instapay-step {
    display: flex;
    gap: .9rem;
    padding-block: 1rem;
    border-block-start: 1px dashed rgba(0, 0, 0, .12);
}

.enrol-instapay-step:first-child {
    border-block-start: 0;
    padding-block-start: 0;
}

.enrol-instapay-num {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    background: var(--bs-primary, #0f6cbf);
}

.enrol-instapay-stepbody {
    flex: 1 1 auto;
    min-width: 0;
}

.enrol-instapay-handle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.enrol-instapay-handle code {
    font-size: .95rem;
    padding: .2rem .5rem;
    border-radius: .4rem;
    background: rgba(0, 0, 0, .05);
    color: inherit;
    unicode-bidi: isolate;
}

.enrol-instapay-paybtn .icon {
    margin-inline-start: .25rem;
    margin-inline-end: 0;
}

/* The upload form sits inside the card: stack labels above fields. */
.enrol-instapay-formwrap .mform .form-group.row,
.enrol-instapay-formwrap .mform .fitem {
    display: block;
    margin-inline: 0;
}

.enrol-instapay-formwrap .mform .col-md-3,
.enrol-instapay-formwrap .mform .col-md-9 {
    max-width: 100%;
    width: 100%;
    flex: 0 0 100%;
    padding-inline: 0;
}

.enrol-instapay-formwrap .mform .col-form-label {
    padding-block-end: .25rem;
}

.enrol-instapay-badge {
    flex: 0 0 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 173, 78, .18);
}

.enrol-instapay-badge .icon {
    margin: 0;
}

.enrol-instapay-facts > div {
    display: flex;
    gap: .75rem;
    padding-block: .25rem;
}

.enrol-instapay-facts dt {
    flex: 0 0 8rem;
    font-weight: 600;
}

.enrol-instapay-facts dd {
    margin: 0;
    min-width: 0;
}

/* Review page. */
.enrol-instapay-thumb {
    display: inline-block;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: .5rem;
    border: 1px solid rgba(0, 0, 0, .12);
}

.enrol-instapay-table td {
    vertical-align: middle;
}

.enrol-instapay-table .enrol-instapay-actions {
    min-width: 15rem;
}

.enrol-instapay-rejectform {
    display: flex;
    gap: .35rem;
    margin-block-start: .5rem;
}

.enrol-instapay-rejectform input[type="text"] {
    min-width: 8rem;
}

@media (max-width: 575.98px) {
    .enrol-instapay-facts dt {
        flex-basis: 6rem;
    }
    .enrol-instapay-amount {
        font-size: 1.25rem;
    }
}

/* The receipt upload. The browser's own file control writes its own English text and sizes itself by the
   file name, which pushed the card sideways on a phone; JS swaps it for a button that speaks our language,
   and the input stays usable on its own when JS does not run. */
.enrol-instapay-file {
    max-width: 100%;
}

.enrol-instapay-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
}

.enrol-instapay-upload .enrol-instapay-file {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.enrol-instapay-choose {
    min-height: 44px;
}

.enrol-instapay-filename {
    min-width: 0;
    flex: 1 1 8rem;
    overflow-wrap: anywhere;
}

/* an offer: what you pay, and beside it what it normally costs */
.enrol-instapay-was {
    margin-inline-start: .5rem;
    font-size: .8em;
    font-weight: 400;
    opacity: .7;
    text-decoration-thickness: 2px;
}
