/* Keep the registration page independent from Bootstrap and admin CSS. */
.container {
    width: 100%;
    max-width: 1140px;
    margin-inline: auto;
    padding-inline: 12px;
}

.narrow {
    max-width: 800px;
}

.navbar {
    display: block;
}

.bg-white {
    background: #fff;
}

.border-bottom {
    border-bottom: 1px solid #dee2e6;
}

.py-2 {
    padding-block: .5rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mt-2 {
    margin-top: .75rem;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-inline: -.5rem;
}

.row > * {
    padding-inline: .5rem;
}

.g-3 {
    row-gap: 1rem;
}

.col-12,
.col-md-4,
.col-md-6,
.col-md-8 {
    width: 100%;
}

.text-muted {
    color: #6c757d;
}

.alert {
    position: relative;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: .375rem;
}

.alert-danger {
    color: #842029;
    background: #f8d7da;
    border-color: #f5c2c7;
}

.application-fee-notice {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    color: #123b63;
    background: #eaf5fc;
    border: 1px solid #c8e3f5;
    border-radius: .75rem;
}

.application-fee-notice span,
.form-hint {
    color: #60798a;
    font-size: .85rem;
}

.bank-details {
    margin: -0.5rem 0 1.5rem;
    padding: 1rem 1.25rem;
    color: #263238;
    background: #fffaf0;
    border: 1px solid #f0d9a6;
    border-radius: .75rem;
    line-height: 1.7;
}

.bank-details strong {
    display: block;
    margin-bottom: .25rem;
    color: #8a5a00;
}

.bank-details div:last-child {
    font-weight: 700;
    letter-spacing: .03em;
}

.form-hint {
    display: block;
    margin-top: .4rem;
}

.btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: .375rem;
    padding: .5rem 1rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn-lg {
    padding: .75rem 1rem;
    font-size: 1.25rem;
}

.btn-primary {
    color: #fff;
}

.w-100 {
    width: 100%;
}

@media (min-width: 768px) {
    .container {
        max-width: 960px;
    }

    .col-md-4 {
        width: 33.333333%;
    }

    .col-md-6 {
        width: 50%;
    }

    .col-md-8 {
        width: 66.666667%;
    }
}

@media (max-width: 575.98px) {
    .application-fee-notice {
        flex-direction: column;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 1140px;
    }
}

.container.narrow {
    max-width: 800px;
}

/* Keep the native select accessible while giving it a cleaner closed state. */
.form-card select[name="source"] {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 42px;
    color: #263238;
    cursor: pointer;
    background-color: #fff;
    background-image:
        linear-gradient(45deg, transparent 50%, #1769aa 50%),
        linear-gradient(135deg, #1769aa 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 12px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.form-card select[name="source"] option {
    color: #263238;
    background: #fff;
}

/* The validation script supplies the required marker for this field. */
.form-card label[for="application_fee_slip"] em {
    display: none;
}

.source-native,
.file-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.source-picker {
    position: relative;
    margin-top: .25rem;
}

.source-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding: .75rem 1rem;
    border: 1px solid #cfdee8;
    border-radius: 10px;
    background: #fff;
    color: #60798a;
    font: inherit;
    font-size: .95rem;
    box-sizing: border-box;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.source-trigger:hover,
.source-trigger:focus-visible,
.source-picker.is-open .source-trigger {
    border-color: #1769aa;
    box-shadow: 0 0 0 3px #1769aa1c;
    outline: none;
}

.source-trigger.has-value {
    color: #263238;
}

.source-trigger.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px #dc35451c;
}

.source-trigger-arrow {
    width: 9px;
    height: 9px;
    margin-left: .8rem;
    border-right: 2px solid #1769aa;
    border-bottom: 2px solid #1769aa;
    transform: rotate(45deg) translateY(-3px);
    transition: transform .18s ease;
}

.source-picker.is-open .source-trigger-arrow {
    transform: rotate(225deg) translate(-2px, -2px);
}

.source-options {
    position: absolute;
    z-index: 20;
    top: calc(100% + .45rem);
    right: 0;
    left: 0;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    padding: .35rem;
    border: 1px solid #d6e3eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(31, 71, 97, .16);
}

.source-picker.is-open .source-options {
    display: grid;
    gap: .2rem;
}

.source-option {
    display: block;
    width: 100%;
    padding: .7rem .8rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #42586a;
    font: inherit;
    font-size: .92rem;
    text-align: left;
    cursor: pointer;
}

.source-option:hover,
.source-option:focus-visible,
.source-option.is-selected {
    background: #eaf5fc;
    color: #123b63;
    outline: none;
}

.source-option.is-selected::after {
    float: right;
    color: #1769aa;
    content: '✓';
    font-weight: 700;
}

.file-picker {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 52px;
    padding: .45rem .55rem;
    border: 1px solid #cfdee8;
    border-radius: 10px;
    background: #fff;
}

.file-picker-button {
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    padding: .65rem .9rem;
    background: #1769aa;
    color: #fff;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
}

.file-picker-button:hover {
    background: #123b63;
}

.file-picker-name {
    min-width: 0;
    overflow: hidden;
    color: #60798a;
    font-size: .9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .source-options {
        max-height: 220px;
    }

    .file-picker {
        align-items: stretch;
        flex-direction: column;
    }

    .file-picker-button {
        width: 100%;
    }

    .file-picker-name {
        text-align: center;
    }
}
