/* Keep the existing menu appearance while giving the inner grid the two columns. */
html body .rc-site #rc-add-new-panel.rc-add-menu {
  grid-template-columns: minmax(0, 1fr) !important;
  width: min(560px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100dvh - 100px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  box-sizing: border-box;
}
html body .rc-site #rc-add-new-panel .rc-add-new-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100%; min-width: 0;
}
html body .rc-site #rc-add-new-panel :is(.rc-add-column,.rc-add-category,a,.rc-add-unavailable) { min-width: 0; max-width: 100%; }
html body .rc-site #rc-add-new-panel :is(a,.rc-add-unavailable) { white-space: normal !important; word-break: normal !important; overflow-wrap: normal !important; }
html body .rc-site #rc-add-new-panel .rc-add-unavailable { display: flex; gap: 7px; padding: 6px; font-size: 12px; line-height: 1.35; }
html body .rc-site #rc-add-new-panel .rc-add-unavailable small { display: block; font-size: 11px; font-weight: 400; }
html body .rc-site #rc-add-new-panel .rc-add-unavailable:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
/* Scope layout corrections to native content forms; preserve controls and handlers. */
html body form.node-form :is(.form-item,.form-wrapper,.field--widget-string-textfield,.field--widget-link-default,fieldset,.fieldset__wrapper) {
  min-width: 0 !important; max-width: 100%; box-sizing: border-box;
}
html body form.node-form .form-item:not(.form-type-checkbox):not(.form-type-radio):not(.form-type--checkbox):not(.form-type--radio) > label {
  display: block !important; position: static !important; float: none !important;
  width: auto !important; max-width: 100% !important; min-width: 0 !important;
  white-space: normal !important; word-break: normal !important; overflow-wrap: normal !important;
  writing-mode: horizontal-tb !important; flex-shrink: 0;
}
html body form.node-form :is(input,select,textarea,button,.button) { box-sizing: border-box; max-width: 100% !important; }
html body form.node-form :is(input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):not([type=hidden]),select,textarea) { min-width: 0 !important; }
html body form.node-form :is(.form-actions,.rc-doi-actions) { flex-wrap: wrap !important; }
html body form.node-form .form-item-field-publication-source-link-0-value { display: block !important; width: 100%; }
html body form.node-form .form-item-field-publication-source-link-0-value input { display: block; width: 100%; }
html body form.node-form :is(.description,.form-item__description,[role=status]) { overflow-wrap: anywhere; min-width: 0; }
@media(max-width: 768px) {
  html body .rc-site #rc-add-new-panel.rc-add-menu { position: fixed !important; top: 72px !important; left: 12px !important; right: 12px !important; }
  html body .rc-site #rc-add-new-panel .rc-add-new-grid { grid-template-columns: minmax(0,1fr) !important; }
  html body form.node-form,
  html body form.node-form :is(.form-grid,.rc-event-create-section,.rc-project-grid,.rc-dataset-grid,.rc-eco-grid) { grid-template-columns: minmax(0,1fr) !important; }
  html body form.node-form > * { min-width: 0 !important; max-width: 100%; grid-column: 1 / -1 !important; }
  html body form.node-form .form-item:not(.form-type-checkbox):not(.form-type-radio):not(.form-type--checkbox):not(.form-type--radio) { width: 100% !important; }
  html body form.node-form .form-actions :is(button,input,.button) { white-space: normal !important; height: auto; }
  html body .rc-create-form-shell { min-width: 0; max-width: 100%; box-sizing: border-box; }
}
/* Reset explicit column placement as well as column count at the same breakpoint. */
@media(max-width: 768px) {
  html body .rc-create-form-shell form.node-form:not(#ph-unused-form) { grid-template-columns: minmax(0,1fr) !important; }
  html body .rc-create-form-shell form.node-form:not(#ph-unused-form) > * { grid-column: 1 / -1 !important; }
  html body .rc-site .rc-topbar .rc-add-dropdown:not(#ph-unused-menu) { display: flex !important; flex: 0 0 auto; }
}
@media(max-width: 480px) {
  html body .rc-site .rc-topbar .rc-add-new { width: 40px !important; min-width: 40px !important; padding: 8px !important; }
  html body .rc-site .rc-topbar .rc-add-new > span { display: none !important; }
}
