/* GALLERY TILE OVERFLOW (js/panel/47i-gallery-tile-overflow.js). Simon, 16 Nov 2026, 08:30: on a really small tile the
   hover buttons crowd the picture, so a few stay and the rest go behind a "More" button.

   Every rule here is keyed on .gto-compact (set only on a tile whose buttons no longer fit) or on the More button and
   its menu, so a tile at a normal size draws exactly as 22-width-ruler.css draws it. */

/* the More button: a .gact like its neighbours (same size, scrim and hover), white, always last in the pink row */
.gact.gto-more { display: none; }   /* GALLERY TILE OVERFLOW */
.gal-item.gto-compact .gal-actions .gact.gto-more { display: flex; order: 50; color: #fff; }   /* GALLERY TILE OVERFLOW */
.gal-item.gto-compact .gal-actions .gact.gto-more svg { width: 62%; height: 62%; }   /* GALLERY TILE OVERFLOW */
.gal-item.gto-compact .gal-actions .gact.gto-more[aria-expanded="true"] { background: var(--accent); color: #fff; }   /* GALLERY TILE OVERFLOW */
/* what went behind it */
.gal-item.gto-compact:not(.gto-measure) .gact.gto-hid { display: none !important; }   /* GALLERY TILE OVERFLOW */
/* one row each, never a wrap, on a cramped tile */
.gal-item.gto-compact:not(.gto-measure) .gal-actions, .gal-item.gto-compact:not(.gto-measure) .gal-actions-w { flex-wrap: nowrap; }   /* GALLERY TILE OVERFLOW */
/* the instant the tile is re-measured (inside one frame, never painted): the row as built, More lifted out of the flow
   rather than hidden so a More with the keyboard focus keeps it */
.gal-item.gto-measure .gal-actions .gact.gto-more { position: absolute; top: 0; right: 0; }   /* GALLERY TILE OVERFLOW */
/* the buttons stay up while the menu is open (the pointer has left the tile for the menu), and when More has the
   keyboard focus (they are hover-only otherwise) */
.gal-item.gto-open .gal-actions, .gal-item.gto-open .gal-actions-w,
.gal-item.gto-compact:focus-within .gal-actions, .gal-item.gto-compact:focus-within .gal-actions-w { opacity: 1; pointer-events: auto; }   /* GALLERY TILE OVERFLOW */
.gal-item.gto-open { border-color: var(--accent); }   /* GALLERY TILE OVERFLOW: the tile the menu belongs to */
.gact.gto-more:focus-visible, .gto-menu .gto-item:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }   /* GALLERY TILE OVERFLOW */

/* the menu: the gallery's right-click menu (.gal-ctx, 27-gallery-chrome.css), a row per hidden action, icon + label */
.gal-ctx.gto-menu { min-width: 150px; max-width: min(260px, calc(100vw - 8px)); overflow-y: auto; }   /* GALLERY TILE OVERFLOW */
.gal-ctx.gto-menu .gto-item { display: flex; align-items: center; gap: 8px; white-space: nowrap; }   /* GALLERY TILE OVERFLOW */
.gal-ctx.gto-menu .gto-lbl { overflow: hidden; text-overflow: ellipsis; min-width: 0; }   /* GALLERY TILE OVERFLOW */
.gal-ctx.gto-menu .gal-ctx-ico { align-items: center; justify-content: center; font-size: 11px; line-height: 1; color: #fff; }   /* GALLERY TILE OVERFLOW */
.gal-ctx.gto-menu .gal-ctx-ico .gact-4k { font-size: 8.5px; font-weight: 700; letter-spacing: -.2px; }   /* GALLERY TILE OVERFLOW */
.gal-ctx.gto-menu .gto-item.edit .gal-ctx-ico { color: var(--accent); }   /* GALLERY TILE OVERFLOW: pink actions keep their pink */
.gal-ctx.gto-menu .gto-item.on .gal-ctx-ico { color: #ffc266; }   /* GALLERY TILE OVERFLOW: a lit pin / favourite / toggle */
.gal-ctx.gto-menu .gto-item:hover .gal-ctx-ico, .gal-ctx.gto-menu .gto-item:focus-visible .gal-ctx-ico { color: #fff; }   /* GALLERY TILE OVERFLOW */
.gal-ctx.gto-menu .gto-item:focus-visible { background: var(--accent); color: #fff; outline: none; }   /* GALLERY TILE OVERFLOW */
.gal-ctx.gto-menu .gto-item.danger:hover, .gal-ctx.gto-menu .gto-item.danger:focus-visible { background: var(--red); }   /* GALLERY TILE OVERFLOW */
.gal-ctx.gto-menu .gto-item[disabled] { opacity: .45; cursor: default; }   /* GALLERY TILE OVERFLOW */
.gal-ctx.gto-menu .gto-item[disabled]:hover { background: none; color: var(--text); }   /* GALLERY TILE OVERFLOW */
.gal-ctx.gto-menu .gto-sep { height: 1px; margin: 3px 2px; background: var(--border); }   /* GALLERY TILE OVERFLOW */
