/* Profile photo viewer + photo comments – moved out of member.php on 2026-11-30. Loaded at the end of the page. */
/* ===== Photo comments (2026-11-04) ===== */
.pc{position:absolute;right:0;top:0;bottom:0;width:340px;max-width:100vw;background:#fff;color:#23112F;display:flex;flex-direction:column;font-family:Figtree,system-ui,sans-serif;z-index:4;transform:translateX(100%);transition:transform .25s;box-shadow:-10px 0 40px rgba(0,0,0,.35)}
.photo-lightbox-overlay.pc-open .pc{transform:none}
.photo-lightbox-overlay.pc-open .photo-lightbox-img-wrap{margin-right:340px}
.photo-lightbox-overlay.pc-open .photo-lightbox-next{right:356px}
.pc-h{display:flex;align-items:center;gap:8px;padding:14px 16px;border-bottom:1px solid #ece6f0;font-size:15px}
.pc-h span{color:#8c819a;font-size:13px;font-weight:700}
/* 2026-11-04: comments button is a labelled pill next to Close (was hidden under it) */
.pc-tog{position:fixed;top:max(14px,env(safe-area-inset-top));right:124px;z-index:7;display:inline-flex;align-items:center;gap:7px;height:46px;padding:0 18px 0 14px;border:0;border-radius:999px;background:#B0177A;color:#fff!important;font:800 15px/1 Figtree,system-ui,-apple-system,sans-serif;cursor:pointer;text-decoration:none!important;box-shadow:0 6px 24px rgba(0,0,0,.35)}
.pc-tog b{font-size:18px;line-height:1}
.pc-tog:hover{background:#95106a}
.photo-lightbox-overlay.pc-open .pc-tog{display:none}
.pc-x{margin-left:auto;width:34px;height:34px;border-radius:50%;border:0;background:#f3eff6;color:#23112F;font-size:15px;cursor:pointer;flex:none}
.pc-x:hover{background:#fde7f3}
.pc-tog[data-n]:not([data-n="0"]):after{content:attr(data-n);position:absolute;top:-5px;right:-5px;background:#B0177A;color:#fff;font:800 11px/18px Figtree,system-ui,sans-serif;min-width:18px;height:18px;border-radius:9px;padding:0 5px}

.pc-list{flex:1;overflow-y:auto;padding:10px 14px;display:flex;flex-direction:column;gap:10px}
.pc-empty{color:#8c819a;text-align:center;padding:30px 10px;font-size:14px;line-height:1.5}
.pc-c{display:flex;gap:9px;align-items:flex-start}
.pc-c img{width:34px;height:34px;border-radius:50%;object-fit:cover;flex:none}
.pc-b{min-width:0;flex:1;background:#f6f2f9;border-radius:14px;padding:8px 11px;font-size:14px;line-height:1.45;overflow-wrap:anywhere}
.pc-b a{color:#23112F;font-weight:800;text-decoration:none}
.pc-cr{display:inline-block;margin-left:6px;background:linear-gradient(135deg,#F3D9A4,#D9B26A);color:#3a2604;font-size:11px;font-weight:800;padding:1px 7px;border-radius:999px;vertical-align:1px}
.pc-v{color:#1d9bf0;font-size:12px}
.pc-m{display:flex;gap:10px;font-size:11.5px;color:#8c819a;margin-top:3px;padding-left:4px}
.pc-m button{border:0;background:none;color:#8c819a;cursor:pointer;padding:0;font:inherit}
.pc-m button:hover{color:#b3261e}
.pc-form{display:flex;gap:8px;align-items:flex-end;padding:10px 12px;border-top:1px solid #ece6f0}
.pc-form textarea{flex:1;border:1.5px solid #e2d9ea;border-radius:16px;padding:9px 12px;font:500 14px Figtree,system-ui,sans-serif;resize:none;max-height:120px;min-height:40px}
.pc-form textarea:focus{outline:0;border-color:#B0177A}
.pc-send{width:40px;height:40px;border-radius:50%;border:0;background:#B0177A;color:#fff;cursor:pointer;font-size:15px;flex:none}
.pc-send[disabled]{opacity:.5}
.pc-gate{padding:10px 14px 12px;font-size:13px;color:#5d4508;background:#fff8e8;border-top:1px solid #f1d79a;line-height:1.45}
.pc-gate a{color:#B0177A;font-weight:800}
@media (max-width:760px){.pc{top:auto;height:62vh;width:100%;border-radius:18px 18px 0 0;transform:translateY(100%)}.photo-lightbox-overlay.pc-open .pc{transform:none}.photo-lightbox-overlay.pc-open .photo-lightbox-img-wrap{margin-right:0}.photo-lightbox-overlay.pc-open .photo-lightbox-next{right:12px}.pc-tog{right:auto;left:14px}}
/* ===== Photo Lightbox ===== */
.photo-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: lightboxFadeIn 0.25s ease;
}
.photo-lightbox-overlay.active { display: flex; }
@keyframes lightboxFadeIn { from { opacity: 0; } to { opacity: 1; } }

.photo-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 36px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 3;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.photo-lightbox-close:hover { background: rgba(255,255,255,0.3); transform: scale(1.1); }
/* 2026-11-04: Close is an obvious white pill, always above the comments panel */
.photo-lightbox-overlay .photo-lightbox-close{position:fixed;top:max(14px,env(safe-area-inset-top));right:14px;width:auto;height:46px;padding:0 18px 0 14px;gap:7px;border-radius:999px;background:#fff;color:#23112F;font:800 15px/1 Figtree,system-ui,-apple-system,sans-serif;z-index:7;box-shadow:0 6px 24px rgba(0,0,0,.35)}
.photo-lightbox-overlay .photo-lightbox-close b{font-size:20px;line-height:1}
.photo-lightbox-overlay .photo-lightbox-close:hover{background:#fde7f3;transform:none}
.photo-lightbox-overlay.pc-open .photo-lightbox-close{right:410px}
.photo-lightbox-hint{position:fixed;bottom:max(14px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);color:rgba(255,255,255,.72);font:600 13px Figtree,system-ui,sans-serif;white-space:nowrap;pointer-events:none;z-index:3}
.photo-lightbox-overlay.pc-open .photo-lightbox-hint{left:calc((100% - 340px)/2)}
@media (max-width:760px){.photo-lightbox-overlay.pc-open .photo-lightbox-close{right:14px}.photo-lightbox-overlay.pc-open .photo-lightbox-hint{display:none}}

.photo-lightbox-img-wrap {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.photo-lightbox-img-wrap img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 60px rgba(0,0,0,0.6);
    animation: lightboxZoomIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    user-select: none;
    -webkit-user-drag: none;
}
@keyframes lightboxZoomIn { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.photo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 48px;
    width: 56px;
    height: 80px;
    border-radius: 12px;
    cursor: pointer;
    z-index: 3;
    transition: all 0.2s;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.photo-lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.photo-lightbox-nav.visible { display: flex; }
.photo-lightbox-prev { left: 16px; }
.photo-lightbox-next { right: 16px; }

.photo-lightbox-counter {
    position: absolute;
    bottom: -36px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* ===== Gallery Upload Area ===== */
.gallery-upload-area {
    margin-top: 16px;
}
.gallery-upload-dropzone {
    border: 2px dashed #d4d8e8;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
}
.gallery-upload-dropzone:hover,
.gallery-upload-dropzone.dragover {
    border-color: #667eea;
    background: linear-gradient(135deg, #eef0ff 0%, #e8ebff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102,126,234,0.15);
}
.gallery-upload-dropzone.dragover {
    border-style: solid;
}
.gallery-upload-icon { margin-bottom: 12px; opacity: 0.8; }
.gallery-upload-text {
    font-size: 15px;
    color: #4a5568;
    margin: 0 0 6px 0;
    font-weight: 500;
}
.gallery-upload-browse {
    color: #667eea;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.gallery-upload-hint {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

/* Upload Queue */
.gallery-upload-queue {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.gallery-upload-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3/4;
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.gallery-upload-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-upload-item .upload-progress-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    backdrop-filter: blur(2px);
}
.gallery-upload-item .upload-progress-ring {
    width: 44px;
    height: 44px;
}
.gallery-upload-item .upload-progress-ring circle {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
}
.gallery-upload-item .upload-progress-ring .ring-bg { stroke: rgba(255,255,255,0.2); }
.gallery-upload-item .upload-progress-ring .ring-fill {
    stroke: #fff;
    stroke-dasharray: 126;
    stroke-dashoffset: 126;
    transition: stroke-dashoffset 0.3s ease;
    transform: rotate(-90deg);
    transform-origin: center;
}
.gallery-upload-item .upload-status-text {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.gallery-upload-item.upload-done .upload-progress-overlay {
    background: rgba(16,185,129,0.6);
    animation: uploadDonePulse 0.5s ease;
}
.gallery-upload-item.upload-done .upload-check {
    font-size: 28px;
    color: #fff;
}
@keyframes uploadDonePulse { 0% { transform: scale(1.05); } 100% { transform: scale(1); } }

.gallery-upload-item.upload-error .upload-progress-overlay {
    background: rgba(239,68,68,0.6);
}
