/*
 * Shared photo viewer + per-photo comments panel (TripPhotoViewer, resources/trip-js/photoViewer.js).
 *
 * The .chat-lightbox* shell rules moved here VERBATIM from chat.xhtml / tripMedia.xhtml, which each carried
 * their own copy — the class names are kept so existing webtest selectors and muscle memory survive. The
 * .pv-* rules are the comments panel and badges.
 *
 * Layout: .pv-stage is the flex-wrap idiom used on admin/mediaItem.xhtml — image and panel sit side by side
 * when there is room and the panel wraps UNDER the image on a narrow screen, with no media queries. The
 * panel is always dark because the backdrop is.
 */

.chat-lightbox { position: fixed; inset: 0; background: rgba(8,10,14,0.9); z-index: 10010;
    display: flex; flex-direction: column; align-items: center; justify-content: center; }
.chat-lightbox-title { color: #eee; margin-top: 0.6rem; max-width: 92vw; text-align: center; }
.chat-lightbox-meta { color: #bbb; font-size: 0.9rem; margin-top: 0.3rem; }
.chat-lightbox-meta a { color: #9cf; margin-left: 0.75rem; }
/* Link-styled like the download anchor beside it, but red: it destroys, and must not read as navigation. */
.pv-delete { border: 0; background: none; color: #e88; cursor: pointer; font-size: 0.9rem;
    margin-left: 0.75rem; padding: 0; text-decoration: underline; }
.pv-delete:hover { color: #f66; }
.chat-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px;
    height: 64px; border: 0; background: rgba(255,255,255,0.12); color: #fff; font-size: 1.6rem;
    cursor: pointer; border-radius: 8px; z-index: 1; }
.chat-lightbox-prev { left: 0.6rem; }
.chat-lightbox-next { right: 0.6rem; }
.chat-lightbox-close { position: absolute; top: 0.7rem; right: 1rem; border: 0; background: none;
    color: #ddd; font-size: 1.8rem; cursor: pointer; line-height: 1; z-index: 1; }

/* The stage: image column + comments panel, wrapping under on narrow screens. */
.pv-stage { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; justify-content: center;
    max-width: 96vw; max-height: calc(100vh - 3rem); overflow-y: auto; padding: 0 0.5rem; }
.pv-imgcol { flex: 2 1 480px; min-width: 300px; display: flex; flex-direction: column;
    align-items: center; }
.pv-imgcol img { max-width: 100%; max-height: 72vh; border-radius: 4px; }

/* The filmstrip under the image (multi-photo sets only). Fixed-size thumbs + overflow-x so a big album
   scrolls horizontally instead of wrapping the stage; always on the dark backdrop, so no theme variants. */
.pv-strip { display: flex; gap: 0.35rem; overflow-x: auto; max-width: 100%;
    padding: 0.45rem 0.2rem 0.1rem; scrollbar-width: thin; }
.pv-strip-thumb { flex: 0 0 auto; width: 52px; height: 52px; padding: 0; border: 2px solid transparent;
    border-radius: 6px; background: none; cursor: pointer; opacity: 0.55; overflow: hidden; }
.pv-strip-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 4px; }
.pv-strip-thumb.pv-strip-current { border-color: #9cf; opacity: 1; }

.pv-panel { flex: 1 1 320px; min-width: 280px; max-width: 460px; max-height: 72vh;
    display: flex; flex-direction: column; background: #1b1f2b; border: 1px solid #39404f;
    border-radius: 8px; color: #e8e8ea; }
.pv-panel-head { display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 0.75rem; border-bottom: 1px solid #2a3040; font-weight: 600; }
.pv-hide { border: 0; background: none; color: #9ab; cursor: pointer; font-size: 0.85rem; }
.pv-show-comments { border: 0; background: rgba(255,255,255,0.12); color: #dde; cursor: pointer;
    border-radius: 999px; padding: 0.15rem 0.7rem; margin-left: 0.75rem; font-size: 0.9rem; }

/*
 * The image's own reaction row, under the picture and centred on it -- NOT inside the comments panel, which
 * collapses. Quick picks carry the discovery: a lone unlabelled "+" here read as decoration and people simply
 * did not find that photos could be reacted to.
 */
.pv-reactions { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center;
    justify-content: center; padding: 0.5rem 0.5rem 0.25rem; }
.pv-chip { border: 1px solid #39404f; background: #232838; color: #dde; border-radius: 999px;
    padding: 0.1rem 0.6rem; cursor: pointer; font-size: 0.9rem; }
.pv-chip-mine { border-color: #6c8; background: #24382c; }
.pv-quick { border: 1px solid transparent; background: rgba(255,255,255,0.10); border-radius: 999px;
    padding: 0.1rem 0.5rem; cursor: pointer; font-size: 1rem; line-height: 1.35; }
.pv-quick:hover { background: rgba(255,255,255,0.22); }
.pv-react-add { border: 1px dashed #4a5164; background: none; color: #bcd; border-radius: 999px;
    padding: 0.15rem 0.6rem; cursor: pointer; font-size: 0.85rem; line-height: 1.35; white-space: nowrap; }
.pv-react-add:hover { border-color: #7d8698; color: #eef; }
.pv-picker { display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.25rem 0.75rem;
    justify-content: center; }
.pv-picker button { border: 0; background: #232838; border-radius: 6px; font-size: 1.1rem;
    cursor: pointer; padding: 0.15rem 0.35rem; }

/* The comment list. */
.pv-comments { flex: 1 1 auto; overflow-y: auto; min-height: 6rem; padding: 0.5rem 0.75rem; }
.pv-comment { margin-bottom: 0.6rem; }
.pv-comment-head { font-size: 0.8rem; color: #9ab; }
.pv-comment-author { font-weight: 600; color: #cdf; margin-right: 0.4rem; }
.pv-comment-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; }
.pv-comment-del { border: 0; background: none; color: #667; cursor: pointer; font-size: 0.8rem;
    margin-left: 0.4rem; }
.pv-comment-del:hover { color: #e88; }
.pv-mention { color: #9cf; }
.pv-empty { color: #778; font-style: italic; padding: 0.25rem 0; }
.pv-older { border: 0; background: none; color: #9ab; cursor: pointer; font-size: 0.85rem;
    padding: 0.2rem 0; }
.pv-error { color: #f99; font-size: 0.85rem; padding: 0.2rem 0.75rem; }

/* The composer (or the sign-in affordance in its place). */
.pv-composer { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.5rem 0.75rem 0.75rem;
    border-top: 1px solid #2a3040; position: relative; }
.pv-composer textarea { background: #12151f; color: #e8e8ea; border: 1px solid #39404f;
    border-radius: 6px; padding: 0.4rem 0.5rem; min-height: 3.2rem; resize: vertical;
    font: inherit; font-size: 0.95rem; }
.pv-composer-post { align-self: flex-end; border: 0; background: #3b82c4; color: #fff;
    border-radius: 6px; padding: 0.3rem 1rem; cursor: pointer; }
.pv-composer-post:disabled { opacity: 0.5; cursor: default; }
.pv-login { padding: 0.6rem 0.75rem 0.75rem; border-top: 1px solid #2a3040; }
.pv-login button { border: 0; background: #3b82c4; color: #fff; border-radius: 6px;
    padding: 0.35rem 1rem; cursor: pointer; }

/* Mention typeahead dropdown, anchored above the textarea. */
.pv-mention-list { position: absolute; bottom: 100%; left: 0.75rem; right: 0.75rem;
    background: #232838; border: 1px solid #39404f; border-radius: 6px; overflow: hidden;
    z-index: 2; }
.pv-mention-list button { display: block; width: 100%; text-align: left; border: 0;
    background: none; color: #dde; padding: 0.35rem 0.6rem; cursor: pointer; }
.pv-mention-list button:hover, .pv-mention-list button:focus { background: #2e3548; }

/* The plain-DOM modal for "log in to comment?" — no PrimeFaces dependency; the landing page may have no
   widgets initialised at all. */
.pv-modal-backdrop { position: fixed; inset: 0; background: rgba(8,10,14,0.6); z-index: 10020;
    display: flex; align-items: center; justify-content: center; }
.pv-modal { background: #1b1f2b; color: #e8e8ea; border: 1px solid #39404f; border-radius: 8px;
    padding: 1rem 1.25rem; max-width: 22rem; }
.pv-modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 0.9rem; }
.pv-modal-actions button { border: 0; border-radius: 6px; padding: 0.3rem 1rem; cursor: pointer; }
.pv-modal-login { background: #3b82c4; color: #fff; }
.pv-modal-cancel { background: #2a3040; color: #cdd; }

/* Comment-count badges shown BEFORE the lightbox opens. Pages add the position variant. */
.pv-badge { position: absolute; background: rgba(0,0,0,0.65); color: #fff; border-radius: 999px;
    padding: 0.05rem 0.5rem; font-size: 0.8rem; pointer-events: none; z-index: 2; }
.pv-badge-grid { top: 0.45rem; right: 0.45rem; }
.pv-badge-chatphoto { top: 0.45rem; left: 0.45rem; }
.pv-badge-slide { top: 0.6rem; right: 0.6rem; }
