/* Native fieldset/legend layout does not place legend in the CSS grid.
   The old two-column grid stranded the entire form body in its 150px track. */
body.portal-app-body .portal-ticket-v10-create-form .portal-ticket-v10-form-section {
    display: block;
    min-inline-size: 0;
}
body.portal-app-body .portal-ticket-v10-create-form .portal-ticket-v10-form-section > legend {
    float: left;
    width: 100%;
    margin: 0 0 20px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 4px 12px;
}
body.portal-app-body .portal-ticket-v10-create-form .portal-ticket-v10-form-section > legend small { grid-column: 2; }
body.portal-app-body .portal-ticket-v10-create-form .portal-ticket-v10-form-section__body {
    clear: both;
    width: 100%;
    min-width: 0;
}
body.portal-app-body .portal-ticket-v10-create-form :is(input, select, textarea, .portal-ticket-editor, .portal-ticket-v10-upload-zone) {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
}
body.portal-app-body .portal-ticket-v10-create-form :is(input:not([type=checkbox]):not([type=radio]), select, textarea) { width: 100%; }
body.portal-app-body #portal-sidebar-scroll.portal-sidebar__content {
    overflow-y: auto;
    scrollbar-width: auto !important;
    scrollbar-gutter: stable;
    scrollbar-color: var(--color-ink-faint, #85929e) var(--color-canvas-raised, #18212a);
}
body.portal-app-body .portal-sidebar__content::-webkit-scrollbar { display: block !important; width: 12px !important; }
body.portal-app-body .portal-sidebar__content::-webkit-scrollbar-track { background: var(--color-canvas-raised, #18212a); }
body.portal-app-body .portal-sidebar__content::-webkit-scrollbar-thumb {
    background: var(--color-ink-faint, #85929e);
    border: 3px solid var(--color-canvas-raised, #18212a);
    border-radius: 8px;
}
body.portal-app-body .portal-sidebar__scroll-hint {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 44px;
    width: 100%;
    padding: 10px 18px;
    border: 0;
    border-top: 1px solid var(--color-line);
    background: var(--color-canvas-raised);
    color: var(--color-ink);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
body.portal-app-body .portal-sidebar__scroll-hint[hidden] { display: none !important; }
body.portal-app-body .portal-sidebar__scroll-hint:hover { color: var(--color-accent-hover); }
body.portal-app-body :is(.portal-sidebar__scroll-hint, .portal-sidebar__content):focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: -3px;
}
@media (max-width: 560px) {
    body.portal-app-body .portal-ticket-v10-create-form .portal-form-grid { grid-template-columns: minmax(0, 1fr); }
}
