/* Luna — admin.css
 *
 * Only active when an admin is signed in. Overlays piggyback on the photo
 * element's positioning context (admin.js sets position:relative if needed).
 *
 * Kept in its own file so the frontend agent working on components.css
 * doesn't have to reason about these styles.
 */

/* ---- overlay on each photo ---------------------------------------------- */

.luna-admin-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 8px;
  gap: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease-out;
  z-index: 5;
}

/* Only reveal the overlay on hover / focus-within. On touch devices we
 * don't have hover, so keep overlays visible whenever a descendant button
 * is focused. */
[data-luna-admin-overlay]:hover .luna-admin-overlay,
[data-luna-admin-overlay]:focus-within .luna-admin-overlay {
  opacity: 1;
}

.luna-admin-btn {
  pointer-events: auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(30, 58, 44, 0.12);
  background: rgba(241, 232, 212, 0.92); /* cream paper, slightly translucent */
  color: #1e3a2c; /* deep forest */
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(30, 58, 44, 0.18);
  transition: transform 100ms ease-out, background 120ms ease-out, color 120ms ease-out;
  padding: 0;
}

.luna-admin-btn:hover {
  transform: scale(1.08);
}

.luna-admin-btn:focus-visible {
  outline: 2px solid #c36a3a; /* terracotta */
  outline-offset: 2px;
}

.luna-admin-btn--star.is-active {
  background: #f5d24f; /* butter yellow */
  color: #1e3a2c;
}

.luna-admin-btn--hide {
  font-size: 20px;
  font-weight: 700;
}

.luna-admin-btn--hide.is-active {
  background: #c36a3a; /* terracotta */
  color: #f1e8d4;
}

/* ---- sign-in pill (bottom-right) ---------------------------------------- */

.luna-admin-pill {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 2000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(30, 58, 44, 0.92); /* deep forest */
  color: #f1e8d4; /* cream */
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 13px;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 20px rgba(30, 58, 44, 0.25);
}

.luna-admin-pill__label {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.luna-admin-pill__btn {
  background: transparent;
  border: 1px solid rgba(241, 232, 212, 0.45);
  color: inherit;
  padding: 4px 10px;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.luna-admin-pill__btn:hover {
  background: rgba(241, 232, 212, 0.12);
}

.luna-admin-pill__btn--primary {
  background: #e8457d; /* magenta */
  border-color: transparent;
  color: #f1e8d4;
  font-weight: 600;
}

.luna-admin-pill__btn--primary:hover {
  background: #d63a6f;
}

/* Mobile: shrink the pill so it doesn't collide with the bottom tab bar. */
@media (max-width: 640px) {
  .luna-admin-pill {
    bottom: 88px; /* above the tabbar */
    right: 12px;
    font-size: 12px;
    padding: 6px 10px;
  }
  .luna-admin-pill__label {
    max-width: 140px;
  }
}
