/* divelogs-lightbox.css */

body.dlb-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

#dlb-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9990;
    cursor: pointer;
}
#dlb-overlay.dlb-active {
    display: block;
}

#dlb-wrap {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9995;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
#dlb-wrap.dlb-active {
    display: flex;
}

#dlb-box {
    position: relative;
    background: #111;
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.9);
    max-width: 92vw;
    max-height: 92vh;
    opacity: 0;
    transition: opacity 0.2s ease;
    overflow: hidden;
    pointer-events: all;
}
#dlb-box.dlb-loaded {
    opacity: 1;
}

/* Image mode */
#dlb-box.dlb-type-image {
    background: #000;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
}
#dlb-content {
    flex: 1 1 auto;
    min-height: 0;
    line-height: 0;
}
#dlb-content img {
    display: block;
    max-width: 92vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Iframe mode */
#dlb-box.dlb-type-iframe {
    overflow: hidden;
}
#dlb-box.dlb-type-iframe #dlb-content {
    width: 100%;
    height: 100%;
    flex: none;
}
#dlb-content iframe {
    display: block;
    border: none;
    width: 100%;
    height: 100%;
}

/* Title */
#dlb-title {
    display: none;
    flex: 0 0 auto;
    background: #1a1a1a;
    color: #ddd;
    font-size: 13px;
    font-family: Arial, sans-serif;
    padding: 8px 40px 8px 14px;
    line-height: 1.4;
    box-sizing: border-box;
    max-height: 10vh;
    overflow-y: auto;
}

/* Close button */
#dlb-close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
    text-align: center;
    padding: 0;
    z-index: 2;
    transition: background 0.15s;
    pointer-events: all;
}
#dlb-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Navigation arrows */
#dlb-prev,
#dlb-next {
    display: none;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    font-size: 36px;
    width: 48px;
    height: 72px;
    cursor: pointer;
    z-index: 9998;
    padding: 0;
    line-height: 1;
    text-align: center;
    transition: background 0.15s;
    pointer-events: all;
}
#dlb-prev:hover,
#dlb-next:hover {
    background: rgba(0, 0, 0, 0.75);
}
#dlb-prev {
    left: 0;
    border-radius: 0 4px 4px 0;
}
#dlb-next {
    right: 0;
    border-radius: 4px 0 0 4px;
}

/* Loading spinner */
#dlb-loading {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
}
#dlb-loading .dlb-spinner {
    width: 38px;
    height: 38px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: dlb-spin 0.7s linear infinite;
}
@keyframes dlb-spin {
    to { transform: rotate(360deg); }
}

/* Counter */
#dlb-counter {
    display: none;
    position: absolute;
    top: 6px;
    left: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    font-family: Arial, sans-serif;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
