/* The work gallery: a 2010 lightbox over the whole window. Classes prefixed gl-. */
.gl-host {
  position: fixed; inset: 0; z-index: 8;
  display: none; place-items: center;
  font: 14px/1.45 Arial, Helvetica, sans-serif; color: #333;
}
.gl-host.gl-open { display: grid; overflow: auto; }
.gl-host *, .gl-host *::before, .gl-host *::after { box-sizing: border-box; }

.gl-back { position: absolute; inset: 0; background: rgba(8, 10, 14, 0.82); animation: gl-fade 0.25s ease-out both; }
@keyframes gl-fade { from { opacity: 0; } }

/* the white frame, rounded and shadowed, as the jQuery lightboxes had it */
.gl-box {
  position: relative; z-index: 1; margin: 20px auto;
  max-width: calc(100vw - 40px);
  padding: 10px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 12px 50px rgba(0, 0, 0, 0.6);
  animation: gl-pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}
@keyframes gl-pop { from { transform: scale(0.94); opacity: 0; } }
.gl-box.gl-swap .gl-img { animation: gl-fade 0.25s ease-out both; }

.gl-x {
  position: absolute; top: -15px; right: -15px; z-index: 3;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: #1c1c1c; color: #fff; border: 3px solid #fff;
  font: bold 19px/1 Arial, sans-serif; cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.gl-x:hover { background: #cc0000; }

.gl-stage { position: relative; }
.gl-view {
  position: relative; overflow: hidden; margin: 0 auto;
  background: #f4f4f4; border-radius: 3px;
  cursor: zoom-in; touch-action: pan-y;
}
.gl-zoomed .gl-view { cursor: grab; touch-action: none; }
/* already at its own pixel size: nothing to zoom into */
.gl-nozoom .gl-view { cursor: default; }
.gl-nozoom [data-gl="zoom"] { display: none; }
.gl-zoomed .gl-view:active { cursor: grabbing; }
.gl-img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; }

/* hover arrows over the image edges */
.gl-nav {
  position: absolute; top: 0; bottom: 0; width: 22%; z-index: 2;
  display: flex; align-items: center;
  background: none; border: 0; opacity: 0; transition: opacity 0.15s;
  pointer-events: none;
}
.gl-prev { left: 0; justify-content: flex-start; padding-left: 12px; }
.gl-next { right: 0; justify-content: flex-end; padding-right: 12px; }
.gl-stage:hover .gl-nav, .gl-nav:focus-visible { opacity: 1; }
.gl-nav span {
  pointer-events: auto; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(20, 20, 20, 0.72); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
  display: grid; place-items: center;
}
.gl-nav span::before { content: ""; width: 12px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; }
.gl-prev span::before { transform: translateX(2px) rotate(135deg); }
.gl-next span::before { transform: translateX(-2px) rotate(-45deg); }
.gl-zoomed .gl-nav { display: none; }
.gl-single .gl-nav, .gl-single .gl-thumbs { display: none; }

.gl-cap {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px;
  padding: 10px 4px 2px;
}
.gl-cap-l { min-width: 0; max-width: 720px; }
.gl-cap-l b { font-size: 16px; color: #1B5790; }
.gl-sub { font-size: 13px; color: #5c5c5c; }
.gl-text { margin: 4px 0 0; font-size: 14px; color: #444; }
/* its own line when the caption is long; wraps rather than spill out of a narrow frame */
.gl-cap-r { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 2px; }
.gl-count { font-size: 12px; color: #5c5c5c; white-space: nowrap; }
.gl-btn {
  padding: 5px 11px; border-radius: 4px; border: 1px solid #b9c1cb;
  background: linear-gradient(#fff, #e6e9ed); color: #1B5790;
  font: bold 12px/1 Arial, sans-serif; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.gl-btn:hover { background: linear-gradient(#fff, #f0f3f6); text-decoration: none; }
.gl-btn[aria-pressed="true"] { background: linear-gradient(#6aa6e6, #2e6ab1); border-color: #25589a; color: #fff; }
/* hands this screen over to the burned CDs (discs.css), where every set plays as one run */
.gl-cd {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 2px;
  font: bold 12px/1 Arial, Helvetica, sans-serif; color: #1B5790; white-space: nowrap;
}
.gl-cd::before {
  content: ""; flex: none; width: 14px; height: 14px; border-radius: 50%;
  background:
    radial-gradient(circle closest-side, #fff 0 22%, rgba(0, 0, 0, 0.3) 24% 28%, transparent 30%),
    conic-gradient(from 30deg, #dfe3e7, #f5c4de, #cdeed8, #c1def5, #efe0ad, #dfe3e7);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.28);
}
.gl-cd:hover { text-decoration: underline; }

/* the thumbnail strip, in its own dark tray */
.gl-thumbs {
  display: flex; justify-content: center; gap: 8px;
  margin: 10px -10px -10px; padding: 9px 10px;
  background: #1f2328; border-radius: 0 0 10px 10px;
}
.gl-thumb {
  width: 84px; height: 63px; padding: 0; border: 2px solid transparent; border-radius: 3px;
  background: #000; cursor: pointer; opacity: 0.55; transition: opacity 0.15s, border-color 0.15s;
}
.gl-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 1px; }
.gl-thumb:hover { opacity: 0.9; }
.gl-thumb.gl-on { opacity: 1; border-color: #f5b66e; }
.gl-host button:focus-visible, .gl-host a:focus-visible { outline: 2px solid #1B5790; outline-offset: 2px; }
.gl-thumbs button:focus-visible, .gl-nav:focus-visible span { outline: 2px solid #f5b66e; outline-offset: 2px; }
.gl-host .gl-nav:focus-visible { outline: none; } /* the circle has the ring, not the tall strip round it */
.gl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* a screen that failed to load says so */
.gl-broken .gl-img, .gl-broken .gl-full { display: none; }
.gl-broken .gl-view::after { content: "This screen didn't load."; position: absolute; inset: 0; display: grid; place-items: center; color: #666; font-size: 14px; }

@media (max-width: 700px) {
  .gl-cap { flex-direction: column; gap: 6px; }
  .gl-thumb { width: 60px; height: 45px; }
  .gl-nav { opacity: 1; width: 30%; }
  .gl-nav span { width: 36px; height: 36px; }
}
/* no hover to reveal them (touch tablets too): the arrows always show */
@media (hover: none), (pointer: coarse) { .gl-nav { opacity: 1; } }
/* fingers: the caption's buttons 44px tall, as the CD player has them */
@media (pointer: coarse) {
  .gl-cap .gl-btn { padding: 15px 14px; } /* 12px type + 30px + the border */
  .gl-cd { min-height: 44px; padding: 10px 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .gl-back, .gl-box, .gl-box.gl-swap .gl-img { animation: none; }
}
