/**
 * Epilog Knowledge Base
 *
 * Plugin-owned front-end styles.
 */


/* =====================================================
   Article Quick Navigation
===================================================== */

#stickyQuickNav {
    z-index: 990;
}

#articleDetails {
    z-index: 970;
}

.scrollMenuDropdown li a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =====================================================
   Knowledge Base Article Headings
===================================================== */

.kb-article-content > h2, .kb-article-introduction {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #e5e5e5;
}

/* =====================================================
   Normalize Embedded YOOtheme Containers in Articles
===================================================== */

.kb-article-content > .uk-container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}


/* =====================================================
   Article Images / Lightbox
===================================================== */

.kb-article-content .kb-lightbox-image {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 20px 0;
    overflow: hidden;
    vertical-align: top;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.4);
}

.kb-article-content .kb-lightbox-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

.kb-article-content .uk-card .kb-lightbox-image {
    box-shadow: none;
}


/* Search / zoom overlay */

.kb-article-content .kb-lightbox-image .imgIcon {
    font-size: 20px;
}

/* =====================================================
   YOOtheme Builder Content Normalization

   New KB articles may use native YOOtheme Builder
   sections/containers. Neutralize only the outermost
   Builder framing so Builder posts align visually with
   legacy raw-HTML Knowledge Base articles.
===================================================== */

.kb-article-content > .uk-section {
    padding-top: 0;
    padding-bottom: 0;
}

.kb-article-content > .uk-section > .uk-container {
    width: 100%;
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* =====================================================
   Consecutive Image Grid
===================================================== */

/*
 * JavaScript adds .gridImagesWrapper when two or more
 * standalone article images are consecutive.
 *
 * CSS Grid replaces the older nth-child width/margin rules.
 */
.kb-article-content .gridImagesWrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;

    margin: 20px 0;
}


/*
 * Remove the normal individual-image margin because the
 * grid wrapper now owns spacing between grouped images.
 */
.kb-article-content .gridImagesWrapper .kb-lightbox-image {
    min-width: 0;
    margin: 0;
}


/*
 * Keep grouped images visually consistent.
 */
.kb-article-content .gridImagesWrapper .kb-lightbox-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

#stickyQuickNav {
    transition: transform 200ms ease;
}

#stickyQuickNav.kb-quicknav-sticky {
    animation: kbQuickNavSlideDown 200ms ease;
}

@keyframes kbQuickNavSlideDown {
    from {
        transform: translateY(-60px);
    }

    to {
        transform: translateY(0);
    }
}


/* =====================================================
   Mobile Images
===================================================== */

@media (max-width: 639px) {

    .kb-article-content .gridImagesWrapper {
        grid-template-columns: 1fr;
    }

}