/* Give the form the chat area while the visitor is entering consultation details. */
@media (max-width: 767px), (max-width: 1024px) and (pointer: coarse) {
    :is(#lk-guide, #conversation)[open]:has(.inline-intake-form:is(:focus-within, [data-mobile-editing])) {
        grid-template-rows: auto minmax(0, 1fr) !important;
    }
    :is(#lk-guide, #conversation)[open]:has(.inline-intake-form:is(:focus-within, [data-mobile-editing]))
        > :is(.composer, .chat-compose, .guide-foot) {
        display: none !important;
    }
    :is(#lk-guide, #conversation)[open] :is(.thread, .chat-thread) {
        scroll-padding-block: 12px max(12px, env(safe-area-inset-bottom));
    }
    :is(#lk-guide, #conversation) .inline-intake-form :is(input, select, button) {
        scroll-margin-block: 5px;
    }
}

/* Once the validated form has been sent, its status replaces the entry controls.
   An error changes the live region to an alert, restoring the original fields. */
:is(#consult-popup form, #lk-guide .inline-intake-form, #conversation .inline-intake-form):has(> .intake-status[role="status"]):has(button[aria-busy="true"]) > :not(.intake-status) {
    display: none !important;
}
:is(#consult-popup form, #lk-guide .inline-intake-form, #conversation .inline-intake-form):has(button[aria-busy="true"]) > .intake-status[role="status"] {
    margin: 0;
    padding: 1.25rem 0;
    font-size: clamp(1.25rem, 4.5vw, 1.5rem);
    font-weight: 700;
    line-height: 1.45;
    color: #272126;
}
