
/* oMATIC Minds v0.6.8.46 Image Studio composer follows sidebar state.
   Loaded last. Fixes collapsed-sidebar composer alignment by centering it in the
   remaining workspace after the icon rail, not inside a tiny lane starting at the rail. */

@media (min-width: 641px) {
  /* Sidebar collapsed/icon rail: center composer in the usable workspace area. */
  body.om-image-studio-route.om-chat-sidebar-collapsed .om-image-studio-composer-shell,
  body.om-image-studio-route.om-chat-sidebar-collapsed.om-image-composer-collapsed .om-image-studio-composer-shell,
  body.om-image-studio-route.om-chat-sidebar-collapsed .om-image-studio-composer-shell.is-collapsed {
    --om-image-collapsed-rail-width: 54px;
    --om-image-composer-edge-gap: 44px;
    position: fixed !important;
    left: calc(var(--om-image-collapsed-rail-width, 54px) + ((100vw - var(--om-image-collapsed-rail-width, 54px)) / 2)) !important;
    right: auto !important;
    bottom: 22px !important;
    transform: translateX(-50%) !important;
    width: min(900px, calc(100vw - var(--om-image-collapsed-rail-width, 54px) - var(--om-image-composer-edge-gap, 44px))) !important;
    max-width: min(900px, calc(100vw - var(--om-image-collapsed-rail-width, 54px) - var(--om-image-composer-edge-gap, 44px))) !important;
    min-width: 0 !important;
  }

  /* Keep generated content lane centered in the same remaining workspace area. */
  body.om-image-studio-route.om-chat-sidebar-collapsed .om-image-studio-messages > .om-image-generation-grid,
  body.om-image-studio-route.om-chat-sidebar-collapsed.om-chat-shell-route .om-chat-messages > .om-image-generation-grid {
    width: min(900px, calc(100vw - 54px - 44px)) !important;
    max-width: min(900px, calc(100vw - 54px - 44px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Sidebar open/full: center composer in the workspace after the 312px sidebar. */
  body.om-image-studio-route:not(.om-chat-sidebar-collapsed) .om-image-studio-composer-shell,
  body.om-image-studio-route:not(.om-chat-sidebar-collapsed).om-image-composer-collapsed .om-image-studio-composer-shell,
  body.om-image-studio-route:not(.om-chat-sidebar-collapsed) .om-image-studio-composer-shell.is-collapsed {
    --om-image-open-sidebar-width: 312px;
    --om-image-composer-edge-gap: 44px;
    position: fixed !important;
    left: calc(var(--om-image-open-sidebar-width, 312px) + ((100vw - var(--om-image-open-sidebar-width, 312px)) / 2)) !important;
    right: auto !important;
    bottom: 22px !important;
    transform: translateX(-50%) !important;
    width: min(900px, calc(100vw - var(--om-image-open-sidebar-width, 312px) - var(--om-image-composer-edge-gap, 44px))) !important;
    max-width: min(900px, calc(100vw - var(--om-image-open-sidebar-width, 312px) - var(--om-image-composer-edge-gap, 44px))) !important;
    min-width: 0 !important;
  }
}
