/* THE IMAGE EDIT WINDOW (ui/ImageEditWindow.astro, kit-imgedit.js): its preview, its cut, its links, its two buttons.
   Tokens only. A phone: the links under the preview, the handles a finger's size. */
.g-imgedit { display: flex; flex-direction: column; gap: 14px; }   /* its links under its preview, every width (Maayan, 2026-11-23) */
.g-imgedit__stage { flex: 1; min-width: 0; display: grid; place-items: center; min-height: 240px; padding: 12px; border-radius: 10px; background: var(--g-surface-2, rgb(255 255 255 / .04)); overflow: hidden; }   /* the dimming stops at its edge */
.g-imgedit__pic { position: relative; touch-action: none; user-select: none; }
.g-imgedit__pic img { display: block; max-width: 100%; }
/* the cut: bright inside, the rest of the picture dimmed around it */
.g-imgedit__crop { position: absolute; box-sizing: border-box; border: 2px solid var(--g-gold, #e8b84a); box-shadow: 0 0 0 9999px rgb(0 0 0 / .55); cursor: move; }
.g-imgedit__h { position: absolute; width: 14px; height: 14px; margin: -7px; border: 2px solid var(--g-gold, #e8b84a); border-radius: 50%; background: var(--g-bg, #1b1b1b); }
.g-imgedit__h::after { content: ""; position: absolute; inset: -14px; }   /* a finger's room around each */
.g-imgedit__h[data-h="nw"] { left: 0; top: 0; cursor: nwse-resize; } .g-imgedit__h[data-h="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
.g-imgedit__h[data-h="ne"] { left: 100%; top: 0; cursor: nesw-resize; } .g-imgedit__h[data-h="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.g-imgedit__h[data-h="n"] { left: 50%; top: 0; cursor: ns-resize; } .g-imgedit__h[data-h="s"] { left: 50%; top: 100%; cursor: ns-resize; }
.g-imgedit__h[data-h="e"] { left: 100%; top: 50%; cursor: ew-resize; } .g-imgedit__h[data-h="w"] { left: 0; top: 50%; cursor: ew-resize; }
.g-imgedit__side { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.g-imgedit__side[hidden] { display: none; }
.g-imgedit__name { flex-basis: 100%; margin: 0; color: var(--g-text-2, inherit); font-size: 14px; overflow-wrap: anywhere; }
.g-imgedit__name:empty { display: none; }
.g-imgedit__do { display: flex; gap: 10px; margin-top: 18px; }
#gImgEdit .g-window__box { width: min(720px, calc(100vw - 32px)); }
@media (max-width: 600px) {
  .g-imgedit { flex-direction: column; }
  .g-imgedit__side { width: auto; flex-direction: row; flex-wrap: wrap; }
  .g-imgedit__name { flex-basis: 100%; }
  .g-imgedit__do > * { flex: 1; }
}
/* a picture shown cut (GM2ImageEdit.show): its frame the cut's shape, the picture moved and grown inside it */
.g-cut { display: block; overflow: hidden; position: relative; }
.g-cut > img { position: absolute; max-width: none; max-height: none; height: auto; object-fit: fill; }
