/* ev-gallery.css — evGalleryGrid() (_func.php) and its lightbox (ev-gallery.js).
 * Loaded by the grid itself, once per page, so any template that shows a
 * gallery gets it without touching the header. */

/* ---------- block wrapper (a gallery inside an event or article) ---------- */
.ev-gallery-block{margin:32px 0}
.ev-gallery-block__title{font:700 22px/1.25 var(--ev-ui,system-ui,sans-serif);color:var(--ev-ink,#333);
  letter-spacing:-.01em;margin:0 0 6px}
.ev-gallery-block__body{font:400 15px/1.55 var(--ev-ui,system-ui,sans-serif);color:var(--ev-ink-2,#5F5F61);margin:0 0 14px}

/* ---------- cover cards (event with several galleries) ------------------- */
.ev-gallery-cards{list-style:none;margin:0;padding:0;display:grid;gap:14px;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
.ev-gallery-card{display:flex;flex-direction:column;gap:2px;text-decoration:none;color:var(--ev-ink,#333)}
.ev-gallery-card__cover{display:block;border-radius:var(--ev-radius,11px);overflow:hidden;background:var(--ev-paper,#FAF9F9);
  aspect-ratio:3/2;margin-bottom:8px}
.ev-gallery-card__cover img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 30%;transition:transform .25s ease}
.ev-gallery-card:hover .ev-gallery-card__cover img{transform:scale(1.03)}
.ev-gallery-card:focus-visible{outline:3px solid var(--ev-coral,#EE365B);outline-offset:3px;border-radius:var(--ev-radius,11px)}
.ev-gallery-card__title{font:700 16.5px/1.3 var(--ev-ui,system-ui,sans-serif)}
.ev-gallery-card__count{font:400 13.5px/1.3 var(--ev-ui,system-ui,sans-serif);color:var(--ev-ink-3,#909093)}

/* ---------- "See all" under a preview, and sibling galleries -------------- */
.ev-gallery__more{margin:14px 0 0;font:600 15px/1.3 var(--ev-ui,system-ui,sans-serif)}
.ev-gallery__more a{color:var(--ev-coral-ink,#CE1E42);text-decoration:none}
.ev-gallery__more a:hover{text-decoration:underline}
.ev-gallery-siblings{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0 0 22px;
  font:600 14.5px/1 var(--ev-ui,system-ui,sans-serif)}
.ev-gallery-siblings a,.ev-gallery-siblings span{padding:9px 16px;border-radius:999px;text-decoration:none;
  border:1px solid var(--ev-line,#E6E3E4);color:var(--ev-ink,#333)}
.ev-gallery-siblings a:hover{border-color:var(--ev-ink-3,#909093)}
.ev-gallery-siblings span[aria-current]{background:var(--ev-ink,#333);border-color:var(--ev-ink,#333);color:#fff}

/* ---------- signed-out note ---------------------------------------------- */
.ev-gallery__gate{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:0 0 16px;padding:12px 14px;
  border:1px solid var(--ev-line,#E6E3E4);border-radius:var(--ev-radius,11px);background:var(--ev-paper,#FAF9F9);
  font:400 14.5px/1.45 var(--ev-ui,system-ui,sans-serif);color:var(--ev-ink-2,#5F5F61)}
.ev-gallery__gate-btn{border:0;border-radius:999px;padding:7px 14px;cursor:pointer;
  font:600 13.5px/1 var(--ev-ui,system-ui,sans-serif);background:var(--ev-coral-deep,#C9143F);color:#fff}
.ev-gallery__gate-btn--alt{background:transparent;color:var(--ev-coral-ink,#CE1E42);box-shadow:inset 0 0 0 1.5px currentColor}

/* ---------- grid --------------------------------------------------------- */
.ev-gallery__grid{list-style:none;margin:0;padding:0;display:grid;gap:10px;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.ev-gallery__item{position:relative;margin:0;border-radius:10px;overflow:hidden;background:var(--ev-paper,#FAF9F9)}
.ev-gallery__open{display:block;width:100%;padding:0;border:0;background:none;cursor:zoom-in}
.ev-gallery__open--locked{cursor:pointer}
/* A uniform 3:2 tile keeps 600 mixed shots tidy; the lightbox shows the whole frame.
 * object-position favours the upper third, where faces usually are. */
.ev-gallery__open img{display:block;width:100%;aspect-ratio:3/2;object-fit:cover;object-position:50% 30%;
  transition:transform .25s ease}
.ev-gallery__open:hover img{transform:scale(1.03)}
.ev-gallery__open:focus-visible{outline:3px solid var(--ev-coral,#EE365B);outline-offset:-3px}

.ev-gallery__actions{position:absolute;right:8px;bottom:8px;display:flex;gap:6px}
.ev-gallery__actions > *{display:flex;align-items:center;justify-content:center;width:34px;height:34px;padding:0;
  border:0;border-radius:50%;background:rgba(255,255,255,.92);color:var(--ev-ink,#333);cursor:pointer;
  box-shadow:0 1px 4px rgba(0,0,0,.18)}
.ev-gallery__actions svg{width:17px;height:17px}

/* Shared by grid and lightbox buttons. */
.ev-gallery__like svg,.ev-gallery__download svg{fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.ev-gallery__like.is-liked{color:var(--ev-coral-deep,#C9143F)}
.ev-gallery__like.is-liked svg{fill:currentColor}

/* ---------- pager -------------------------------------------------------- */
.ev-gallery__pager{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;margin:20px 0 0;
  font:600 14px/1 var(--ev-ui,system-ui,sans-serif)}
.ev-gallery__pager a,.ev-gallery__pager span{min-width:36px;padding:10px 12px;border-radius:8px;text-align:center;
  border:1px solid var(--ev-line,#E6E3E4);color:var(--ev-ink,#333);text-decoration:none}
.ev-gallery__pager span[aria-current]{background:var(--ev-ink,#333);border-color:var(--ev-ink,#333);color:#fff}

/* ---------- lightbox toolbar (inside Magnific's title slot) --------------- */
/* The theme's backdrop let the grid's buttons show through under the toolbar. */
.mfp-bg.ev-lb-open{background:#0c0c0d;opacity:.94}
.ev-lb-open .mfp-bottom-bar{margin-top:-4px}
.ev-lb{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding:10px 0 0;
  font:400 14px/1.35 var(--ev-ui,system-ui,sans-serif);color:#fff}
.ev-lb__title{flex:1 1 100%;color:rgba(255,255,255,.85)}
.ev-lb__actions{display:flex;gap:8px}
.ev-lb__btn{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border:0;border-radius:999px;cursor:pointer;
  background:rgba(255,255,255,.14);color:#fff;font:600 14px/1 var(--ev-ui,system-ui,sans-serif);text-decoration:none}
.ev-lb__btn:hover{background:rgba(255,255,255,.24);color:#fff}
.ev-lb__btn svg{width:16px;height:16px}
.ev-lb__btn.is-liked{color:#fff;background:var(--ev-coral-deep,#C9143F)}
.ev-lb__note{font-size:12.5px;color:rgba(255,255,255,.6)}
.ev-lb-open .mfp-counter{color:rgba(255,255,255,.7);font:400 13px/1.35 var(--ev-ui,system-ui,sans-serif)}

/* ---------- one-time photo license --------------------------------------- */
.ev-license{max-width:440px;width:calc(100% - 32px);padding:22px 22px 18px;border:0;border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.35);font:400 15px/1.5 var(--ev-ui,system-ui,sans-serif);color:var(--ev-ink,#333)}
.ev-license::backdrop{background:rgba(0,0,0,.55)}
.ev-license h2{font:700 19px/1.25 var(--ev-ui,system-ui,sans-serif);margin:0 0 8px}
.ev-license p{margin:0 0 12px;color:var(--ev-ink-2,#5F5F61)}
.ev-license a{color:var(--ev-coral-ink,#CE1E42)}
.ev-license label{display:flex;gap:10px;align-items:flex-start;padding:12px;border-radius:10px;
  background:var(--ev-paper,#FAF9F9);border:1px solid var(--ev-line,#E6E3E4);font-size:14.5px;cursor:pointer}
.ev-license input{margin-top:3px;width:18px;height:18px;flex:none;accent-color:var(--ev-coral-deep,#C9143F)}
.ev-license__error{color:var(--ev-coral-deep,#C9143F)!important;margin:10px 0 0!important}
.ev-license__buttons{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
.ev-license__buttons button{border:0;border-radius:999px;padding:10px 16px;cursor:pointer;font:600 14.5px/1 var(--ev-ui,system-ui,sans-serif)}
.ev-license__cancel{background:transparent;color:var(--ev-ink-2,#5F5F61)}
.ev-license__agree{background:var(--ev-coral-deep,#C9143F);color:#fff}
.ev-license__agree:disabled{opacity:.6}

@media (max-width:620px){
  .ev-gallery__grid{grid-template-columns:repeat(2,1fr);gap:6px}
  .ev-gallery__actions > *{width:32px;height:32px}
}
@media (prefers-reduced-motion:reduce){.ev-gallery__open img{transition:none}.ev-gallery__open:hover img{transform:none}}
