/* Art Mini-Map — in-flow under Tools / Asset Library (side nav) */

.art-minimap-mount{
  position:sticky;
  top:12px;
  z-index:6;
  display:block;
  width:100%;
  max-width:100%;
  margin:8px 0 0;
  padding:0;
  overflow:hidden;
  flex:0 0 auto;
  box-sizing:border-box;
  /* Keep a solid backdrop while stuck over scrolled nav */
  background:#fbfbff;
}
.art-minimap-mount:has(.amm-mini.hidden),
.art-minimap-mount:empty{
  display:none;
}

.amm-mini{
  position:static;
  display:block;
  z-index:auto;
  width:100%;
  max-width:100%;
  padding:0;
  margin:0;
  border:1px solid var(--line, #e9ebf3);
  border-radius:12px;
  background:#fff;
  box-shadow:0 1px 2px rgba(20,24,60,.04);
  cursor:zoom-in;
  text-align:left;
  font:inherit;
  color:inherit;
  overflow:hidden;
  box-sizing:border-box;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.amm-mini:hover{
  border-color:var(--accent, #3b5bff);
  box-shadow:0 0 0 3px rgba(59,91,255,.10);
}
.amm-mini:focus{
  outline:none;
  border-color:var(--accent, #3b5bff);
  box-shadow:0 0 0 3px rgba(59,91,255,.16);
}
.amm-mini.hidden{display:none !important}

.amm-mini-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:7px 10px;
  border-bottom:1px solid var(--line, #e9ebf3);
  background:#f8f9fd;
  font-size:11px;
  font-weight:700;
  letter-spacing:.02em;
  color:#41485a;
}
.amm-mini-expand{
  font-size:13px;
  color:var(--muted, #737b8c);
  font-weight:600;
}

.amm-mini-body{
  padding:8px;
  overflow:hidden;
  background:#fff;
  box-sizing:border-box;
  max-width:100%;
}
.amm-mini-clip{
  position:relative;
  overflow:hidden;
  max-width:100%;
}
.amm-mini-clip .amm-canvas{
  transform-origin:top left;
  will-change:transform;
}

.amm-diagram{position:relative;display:block;max-width:100%}
.amm-canvas{position:relative;display:block}
.amm-arrows{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  pointer-events:none;
  overflow:visible;
}
.amm-edge{
  stroke:#1f2430;
  stroke-width:1.4;
  stroke-linecap:round;
  fill:none;
  opacity:.78;
}
.amm-edge--dashed{
  stroke-dasharray:4 3;
  opacity:.55;
}
.amm-diagram--mini .amm-edge{stroke-width:1.1}
.amm-diagram--full .amm-edge{stroke-width:1.8}
.amm-diagram--full .amm-edge--dashed{stroke-dasharray:6 4}

.amm-slot{
  position:absolute;
  border-radius:8px;
  border:1px solid var(--line, #e9ebf3);
  background:repeating-linear-gradient(45deg,#f6f7fc,#f6f7fc 4px,#f1f2fb 4px,#f1f2fb 8px);
  overflow:hidden;
  box-sizing:border-box;
}
.amm-slot--source{
  border-color:#c4b5fd;
  box-shadow:0 0 0 1px rgba(124,58,237,.12);
}
.amm-slot--filled{
  background:#fff;
  border-color:var(--ok, #16a34a);
}
.amm-slot--clickable{cursor:pointer}
.amm-slot--clickable:hover{
  border-color:var(--accent, #3b5bff);
  box-shadow:0 0 0 3px rgba(59,91,255,.14);
}

.amm-thumb{
  position:relative;
  width:100%;
  height:100%;
  overflow:hidden;
}
.amm-thumb img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  padding:2px;
  box-sizing:border-box;
}
.amm-ph{
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  color:#c5cad8;
  font-weight:300;
  font-size:12px;
  line-height:1;
}
.amm-diagram--full .amm-ph{font-size:22px}

.amm-group-label{
  position:absolute;
  font-size:11px;
  font-weight:700;
  color:#41485a;
  white-space:nowrap;
  pointer-events:none;
  max-width:280px;
  overflow:hidden;
  text-overflow:ellipsis;
}

/* Fullscreen overlay */
.amm-overlay{
  position:fixed;
  inset:0;
  z-index:1200;
  display:flex;
  align-items:stretch;
  justify-content:center;
  padding:24px;
}
.amm-overlay.hidden{display:none !important}
.amm-overlay-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,18,28,.48);
  backdrop-filter:blur(2px);
}
.amm-overlay-panel{
  position:relative;
  z-index:1;
  width:min(1200px, 100%);
  max-height:100%;
  display:flex;
  flex-direction:column;
  background:#fff;
  border-radius:18px;
  box-shadow:0 24px 64px rgba(10,14,30,.28);
  overflow:hidden;
}
.amm-overlay-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border-bottom:1px solid var(--line, #e9ebf3);
  background:#f8f9fd;
  flex:0 0 auto;
}
.amm-overlay-head h3{
  margin:0;
  font-size:16px;
  font-weight:750;
  letter-spacing:-.01em;
}
.amm-overlay-sub{
  margin:4px 0 0;
  font-size:12.5px;
  color:var(--muted, #737b8c);
}
.amm-overlay-close{
  width:36px;
  height:36px;
  border:0;
  border-radius:10px;
  background:transparent;
  font-size:22px;
  line-height:1;
  color:#5b6475;
  cursor:pointer;
}
.amm-overlay-close:hover{background:#eef0fb;color:#171b27}
.amm-overlay-body{
  flex:1 1 auto;
  overflow:auto;
  padding:20px 22px 28px;
  background:#fff;
}

body.amm-overlay-open{overflow:hidden}

#stage-art.art-autofill-busy .amm-mini{
  pointer-events:none;
  opacity:.55;
}

@media (max-width:900px){
  .amm-overlay{padding:10px}
  .amm-overlay-panel{border-radius:14px}
}
