/* FON SmugMug gallery styles — copied from the static site's styles.css
   (.gallery-status / .event-tile* / .album-viewer* / .lightbox* rules) so the
   plugin is self-contained. Site CSS variables get inline fallbacks with the
   original values; a theme that defines the same variables wins. */

.gallery-status { text-align: center; color: var(--muted, #6b7493); padding: 2.5rem 1rem; font-size: .95rem; }

/* Event tiles (one per album/event) */
.event-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .event-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .event-tiles { grid-template-columns: 1fr; } }
.event-tile {
  position: relative; padding: 0; border: 0; cursor: pointer; text-align: left;
  aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius-lg, 14px);
  background: var(--navy-900, #0a1530);
  box-shadow: var(--shadow-md, 0 8px 24px rgba(12,20,48,.10), 0 2px 6px rgba(12,20,48,.06));
}
.event-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s var(--ease, cubic-bezier(.2,.7,.2,1)), transform .6s var(--ease, cubic-bezier(.2,.7,.2,1)); }
.event-tile img.loaded { opacity: 1; }
.event-tile:hover img.loaded { transform: scale(1.05); }
.event-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 38%, rgba(10,21,48,.88)); z-index: 1; }
.event-tile .meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 1.1rem 1.2rem; color: #fff; }
.event-tile .meta h4 { font-family: var(--font-display, "DM Serif Display", "Times New Roman", Georgia, serif); font-size: 1.25rem; line-height: 1.15; color: #fff; letter-spacing: -0.01em; margin: 0; }
.event-tile .meta .count { display: inline-block; margin-top: .4rem; font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-300, #e6d39a); }
.event-tile .meta .count svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: .25rem; }

/* Album viewer — full-screen grid of every photo in an event */
.album-viewer { position: fixed; inset: 0; z-index: 280; display: none; flex-direction: column; background: #0c1430; }
.album-viewer.open { display: flex; }
.album-viewer-head {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.5rem;
  background: var(--navy-900, #0a1530); border-bottom: 1px solid rgba(255,255,255,.1);
  position: sticky; top: 0; z-index: 2;
}
/* .eyebrow base styling lives in the site stylesheet — scoped copy so the
   viewer header renders correctly with any theme. */
.album-viewer-head .eyebrow {
  font-weight: 600; text-transform: uppercase; letter-spacing: .22em;
  color: var(--gold-300, #e6d39a); display: block; font-size: .64rem;
}
.album-viewer-head h3 { font-family: var(--font-display, "DM Serif Display", "Times New Roman", Georgia, serif); color: #fff; font-size: clamp(1.2rem,2vw,1.6rem); line-height: 1.1; flex: 1; margin: 0; }
.album-viewer-head .av-close {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff;
  cursor: pointer; font-size: 1.5rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: all .2s var(--ease, cubic-bezier(.2,.7,.2,1));
}
.album-viewer-head .av-close:hover { background: var(--gold-500, #c9a961); color: var(--navy-900, #0a1530); border-color: var(--gold-500, #c9a961); }
.album-scroll { overflow-y: auto; padding: 1.5rem; -webkit-overflow-scrolling: touch; flex: 1; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; max-width: 1500px; margin: 0 auto; }
@media (max-width: 600px) { .album-grid { grid-template-columns: repeat(2, 1fr); } }
.album-grid button { padding: 0; border: 0; cursor: pointer; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 8px; background: var(--navy-700, #112349); }
.album-grid img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s var(--ease, cubic-bezier(.2,.7,.2,1)), transform .5s var(--ease, cubic-bezier(.2,.7,.2,1)); }
.album-grid img.loaded { opacity: 1; }
.album-grid button:hover img.loaded { transform: scale(1.06); }
.album-status { color: rgba(255,255,255,.7); text-align: center; padding: 3rem 1rem; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: center; justify-content: center;
  background: rgba(5,8,23,.92); backdrop-filter: blur(6px);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 3px; box-shadow: 0 40px 90px -20px rgba(0,0,0,.7); }
.lightbox .lb-cap {
  position: absolute; left: 0; right: 0; bottom: 1.1rem; text-align: center;
  color: rgba(255,255,255,.85); font-size: .9rem; padding: 0 1rem;
}
.lightbox button {
  position: absolute; background: rgba(255,255,255,.08); color: #fff;
  border: 1px solid rgba(255,255,255,.2); border-radius: 50%;
  width: 48px; height: 48px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s var(--ease, cubic-bezier(.2,.7,.2,1));
}
.lightbox button:hover { background: var(--gold-500, #c9a961); color: var(--navy-900, #0a1530); border-color: var(--gold-500, #c9a961); }
.lightbox .lb-close { top: 1.1rem; right: 1.1rem; }
.lightbox .lb-prev { left: 1.1rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1.1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox .lb-prev { left: .4rem; } .lightbox .lb-next { right: .4rem; } }
