/* GALLERY HOVER NAME -- a gallery tile's name, on hover (js/panel/47k-gallery-hover-name.js).

   Simon, 19 Nov 2026, 08:41: "We need it so that, in the gallery, in a subtle way, we can see the names of the
   files (either uploaded image or video files, or the name of the generation) when we hover over it gallery"

   GALLERY HOVER NAME FILE -- Simon, 19 Nov 2026, 17:00: "In the gallery, it appears it isn't adding the name of the
   file. It's showing the prompt instead. We just want the name of the file. And it should be much more subtle than
   this smaller text." So: 9px regular, light grey at about two-thirds opacity, a soft text-shadow, and only a faint
   short shade right behind the line (was 11px / 500 / 90% white on a dark gradient down to the tile's bottom edge);
   a slower, gentler fade.

   One line of small text. The line sits just above the tile's bottom row of marks and its info strip (--ghn-b,
   measured on hover) and stops short of anything above it (--ghn-r). Absolutely placed, so the tile does not move;
   under every mark and button (painted before them, no z-index); never in the way of a click (pointer-events:
   none). It fades in once it has been placed (.ghn-on), so a tile with no room for it simply never shows it. */
.gal-item > .ghn {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 7px 8px var(--ghn-b, 31px);
  /* GALLERY HOVER NAME FILE: a short, faint shade behind the line only (7px above it, the line, 5px below) */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .16) 55%, rgba(0, 0, 0, 0) 100%) 0 0 / 100% 24px no-repeat;
  pointer-events: none;
  opacity: 0; transition: opacity .22s ease;   /* GALLERY HOVER NAME FILE: slower, gentler */
}
.gal-item:hover > .ghn.ghn-on { opacity: 1; }
.gal-item > .ghn .ghn-t {
  display: block; margin-right: var(--ghn-r, 0px);
  /* GALLERY HOVER NAME FILE: much quieter text */
  font-size: 9px; line-height: 12px; font-weight: 400; letter-spacing: .15px;
  color: rgba(228, 228, 228, .68); text-shadow: 0 0 3px rgba(0, 0, 0, .55), 0 1px 1px rgba(0, 0, 0, .45);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* A sound: along the top, beside its type badge and maker's mark (--ghn-l), clear of the waveform and play time. */
.gal-item > .ghn.ghn-top {
  top: 0; bottom: auto; padding: 9px 8px 14px var(--ghn-l, 36px);
  /* GALLERY HOVER NAME FILE: the same faint shade, behind the line only */
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, .16) 55%, rgba(0, 0, 0, 0) 100%) 0 2px / 100% 26px no-repeat;
}
/* Out of the way of a tile's progress line, and of a tile being renamed. */
.gal-item.gal-fpsing > .ghn, .gal-item.gal-retiming > .ghn, .gal-item.gal-reversing > .ghn,
.gal-item:has(> .g3d-build) > .ghn, .gal-item:has(.gal-hdbusy) > .ghn, .gal-item:has(.gname-edit) > .ghn { display: none; }

/* (GALLERY NAME CORNER) THE NAME, BOTTOM LEFT, QUIET, AND GONE ON HOVER. Simon, 22 Nov 2026, 07:39: "with the filename of
   an image or video in the gallery space: put it in the bottom left-hand corner and make it much more subtle. It should
   always be to the right of the icon that shows the AI model used, where applicable. When we hover over, make sure we
   hide it because the name is shown already when we hover over." So a picture's or a clip's name (.gname) is a line of
   small grey text -- no chip, no border -- on the tile's bottom edge: from the corner, or just right of the maker's mark
   (.gmodel; right of the crop mark too when there is one, and of a draft's "Draft 480p"), and it fades out while the
   tile is hovered, where the hover line (.ghn) says the name. A sound keeps its name along the top (30-gallery-states.css).
   RECORDED REVERSAL (24 Oct 2026): a chip under the type icon, top left. */
.gal-item:not(.gal-audio) > .gname {
  top: auto !important; bottom: 13px; left: 9px; z-index: 2;
  max-width: calc(100% - 56px);
  background: none; border: 0; border-radius: 0; padding: 0; backdrop-filter: none;
  font-size: 9.5px; font-weight: 500; line-height: 12px; letter-spacing: .1px;
  color: rgba(232, 232, 232, .72); text-shadow: 0 0 3px rgba(0, 0, 0, .6), 0 1px 1px rgba(0, 0, 0, .5);
  transition: opacity .15s ease;
}
.gal-item:not(.gal-audio) > .gname:hover { border: 0; background: none; color: #fff; }
.gal-item:not(.gal-audio):has(> .gmodel) > .gname { left: 46px; max-width: calc(100% - 92px); }
.gal-item:not(.gal-audio):has(> .gmodel.has-draft) > .gname { left: 112px; max-width: calc(100% - 158px); }
.gal-item:not(.gal-audio):has(> .gcrop) > .gname { left: 36px; }
.gal-item:not(.gal-audio):has(> .gcrop ~ .gmodel) > .gname { left: 73px; max-width: calc(100% - 119px); }
.gal-item:not(.gal-audio):hover > .gname { opacity: 0; pointer-events: none; }
