/* ========================================================
   Deva Photography - Lightbox Stylesheet
   Full-size photo lightbox with keyboard and touch support
   ======================================================== */

.dp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 21, 20, 0.96);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.dp-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Lightbox Top Bar */
.dp-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    color: #FAF8F5;
    z-index: 10;
}

.dp-lightbox-counter {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #C7C2BA;
    text-transform: uppercase;
}

.dp-lightbox-close {
    background: transparent;
    border: none;
    color: #FAF8F5;
    font-size: 1.8rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s, transform 0.2s;
}

.dp-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
}

/* Lightbox Stage (Image Container) */
.dp-lightbox-stage {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 10px 20px;
}

.dp-lightbox-image-wrap {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.dp-lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease;
}

/* Navigation Arrows */
.dp-lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: rgba(40, 38, 36, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #FAF8F5;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.dp-lightbox-btn:hover {
    background: rgba(140, 115, 85, 0.9);
    border-color: #8C7355;
}

.dp-lightbox-prev {
    left: 20px;
}

.dp-lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .dp-lightbox-btn {
        width: 44px;
        height: 44px;
    }
    .dp-lightbox-prev { left: 10px; }
    .dp-lightbox-next { right: 10px; }
}

/* Caption Bottom Bar */
.dp-lightbox-caption {
    padding: 16px 24px;
    text-align: center;
    color: #FAF8F5;
    font-size: 0.92rem;
    max-width: 800px;
    margin: 0 auto;
    min-height: 56px;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

/* Loading Spinner */
.dp-lightbox-spinner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #8C7355;
    border-radius: 50%;
    animation: dpSpin 0.8s linear infinite;
    display: none;
}

.dp-lightbox.loading .dp-lightbox-spinner {
    display: block;
}

@keyframes dpSpin {
    to { transform: rotate(360deg); }
}
