/* Photo Gallery Plugin - Frontend Styles */

.pgp-gallery-wrap {
    background: #111;
    border-radius: 10px;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Stage */
.pgp-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.pgp-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.35s ease;
}

.pgp-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.72));
    color: #fff;
    font-size: 13px;
    padding: 24px 14px 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.pgp-stage:hover .pgp-caption {
    opacity: 1;
}

/* Gallery Arrows */
.pgp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    z-index: 5;
    padding: 0;
}

.pgp-arrow svg {
    display: block;
    flex-shrink: 0;
}

.pgp-arrow:hover {
    background: rgba(0,0,0,0.75);
    border-color: rgba(255,255,255,0.7);
}

.pgp-prev { left: 10px; }
.pgp-next { right: 10px; }

/* Dots */
.pgp-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.pgp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #444;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}

.pgp-dot.active {
    background: #7ecfd4;
}

/* Thumbnails */
.pgp-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.pgp-thumb {
    width: 76px;
    height: 56px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.55;
    transition: all 0.2s ease;
}

.pgp-thumb:hover,
.pgp-thumb.active {
    border-color: #7ecfd4;
    opacity: 1;
}

/* Counter */
.pgp-counter {
    text-align: center;
    color: #888;
    font-size: 12px;
    margin-top: 10px;
}

/* ── Lightbox ─────────────────────────────────────────── */
.pgp-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.93);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.pgp-lightbox.open {
    display: flex;
}

.pgp-lightbox > img {
    max-width: 82vw;
    max-height: 82vh;
    border-radius: 6px;
    display: block;
    object-fit: contain;
    user-select: none;
}

/* Close button */
.pgp-lb-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    padding: 0;
    z-index: 10;
}

.pgp-lb-close:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.8);
}

.pgp-lb-close svg {
    display: block;
    flex-shrink: 0;
}

/* Lightbox arrows */
.pgp-lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    padding: 0;
    z-index: 10;
}

.pgp-lb-arrow:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.8);
}

.pgp-lb-arrow:active {
    transform: translateY(-50%) scale(0.93);
}

.pgp-lb-arrow svg {
    display: block;
    flex-shrink: 0;
}

.pgp-lb-prev { left: 20px; }
.pgp-lb-next { right: 20px; }

/* Lightbox counter */
.pgp-lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    background: rgba(0,0,0,0.4);
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 600px) {
    .pgp-thumb {
        width: 60px;
        height: 44px;
    }
    .pgp-arrow {
        width: 36px;
        height: 36px;
    }
    .pgp-lb-arrow {
        width: 42px;
        height: 42px;
    }
    .pgp-lightbox > img {
        max-width: 96vw;
        max-height: 75vh;
    }
    .pgp-lb-prev { left: 6px; }
    .pgp-lb-next { right: 6px; }
}
