/* Bygger oven på ../style.css og ../member/member.css. */

.album-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.album-card {
  position: relative;
  display: grid;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--white);
  background: rgba(10,10,10,0.6);
  text-decoration: none;
  overflow: hidden;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.album-card:hover,
.album-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255,133,0,0.78);
  box-shadow: 0 18px 40px rgba(0,0,0,0.5), 0 0 30px rgba(255,133,0,0.18);
}

.album-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,133,0,0.4);
  font-size: 2.4rem;
}

.album-card__text {
  position: relative;
  align-self: end;
  display: grid;
  gap: 2px;
  padding: 34px 12px 12px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.9) 62%);
}

.album-card__text strong {
  font-size: 0.98rem;
  line-height: 1.2;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.album-card__text small {
  color: var(--orange-light);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.album-grid .event-empty {
  grid-column: 1 / -1;
}

.album-meta {
  position: relative;
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.album-meta:empty {
  display: none;
}

.admin-bar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-bar .member-btn {
  flex: 1 1 160px;
}

.photo-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.photo-thumb {
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  cursor: pointer;
}

.photo-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 300ms ease;
}

.photo-thumb:hover img,
.photo-thumb:focus-visible img {
  transform: scale(1.06);
}

.photo-grid .event-empty {
  grid-column: 1 / -1;
}

#photosStatus:not(:empty) {
  margin-bottom: 12px;
}

/* ---------- Stor visning ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.94);
}

.lightbox img {
  max-width: 100vw;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  object-fit: contain;
}

.lightbox-btn {
  position: absolute;
  z-index: 1;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--white);
  background: rgba(10,10,10,0.7);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
  border-color: var(--orange);
  color: var(--orange-light);
}

.lightbox-close {
  top: 12px;
  right: 12px;
  font-size: 1.1rem;
}

.lightbox-prev {
  left: 10px;
}

.lightbox-next {
  right: 10px;
}

.lightbox-footer {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

@media (min-width: 620px) {
  .photo-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
  }
}
