/* Image-plan overlay, review builds only. Hard-coded colours so it reads the
   same over every palette. No transitions: nothing here animates. */
.imgplan-btn {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147483000;
  font: 600 13px/1 'Albert Sans', system-ui, sans-serif;
  padding: 10px 14px; border-radius: 999px; cursor: pointer;
  color: #fff; background: #0B1020; border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.imgplan-btn[aria-pressed="true"] { background: #D946EF; color: #0B1020; border-color: #0B1020; }
.imgplan-btn--reset { left: auto; right: 16px; background: #fff; color: #0B1020; border-color: #0B1020; }
.imgplan-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

#imgplan-layer {
  position: absolute; left: 0; top: 0; width: 100%; height: 0;
  z-index: 2147482000; pointer-events: none;
}
.imgplan-frame {
  position: absolute; box-sizing: border-box;
  outline: 2px dashed #D946EF; outline-offset: -2px;
  background: rgba(11,16,32,.45);
  display: flex; align-items: flex-start; padding: 8px;
}
.imgplan-frame--right { justify-content: flex-end; }
.imgplan-card {
  pointer-events: auto; overflow: auto;
  box-sizing: border-box; padding: 10px 12px 12px;
  background: rgba(11,16,32,.94); color: #fff;
  border: 1px solid rgba(255,255,255,.22); border-radius: 8px;
  font: 400 13px/1.45 'Albert Sans', system-ui, sans-serif;
  text-align: left; letter-spacing: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.imgplan-card p { margin: 0 0 6px; }
.imgplan-card p:last-child { margin-bottom: 0; }
.imgplan-card__head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 8px; }
.imgplan-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; color: #0B1020; background: #93C5FD;
}
.imgplan-card--new .imgplan-badge { background: #F0ABFC; }
.imgplan-card--rebuild .imgplan-badge { background: #86EFAC; }
.imgplan-file { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 12px; color: #C7D2FE; }
.imgplan-plan { font-size: 14px; font-weight: 500; }
.imgplan-why, .imgplan-now { color: #D1D5DB; font-size: 12.5px; }
.imgplan-why strong, .imgplan-now strong { color: #fff; font-weight: 600; }
.imgplan-meta { color: #9CA3AF; font-size: 11.5px; }
.imgplan-more { display: none; color: #F0ABFC; font-size: 11px; }
.imgplan-card { cursor: pointer; }

/* Alternate switcher: one button per generated candidate; the pick is
   labelled "Pick", the others "Alt n"; the one on screen is highlighted. */
.imgplan-alts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 6px; }
.imgplan-alts__label { color: #9CA3AF; font-size: 11.5px; }
.imgplan-alt {
  font: 600 12px/1 'Albert Sans', system-ui, sans-serif; cursor: pointer;
  padding: 6px 10px; border-radius: 999px;
  color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.35);
}
.imgplan-alt:hover { background: rgba(255,255,255,.16); }
.imgplan-alt--on { background: #D946EF; color: #0B1020; border-color: #D946EF; }
.imgplan-alt:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
html[data-imgplan-alts] .imgplan-btn { border-color: #D946EF; }

/* Compact cards on small targets: badge, file and the plan only, scrolling
   inside the frame. Expanded (clicked) cards show everything and sit above
   their neighbours. */
.imgplan-frame--small { overflow: visible; }
.imgplan-frame--small .imgplan-card:not(.imgplan-card--open) .imgplan-why,
.imgplan-frame--small .imgplan-card:not(.imgplan-card--open) .imgplan-now,
.imgplan-frame--small .imgplan-card:not(.imgplan-card--open) .imgplan-meta { display: none; }
.imgplan-frame--small .imgplan-card:not(.imgplan-card--open) .imgplan-alts { margin: 4px 0; }
.imgplan-frame--small .imgplan-card:not(.imgplan-card--open) .imgplan-more { display: block; }
.imgplan-frame--small .imgplan-card:not(.imgplan-card--open) .imgplan-plan { font-size: 13px; }
.imgplan-card--open { position: relative; z-index: 2; overflow: visible; box-shadow: 0 16px 40px rgba(0,0,0,.6); border-color: #F0ABFC; }

/* The module wall tiles slide on hover; hold them still while reviewing so
   the frames stay aligned. */
html[data-imgplan] .mod-tile, html[data-imgplan] .mod-tile img { transform: none !important; transition: none !important; }
