/* Shared photo lightbox — used by the admin list and the public site.
   Lives on its own so the two areas cannot drift apart visually; the markup
   contract and behaviour are in public/js/photo-lightbox.js. */

.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.photo-modal[hidden] { display: none; }
.photo-modal.is-open { opacity: 1; }

.photo-modal__card {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    transform: translateY(12px) scale(0.97);
    transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.photo-modal.is-open .photo-modal__card { transform: translateY(0) scale(1); }

.photo-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem 0.85rem 1.25rem;
    border-bottom: 1px solid #eef2f7;
}
.photo-modal__title {
    font-weight: 700;
    font-size: 0.98rem;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.photo-modal__close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.photo-modal__close:hover { background: #e2e8f0; color: #0f172a; }

.photo-modal__figure {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: #f8fafc;
}
.photo-modal__img {
    display: block;
    width: 100%;
    max-height: 62vh;
    object-fit: contain;
    border-radius: 0.75rem;
}

@media (prefers-reduced-motion: reduce) {
    .photo-modal,
    .photo-modal__card { transition: none; }
}

/* Phone: nearly full-bleed but still a card, so it reads as a modal. */
@media (max-width: 768px) {
    .photo-modal { padding: 0.75rem; }
    .photo-modal__card { width: 100%; }
    .photo-modal__img { max-height: 70vh; }
