
/* oMATIC Minds v0.6.8.37 phone-only composer tray + sticky mobile menu close. */

/* Tablet and desktop: absolutely no mobile pull-down tray or collapsed composer state. */
@media (min-width: 641px) {
  .om-image-composer-mobile-handle {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-studio-composer-shell,
  body.om-image-studio-route .om-image-studio-composer-shell.is-collapsed {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-studio-composer-shell #om-image-studio-generate-form,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-studio-composer-shell .om-image-live-confirm-row,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-studio-composer-shell .om-image-generation-submit-status,
  body.om-image-studio-route .om-image-studio-composer-shell.is-collapsed #om-image-studio-generate-form,
  body.om-image-studio-route .om-image-studio-composer-shell.is-collapsed .om-image-live-confirm-row,
  body.om-image-studio-route .om-image-studio-composer-shell.is-collapsed .om-image-generation-submit-status {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card,
  body.om-image-studio-route .om-image-generation-card {
    transform: none !important;
  }
}

/* Phone only: use the pull-down tray and lift image/action area above it. */
@media (max-width: 640px) {
  body.om-image-studio-route .om-image-composer-mobile-handle {
    display: flex !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-studio-composer-shell {
    height: 54px !important;
    max-height: 54px !important;
    min-height: 54px !important;
    padding: 6px 9px !important;
    overflow: visible !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-studio-composer-shell #om-image-studio-generate-form,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-studio-composer-shell .om-image-live-confirm-row,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-studio-composer-shell .om-image-generation-submit-status {
    display: none !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-composer-mobile-handle {
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 4px 10px !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-studio-messages {
    padding-bottom: 56px !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-grid {
    padding-bottom: 48px !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card {
    transform: translateY(-150px) !important;
    margin-bottom: -120px !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card .om-image-generation-actions,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card .om-image-actions,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card .om-image-card-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: stretch !important;
  }

  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card .om-image-generation-actions a,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card .om-image-generation-actions button,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card .om-image-actions a,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card .om-image-actions button,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card .om-image-card-actions a,
  body.om-image-composer-collapsed.om-image-studio-route .om-image-generation-card .om-image-card-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
  }
}

/* Clean mobile menu drawer: keep the close X/header stuck to the drawer top while scrolling. */
@media (max-width: 820px) {
  .om-clean-mobile-menu-header {
    position: sticky !important;
    top: calc(-1 * env(safe-area-inset-top, 0px)) !important;
    z-index: 2147482700 !important;
    margin: calc(-16px - env(safe-area-inset-top, 0px)) -16px 0 calc(-18px - env(safe-area-inset-left, 0px)) !important;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 12px calc(18px + env(safe-area-inset-left, 0px)) !important;
    background: rgba(8,9,13,.995) !important;
    backdrop-filter: blur(8px) !important;
    border-bottom: 1px solid rgba(255,255,255,.13) !important;
  }

  .om-clean-mobile-menu-close {
    position: relative !important;
    z-index: 2147482701 !important;
    flex: 0 0 44px !important;
  }
}
