/* ==========================================================================
   Lightbox theme — restyles the stock ekko-lightbox modal into an immersive
   image viewer (dark blurred backdrop, frameless rounded image, circular
   close + nav controls). Loaded after ekko-lightbox.css on pages that use
   [data-toggle="lightbox"] galleries (space-details).
   ========================================================================== */

/* --- Backdrop: deep dim + blur (stacks on top of Bootstrap's .modal-backdrop) */
.ekko-lightbox.modal {
    background: rgba(9, 14, 24, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* Center the dialog vertically; scoped to .show so Bootstrap's own
   display toggling keeps working. */
.ekko-lightbox.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.ekko-lightbox .modal-dialog {
    margin: 0;
    animation: lbZoomIn 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes lbZoomIn {
    from { transform: scale(0.96); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* --- Smooth flow between gallery images.
   ekko double-buffers two .ekko-lightbox-item divs and toggles Bootstrap's
   .fade/.show classes, while stamping the new image's size as inline styles
   (dialog max-width + container height) with no transition — so the frame
   snapped and the photos blinked. Transitions on those exact properties make
   the frame glide to the next image's size while the photos crossfade with
   a gentle zoom. */
.ekko-lightbox .modal-dialog {
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ekko-lightbox-container {
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.ekko-lightbox-item.fade {
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
.ekko-lightbox-item.fade:not(.show) {
    transform: scale(1.02);
}
.ekko-lightbox-item.fade.show {
    transform: scale(1);
}

/* --- Strip the white modal chrome: the image IS the container */
.ekko-lightbox .modal-content {
    background: transparent;
    border: 0;
    box-shadow: none;
}
.ekko-lightbox .modal-body {
    padding: 0;
}
.ekko-lightbox-container {
    border-radius: 14px;
    overflow: hidden;
    background: #0b0f16;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* --- Floating close button at the image's top-right corner */
.ekko-lightbox .modal-header {
    display: block;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 30;
    padding: 0;
    border: 0;
    background: transparent;
}
.ekko-lightbox .modal-header .modal-title {
    display: none;
}
.ekko-lightbox .modal-header .close {
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    background: rgba(13, 18, 28, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    text-shadow: none;
    opacity: 1;
    float: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}
.ekko-lightbox .modal-header .close:hover,
.ekko-lightbox .modal-header .close:focus {
    background: #fff;
    color: #0f2a5f;
    opacity: 1;
    transform: rotate(90deg);
    outline: none;
}

/* --- Nav arrows: full-half click zones, circular glass buttons */
.ekko-lightbox-nav-overlay a {
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    text-decoration: none;
}
.ekko-lightbox-nav-overlay a:last-child {
    justify-content: flex-end;
}
.ekko-lightbox:hover .ekko-lightbox-nav-overlay a,
.ekko-lightbox-nav-overlay a:focus {
    opacity: 1;
}
.ekko-lightbox-nav-overlay a span {
    display: flex;
    align-items: center;
    justify-content: center;
    /* ekko's stock css sets flex-grow:1 and padding:0 30px on the anchor's
       child, which would stretch the chip into a pill — pin it to a circle */
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    padding: 0;
    box-sizing: border-box;
    margin: 0 16px;
    border-radius: 50%;
    background: rgba(13, 18, 28, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.22);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.ekko-lightbox-nav-overlay a:hover span {
    background: #fff;
    color: #0f2a5f;
    transform: scale(1.08);
}

/* --- Loader: white spinner on the dark backdrop */
.ekko-lightbox-loader > div > div {
    background-color: #fff;
}

/* --- Touch devices: no hover, so controls stay visible */
@media (hover: none) {
    .ekko-lightbox-nav-overlay a {
        opacity: 1;
    }
}

/* --- Small screens: tighter padding, smaller controls */
@media (max-width: 576px) {
    .ekko-lightbox.modal.show {
        padding: 10px;
    }
    .ekko-lightbox-container {
        border-radius: 10px;
    }
    .ekko-lightbox .modal-header {
        top: 8px;
        right: 8px;
    }
    .ekko-lightbox .modal-header .close {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }
    .ekko-lightbox-nav-overlay a span {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        margin: 0 8px;
        font-size: 17px;
    }
}
