/**
 * Public-facing styles for Elofs Annonshantering.
 */

/* Gallery thumbnails */
.elofah-gallery {
    clear: both;
    margin: 1em 0;
}
.elofah-gallery a {
    display: inline-block;
    margin: 5px;
    text-decoration: none;
    cursor: pointer;
}
.elofah-gallery img {
    display: block;
    width: 150px;
    height: auto;
    vertical-align: top;
    border: 1px solid #ccc;
    background: #fff;
    transition: opacity 0.15s;
}
.elofah-gallery a:hover img {
    opacity: 0.85;
}

.elofah-ad-content {
    clear: both;
    margin-bottom: 1.5em;
}

/* ── Lightbox ─────────────────────────────────────────────── */
#elofah-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}
#elofah-lightbox.elofah-lb-open {
    display: flex;
}

#elofah-lb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: pointer;
}

#elofah-lb-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 95vw;
    max-height: 95vh;
}

#elofah-lb-img {
    display: block;
    max-width: 82vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #111;
    border-radius: 2px;
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.7);
    transition: opacity 0.2s;
}
#elofah-lb-img.elofah-lb-loading {
    opacity: 0;
}

#elofah-lb-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    z-index: 2;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
#elofah-lb-close:hover,
#elofah-lb-close:focus {
    background: rgba(255, 255, 255, 0.38);
    outline: none;
}

.elofah-lb-nav {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 2.4rem;
    line-height: 1;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    flex-shrink: 0;
    user-select: none;
}
.elofah-lb-nav:hover,
.elofah-lb-nav:focus {
    background: rgba(255, 255, 255, 0.35);
    outline: none;
}
.elofah-lb-nav:disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

#elofah-lb-counter {
    position: fixed;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-family: sans-serif;
    pointer-events: none;
}
