/* The assistant launcher is the robot artwork, so keep its surface clear. */
@layer equipdesk-action-buttons {
  #ed-ai .ed-ai-launch {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: drop-shadow(0 4px 3px #42546c40) !important;
    translate: none;
  }
}

@media screen and (max-width: 999px) {
  body.ui-factory .repair-tabs {
    display: none;
  }

  body.ui-app details.ui-navigation {
    --ed-drawer-width: min(76vw, 300px);
    --ed-drawer-tab-width: 44px;
  }

  body.ui-app details.ui-navigation > summary {
    position: fixed;
    top: 27%;
    right: 0;
    z-index: 8;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 7px;
    width: var(--ed-drawer-tab-width);
    min-height: 105px;
    box-sizing: border-box;
    padding: 8px 0;
    border: 1px solid #8caecc;
    border-right: 0;
    border-radius: 14px 0 0 14px;
    background: linear-gradient(105deg, #eaf4ff, #c4d9ee);
    color: #102340;
    box-shadow: -3px 3px 10px #27476c38;
  }

  body.ui-app details.ui-navigation > summary::marker {
    content: "";
  }

  body.ui-app details.ui-navigation > summary::-webkit-details-marker {
    display: none;
  }

  body.ui-app details.ui-navigation > summary .ed-drawer-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font: 700 13px "Segoe UI", Arial, sans-serif;
  }

  body.ui-app details.ui-navigation > summary .ed-drawer-arrow {
    display: block;
    font: 700 20px/1 "Segoe UI", Arial, sans-serif;
  }

  body.ui-app details.ui-navigation[open] > summary {
    right: var(--ed-drawer-width);
  }

  body.ui-app details.ui-navigation[open] > summary .ed-drawer-arrow {
    transform: rotate(180deg);
  }

  body.ui-app details.ui-navigation[open]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 5;
    background: #152d5155;
    pointer-events: none;
  }

  body.ui-app details.ui-navigation[open] > nav {
    top: 80px;
    right: 0;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: auto;
    width: var(--ed-drawer-width);
    max-height: none !important;
    border-radius: 18px 0 0 18px;
    z-index: 7;
  }

  @media (prefers-reduced-motion: no-preference) {
    body.ui-app details.ui-navigation[open] > nav {
      animation: ed-workspace-drawer-enter 180ms ease-out;
    }

    @keyframes ed-workspace-drawer-enter {
      from { transform: translateX(100%); }
      to { transform: translateX(0); }
    }
  }
}

.factory-work-actions {
  margin-block: 12px 16px;
}

/* Match the warehouse backdrop across pages of different heights. The factory
   artwork fades to transparency, so it has no separate panel or bottom edge. */
@media screen {
  body.ui-app {
    background: #e7eef9;
  }

  body.ui-app .ui-header {
    background: #f2f6fd;
  }

  body.ui-app::before {
    background: transparent url('factory.png') right 43% / 760px auto no-repeat;
    mask-image: linear-gradient(to bottom, #000 38%, transparent 100%);
  }

  @supports (mask-composite: intersect) {
    body.ui-app::before {
      mask-image: linear-gradient(to right, transparent 0%, #000 38%),
                  linear-gradient(to bottom, #000 38%, transparent 100%);
      mask-composite: intersect;
    }
  }
}

@media screen and (max-width: 999px) {
  body.ui-app::before {
    background-size: min(620px, 125vw) auto;
  }
}
