/**
 * Lightbox Styles
 * @package YNP_Theme
 */

/* ─── Overlay ─── */
.ynp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.ynp-lightbox.open {
    opacity: 1;
    visibility: visible;
}

/* ─── Image ─── */
.ynp-lb-img-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px 80px;
}
.ynp-lb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

/* ─── Spinner ─── */
.ynp-lb-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ynp-spin 0.7s linear infinite;
    display: none;
}
@keyframes ynp-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ─── Close button ─── */
.ynp-lb-close {
    position: absolute;
    top: 16px;
    right: 20px;
    z-index: 10;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 36px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}
.ynp-lb-close:hover {
    color: #fff;
    transform: scale(1.1);
}

/* ─── Navigation arrows ─── */
.ynp-lb-prev,
.ynp-lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    line-height: 1;
    padding: 0;
}
.ynp-lb-prev:hover,
.ynp-lb-next:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-50%) scale(1.05);
}
.ynp-lb-prev { left: 20px; }
.ynp-lb-next { right: 20px; }

/* ─── Counter ─── */
.ynp-lb-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-family: var(--sans, -apple-system, sans-serif);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.1em;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .ynp-lb-img-wrap {
        padding: 50px 16px;
    }
    .ynp-lb-prev,
    .ynp-lb-next {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
    .ynp-lb-prev { left: 10px; }
    .ynp-lb-next { right: 10px; }
    .ynp-lb-close {
        top: 10px;
        right: 12px;
        font-size: 30px;
    }
}

/* ─── Gallery item hover effect (thumbnail) ─── */
.lp-gallery-item,
.fp-item {
    cursor: pointer;
}
.lp-gallery-item::after,
.fp-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s;
    pointer-events: none;
}
.lp-gallery-item:hover::after,
.fp-item:hover::after {
    background: rgba(0, 0, 0, 0.08);
}

/* ─── Expand icon hint on hover ─── */
.lp-gallery-item::before,
.fp-item::before {
    content: '⤢';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 18px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.lp-gallery-item:hover::before,
.fp-item:hover::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
