.auth-form {
    padding: 20px 25px;
}

/* ── Floating label field ── */
.auth-field {
    position: relative;
    margin-bottom: 20px;
}
.auth-field label {
    display: block !important;
    font-size: 16px !important;
    font-weight: normal !important;
    color: #999 !important;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    transform: translateY(26px);
    transition: all 0.2s ease;
}
.auth-field input,
.auth-field select {
    display: block !important;
    width: 100% !important;
    height: 30px !important;
    border: none !important;
    border-bottom: 1px solid #999 !important;
    border-radius: 0 !important;
    padding: 4px 0 !important;
    font-size: 16px !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
}
.auth-field select {
    padding-right: 20px !important;
}

/* Focused: blue underline, label floats up */
.auth-field.is-focused input,
.auth-field.is-focused select {
    border-bottom: 2px solid #4a90d9 !important;
}
.auth-field.is-focused label {
    transform: translateY(0) !important;
    font-size: 12px !important;
    color: #4a90d9 !important;
}

/* Has value: label stays floated up */
.auth-field.has-value label {
    transform: translateY(0) !important;
    font-size: 12px !important;
    color: #999 !important;
}
.auth-field.is-focused.has-value label {
    color: #4a90d9 !important;
}

/* Error state */
.auth-field.has-error input,
.auth-field.has-error select {
    border-bottom: 2px solid #e3342f !important;
}
.auth-field.has-error label {
    transform: translateY(0) !important;
    font-size: 12px !important;
    color: #e3342f !important;
}
.auth-required {
    color: #e3342f;
    font-weight: bold;
}

/* ── Expiration date group ── */
.auth-exp-group {
    position: relative;
    margin-bottom: 20px;
}
.auth-exp-group label.auth-exp-label {
    display: block !important;
    font-size: 16px !important;
    font-weight: normal !important;
    color: #999 !important;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    transform: translateY(26px);
    transition: all 0.2s ease;
}
.auth-exp-group .auth-exp-inputs {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #999 !important;
    height: 30px;
}
.auth-exp-group input {
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    font-size: 16px !important;
    padding: 4px 0 !important;
    width: 35px;
    text-align: center;
    height: 26px !important;
}
.auth-exp-group .auth-exp-sep {
    font-size: 16px;
    color: #999;
    margin: 0 2px;
    visibility: hidden;
}
.auth-exp-group.is-active .auth-exp-sep {
    visibility: visible;
}

/* Label floats up when focused or has value */
.auth-exp-group.is-active label.auth-exp-label {
    transform: translateY(0) !important;
    font-size: 12px !important;
    color: #999 !important;
}
.auth-exp-group.is-focused label.auth-exp-label {
    transform: translateY(0) !important;
    font-size: 12px !important;
    color: #4a90d9 !important;
}
.auth-exp-group.is-focused .auth-exp-inputs {
    border-bottom: 2px solid #4a90d9 !important;
}
.auth-exp-group.has-error .auth-exp-inputs {
    border-bottom: 2px solid #e3342f !important;
}
.auth-exp-group.has-error label.auth-exp-label {
    transform: translateY(0) !important;
    font-size: 12px !important;
    color: #e3342f !important;
}

/* ── Billing Address title ── */
.auth-billing-title {
    font-size: 18px;
    font-weight: bold;
    margin: 8px 0 20px;
}

/* ── Buttons ── */
.auth-form .portal-bank__actions {
    margin-top: 20px;
}
.auth-form #authorize-payment-error {
    margin: 10px 0 15px;
}
.auth-form .form-group.mt-3 {
    margin-bottom: 20px !important;
}

/* ── Full-page loader overlay ── */
#auth-page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
#auth-page-loader .auth-page-loader__spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #ddd;
    border-top-color: #4a90d9;
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}
@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

/* ── Braintree Hosted Fields inside .auth-field (card number / expiration / CVV) ──
   These card inputs are Braintree iframes, not native inputs, so the iframe host is styled to match
   the .auth-field underline; the floating label is driven by Braintree field events in
   braintreeCardComponent.js. */
.auth-field .braintree-hosted-field {
    display: block;
    width: 100%;
    height: 30px;
    border: none !important;
    border-bottom: 1px solid #999 !important;
    border-radius: 0 !important;
    padding: 4px 0 !important;
    background: transparent !important;
}
.auth-field.is-focused .braintree-hosted-field {
    border-bottom: 2px solid #4a90d9 !important;
}
.auth-field.has-error .braintree-hosted-field {
    border-bottom: 2px solid #e3342f !important;
}

/* ── Two-column field pairing (no Bootstrap grid) ── */
.auth-field-pair {
    display: flex;
    gap: 16px;
}
.auth-field-pair > .auth-field {
    flex: 1;
    min-width: 0;
}
