html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

main {
  flex: 1 0 auto; /* allow main content to grow and push footer down */
}

footer {
  flex-shrink: 0; /* prevent footer from shrinking */
}

footer p {
	margin: 0px;
}

:root {
  --columns: 7;
}

.gallery {
	--margin: 8px;
	--gap: 16px;
	--image-width: 250px;
	column-count: var(--columns);
	width: min-content;
	margin: auto;
}

.img-base {
	border-radius: 8px;
	filter: drop-shadow(0 0 8px rgba(0,0,0,0.75));
}

.gallery img {
	display: block;
	max-width: 100%;
	min-width: var(--image-width);
	transition: opacity 1.5s ease;
	cursor: pointer;
	vertical-align: top;
	margin-bottom: var(--gap);
}

.gallery img:hover {
	filter: drop-shadow(0 0 16px rgba(0,0,0,0.75));
	transform: scale(1.025);
}

img.full {
	position: fixed;
	z-index: 1;
	max-width: 90vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
	margin: auto;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	filter: grayscale(0%);
}

.full-cover {
	backdrop-filter: blur(10px);
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: rgba(0,0,0,0.25);
	z-index: 1;
	display: none;
}

.full-cover--show {
  display: block;
}

.card-img-top {
  width: 100%;
  aspect-ratio: 3 / 2; /* Match natural photo ratio (or 16 / 9) */
  object-fit: cover;   /* Prevents distortion */
  #background-color: #000; /* Fills transparent PNG corners seamlessly */
}

/* Gallery Admin Styles */
.admin-sticky-bar {
  position: sticky;
  top: 0;
  background: var(--bs-body-bg, #1e293b);
  padding: 15px 20px;
  border-bottom: 1px solid var(--bs-border-color, #334155);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1000;
  flex-wrap: wrap;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-divider {
  width: 1px;
  height: 28px;
  background-color: var(--bs-border-color, #cbd5e1);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 20px;
}

.photo-card {
  background: var(--bs-tertiary-bg, #2b3035);
  border: 2px solid var(--bs-border-color, #495057);
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.photo-card.selected {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.15);
}

.img-container {
  position: relative;
  display: block;
}

.photo-card img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #0f172a;
  border-radius: 4px;
  display: block;
}

.edit-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.15s ease, color 0.15s ease;
  z-index: 2;
}

.edit-btn:hover {
  background: #2563eb;
  color: #ffffff;
}

.photo-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--bs-secondary-color, #9ba3af);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-joins {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.join-tag {
  font-size: 10px;
  background: var(--bs-secondary-bg, #343a40);
  color: var(--bs-body-color, #dee2e6);
  border: 1px solid var(--bs-border-color, #495057);
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.badge-list {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge-custom {
  background: var(--bs-secondary-bg, #343a40);
  color: var(--bs-body-color, #dee2e6);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--bs-border-color, #495057);
}

.badge-custom .remove-icon {
  cursor: pointer;
  font-weight: bold;
  color: #94a3b8;
}

.badge-custom .remove-icon:hover {
  color: #ef4444;
}

.showcase-star {
  font-size: 11px;
  font-weight: bold;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 3px;
  transition: all 0.15s ease;
}

.showcase-star:hover {
  color: #d97706;
  background: rgba(254, 243, 199, 0.2);
}

.showcase-star.active {
  color: #f59e0b;
  background: rgba(254, 243, 199, 0.2);
}
/* END Gallery Admin Styles */
