/* jQuery UI appends the dropdown to body, so scope by both classes it always has */
ul.ui-autocomplete.ui-widget-content {
    position: absolute !important;
    z-index: 9999 !important;
    max-height: 220px !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 6px 0;
    list-style: none;
    font-family: inherit;
    font-size: 1.5rem;
}
ul.ui-autocomplete.ui-widget-content .ui-menu-item-wrapper {
    padding: 10px 16px;
    color: #1a1a1a;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
ul.ui-autocomplete.ui-widget-content .ui-menu-item-wrapper.ui-state-active,
ul.ui-autocomplete.ui-widget-content .ui-menu-item-wrapper:hover {
    background: #f0f5f0;
    color: #004712;
    outline: none;
    border: none;
    margin: 0;
}
/* Error message spans — hidden by default, revealed when sibling has .msf-error */
.hero-rfi-field .msf-error-msg,
.hero-rfi-field-row .msf-error-msg {
    display: none;
    color: #c0392b;
    font-size: 1.2rem;
    margin-top: 4px;
}
.hero-rfi-field:has(.msf-error) .msf-error-msg,
.hero-rfi-field-row:has(.msf-error) .msf-error-msg {
    display: block;
}
.hero-rfi-input.msf-error,
.hero-rfi-select.msf-error {
    border-color: #c0392b !important;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.15) !important;
}
/* Submit button loading state */
.hero-rfi-submit-spinner {
    display: none;
    margin-right: 8px;
    vertical-align: -2px;
}
.hero-rfi-submit.is-loading {
    cursor: not-allowed;
    opacity: 0.85;
}
.hero-rfi-submit.is-loading .hero-rfi-submit-spinner {
    display: inline-block;
}
/* sr-only: Bootstrap 5 dropped this alias — define it locally so the autocomplete label is hidden */
#request-info-form .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* The label targets the hidden <select>; the text input placeholder already says "Corporate Employer" */
#CorporateEmployerDiv > label[for="CorporateEmployer"] {
    display: none;
}
/* Employer fieldset — grid layout, white text to match dark form background */
#CorporateEmployerDiv {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    border: 0;
    padding: 0;
    margin: 0;
    min-width: 0;
}
#CorporateEmployerDiv > legend {
    display: block;
    width: 100%;
    padding: 0;
    margin-bottom: 0.4rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}
/* Employer intro / helpful text */
#CorporateEmployerDiv p {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-bottom: 0;
}
/* Autocomplete input fills the column */
#CorporateEmployerAutoComplete {
    width: 100%;
    box-sizing: border-box;
}
/* ── Two-column grid for active step panels ── */
#request-info-form .msf-panel.active {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 2rem;
    row-gap: 1rem;
    align-items: start;
}
#request-info-form .msf-panel.active > p,
#request-info-form .msf-panel.active > fieldset,
#request-info-form .msf-panel.active > button,
#request-info-form .msf-panel.active > .hero-rfi-field-row,
#request-info-form .msf-panel.active > #CorporateEmployerDiv,
#request-info-form .msf-panel.active > .msf-nav,
#request-info-form .msf-panel.active > .hero-rfi-disclaimer {
    grid-column: span 2;
}
/* SMS checkbox sits in col 2 of the email/phone row, directly beneath the phone field */
.hero-rfi-field-row > .hero-rfi-sms-check {
    grid-column: 2;
    padding-top: 4px;
    align-self: start;
}
@media (max-width: 575px) {
    #request-info-form .msf-panel.active {
        grid-template-columns: 1fr;
    }
    #request-info-form .msf-panel.active > p,
    #request-info-form .msf-panel.active > fieldset,
    #request-info-form .msf-panel.active > button,
    #request-info-form .msf-panel.active > .hero-rfi-field-row,
    #request-info-form .msf-panel.active > #CorporateEmployerDiv,
    #request-info-form .msf-panel.active > .msf-nav,
    #request-info-form .msf-panel.active > .hero-rfi-disclaimer {
        grid-column: span 1;
    }
    .hero-rfi-field-row > .hero-rfi-sms-check {
        grid-column: 1;
    }
}
