photos_page.css

← Back to explorer
static/ css/ photos_page.css
Raw
CSS 306 lines · UTF-8
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
.page-title {
  margin: 0 0 8px 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
}

.page-desc {
  margin: 0 0 22px 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.empty { color: var(--muted); font-size: 14px; }
.empty a { color: var(--text); }

/* ── Gallery ─────────────────────────────────── */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tile {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  cursor: pointer;
  padding: 0;
  transition: border-color 150ms, box-shadow 150ms;
  position: relative;
}

.tile img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform 220ms ease;
}

.tile:hover {
  border-color: rgba(109,71,21,0.45);
  box-shadow: 0 4px 18px rgba(109,71,21,0.1);
}

.tile:hover img { transform: scale(1.04); }

/* ── Lightbox overlay ────────────────────────── */

.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(4, 4, 4, 0.9);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.lb-overlay.lb-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Top toolbar ─────────────────────────────── */

.lb-toolbar {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px;
  z-index: 20;
}

.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  transition: background 150ms, border-color 150ms, color 150ms;
  font-size: 12px;
  font-family: inherit;
  white-space: nowrap;
  padding: 0 12px;
  text-decoration: none;
  line-height: 1;
}

.lb-btn:hover {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.32);
  color: #fff;
}

.lb-info-btn,
.lb-close-btn {
  width: 34px;
  padding: 0;
  flex-shrink: 0;
}

/* Active state for info button */
.lb-info-active {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.4) !important;
  color: #fff !important;
}

/* ── Main stage ──────────────────────────────── */

.lb-stage {
  flex: 1;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  /* leaves room for toolbar & counter */
  padding: 52px 0 40px;
}

/* ── Nav buttons ─────────────────────────────── */

.lb-nav {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, opacity 150ms;
  z-index: 10;
  padding: 0;
  line-height: 1;
  margin: 0 10px;
}

.lb-nav:hover:not(:disabled) {
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.35);
}

.lb-nav:disabled,
.lb-nav.lb-nav-off {
  opacity: 0.2;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Image wrapper ───────────────────────────── */

.lb-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-width: 0;
  overflow: hidden;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
  transition: opacity 180ms ease;
}

.lb-img.lb-loading { opacity: 0.25; }

/* ── Metadata panel ──────────────────────────── */
/*
  Sits to the RIGHT of the image, inside .lb-stage.
  It's always in the DOM but has width:0 + overflow:hidden
  when closed, expanding to a fixed width when open.
  The image flex-shrinks naturally to make room.
*/

.lb-meta-panel {
  flex-shrink: 0;
  width: 0;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* slide + fade together */
  transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 300ms ease;
  opacity: 0;
}

.lb-meta-panel.meta-open {
  width: 230px;
  opacity: 1;
}

.lb-meta-scroll {
  width: 230px;            /* fixed inner width so text doesn't reflow */
  padding: 20px 18px 20px 14px;
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
  border-left: 1px solid rgba(255,255,255,0.1);
}

.lb-meta-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 14px;
  line-height: 1.4;
  word-break: break-word;
}

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.meta-row:last-child { margin-bottom: 0; }

.meta-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
}

.meta-value {
  font-size: 12.5px;
  color: rgba(255,255,255,0.82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  word-break: break-word;
  line-height: 1.4;
}

.meta-empty {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  font-style: italic;
}

/* ── Counter ─────────────────────────────────── */

.lb-counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  pointer-events: none;
  white-space: nowrap;
  z-index: 5;
}

/* ── Responsive ──────────────────────────────── */

@media (max-width: 1100px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-meta-panel.meta-open { width: 180px; }
  .lb-meta-scroll { width: 180px; }
  .lb-nav { width: 40px; height: 40px; font-size: 20px; margin: 0 4px; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: 1fr; }
  .tile img { height: 220px; }
  /* on very small screens meta panel slides up from bottom instead */
  .lb-stage { flex-direction: column; padding: 52px 0 0; }
  .lb-meta-panel { width: 100% !important; height: 0; opacity: 0; transition: height 300ms cubic-bezier(0.4,0,0.2,1), opacity 300ms ease; border-left: none; }
  .lb-meta-panel.meta-open { height: 180px; width: 100% !important; opacity: 1; }
  .lb-meta-scroll { width: 100%; border-left: none; border-top: 1px solid rgba(255,255,255,0.1); }
}