/* The zoomable image thumbnail cue. Every button that opens a photo in a lightbox carries
   `.photo-btn`. On hover, keyboard focus and press a dark scrim and a centred magnifier fade in
   to say "tap to enlarge". Centred, so a scroll strip never clips it (an outset ring was, which
   is the bug this replaced), and it fits any image size or shape, light and dark. Hero, catalog,
   header-gallery and profile images are not `.photo-btn` and get no cue. The 8px scrim radius
   matches most thumbnails; a 10 to 12px image shows only a small corner under the 42% scrim.

   A file of its own since 2026-11-18, out of utilities.css, so the admin console can link it for
   its photo thumbnails without the app's resets and focus fallbacks (as Admin links map.css and
   reconnect.css). The app links it right after utilities.css. */

.photo-btn {
    position: relative;
    cursor: zoom-in;
}
/* Scrim layer (::before): a dark wash that fades in. Radius matches the thumbnail
   (8px default; override ::before per-class for larger corners). */
.photo-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: rgba(13, 33, 55, 0.42);
    opacity: 0;
    transition: opacity 0.18s;
    pointer-events: none;
}
/* Magnifier layer (::after): POPS in (fade + scale-up) for a touch of life, so
   the cue is intuitive (signals "enlarge") AND feels alive. Sits above the scrim. */
.photo-btn::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 26px;
    height: 26px;
    transform: translate(-50%, -50%) scale(0.6);
    background: center / 26px 26px no-repeat;
    /* The other icon that cannot be an <Icon>: a background-image is its own
       document and reaches neither the component nor the --icon-* tokens, so the
       silhouette is drawn three times here to carry its own sheen and shade. The
       shape matches ic-kaca-pembesar in IconDefs.razor and has to be kept in step
       by hand. Written unencoded for legibility; a data URI in a double-quoted
       url() only needs the # escaped. */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><defs><linearGradient id='s' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ffffff' stop-opacity='.40'/><stop offset='.34' stop-color='%23ffffff' stop-opacity='.104'/><stop offset='1' stop-color='%23ffffff' stop-opacity='0'/></linearGradient><linearGradient id='d' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23061A2E' stop-opacity='0'/><stop offset='.64' stop-color='%23061A2E' stop-opacity='.040'/><stop offset='1' stop-color='%23061A2E' stop-opacity='.220'/></linearGradient></defs><g stroke='none'><path fill='%23ffffff' d='M2.4 11A8.6 8.6 0 0 1 19.6 11A8.6 8.6 0 0 1 2.4 11ZM5.5 11A5.5 5.5 0 0 0 16.5 11A5.5 5.5 0 0 0 5.5 11ZM18.66 16.54L21.66 19.54A1.5 1.5 0 0 1 19.54 21.66L16.54 18.66A1.5 1.5 0 0 1 18.66 16.54Z'/><path fill='url(%23s)' d='M2.4 11A8.6 8.6 0 0 1 19.6 11A8.6 8.6 0 0 1 2.4 11ZM5.5 11A5.5 5.5 0 0 0 16.5 11A5.5 5.5 0 0 0 5.5 11ZM18.66 16.54L21.66 19.54A1.5 1.5 0 0 1 19.54 21.66L16.54 18.66A1.5 1.5 0 0 1 18.66 16.54Z'/><path fill='url(%23d)' d='M2.4 11A8.6 8.6 0 0 1 19.6 11A8.6 8.6 0 0 1 2.4 11ZM5.5 11A5.5 5.5 0 0 0 16.5 11A5.5 5.5 0 0 0 5.5 11ZM18.66 16.54L21.66 19.54A1.5 1.5 0 0 1 19.54 21.66L16.54 18.66A1.5 1.5 0 0 1 18.66 16.54Z'/></g></svg>");
    opacity: 0;
    transition:
        opacity 0.18s,
        transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}
/* Suppress the global outline AND the btn-plain inset ring: the scrim and magnifier
   are the only focus cue (no blue border). */
.photo-btn:focus-visible {
    outline: none;
    box-shadow: none;
}
.photo-btn:focus-visible::before,
.photo-btn:focus-visible::after {
    opacity: 1;
}
.photo-btn:focus-visible::after {
    transform: translate(-50%, -50%) scale(1);
}
@media (hover: hover) {
    .photo-btn:hover::before {
        opacity: 1;
    }
    .photo-btn:hover::after {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}
/* Press shows the same scrim and magnifier on touch, where the hover above never runs. */
.photo-btn:active::before,
.photo-btn:active::after {
    opacity: 1;
}
.photo-btn:active::after {
    transform: translate(-50%, -50%) scale(1);
}
