/* ACMS 1.15.399 — Frontend application workspace (staging).
   Only active on recognized portal pages with Application/Focus mode enabled.
   The website header, menus, footer and wp-admin are not selected here.
   Native layout adapts to content width, zoom and browser resizing. */
body.acms-app-workspace-page {
  --acms-page-gutter: clamp(10px, 1.4vw, 24px);
}
@supports selector(:has(*)) {
  /* Widen ancestors of the real portal, including common classic and block-theme
     wrappers. We deliberately exclude site-header, navigation and footer. */
  body.acms-app-workspace-page :is(
    #content, .site-content, .site-content > .ast-container,
    .site-content > .container, .site-content > .wrap,
    .site-content > .site-container, .site-content > .content-area,
    .content-area, #primary, main#main, main.site-main,
    .site-main, .site-inner, .content-sidebar-wrap,
    .site-content .entry, .site-content article.page,
    .site-content .entry-content, .entry-content,
    .page-content, .wp-block-post-content,
    .wp-site-blocks > main, .wp-site-blocks > .wp-block-group,
    main .alignwide, main .is-layout-constrained
  ):has(.acms-member-dashboard, .acms-portal-shell) {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    box-sizing: border-box;
  }
  /* Make the outside page container expand while retaining narrow safe gutters. */
  body.acms-app-workspace-page :is(
    #content, .site-content, .site-main, .content-area, #primary,
    .site-content > .ast-container, .site-content > .container,
    .site-content > .wrap, .wp-site-blocks > main
  ):has(.acms-member-dashboard, .acms-portal-shell) {
    width: calc(100% - 2 * var(--acms-page-gutter)) !important;
    margin-inline: auto !important;
  }
}
/* Address the portal shell's original 1440px CSS ceiling directly without
   altering unrelated wrappers, modal windows or website navigation. */
body.acms-app-workspace-page .acms-portal-shell,
body.acms-app-workspace-page .acms-member-dashboard {
  width: 100% !important;
  max-width: var(--acms-rw-max, none) !important;
  min-width: 0;
  box-sizing: border-box;
}
body.acms-app-workspace-page :is(
  .acms-portal-main, .acms-portal-content,
  .acms-dash-unified, .acms-embedded-module
) {
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
}
/* Avoid touching the protected Support/Ticketing internal structure. */
body.acms-app-workspace-focus :is(.acms-member-dashboard, .acms-portal-shell) {
  margin-block: 8px;
}
@media(max-width:780px) {
  body.acms-app-workspace-page { --acms-page-gutter: 8px; }
}
