/* Overlay Background */
.ehg-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.ehg-overlay.active {
    display: flex;
    opacity: 1;
}

/* Close Button (Top Right) */
.ehg-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 38px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    line-height: 1;
    z-index: 100000;
}

.ehg-close:hover {
    color: #ccc;
}

/* Image Container */
.ehg-content {
    max-width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ehg-image {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 4px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
    object-fit: contain;
}

.ehg-caption {
    color: #eee;
    margin-top: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    text-align: center;
}

/* Bottom Navigation Controls */
.ehg-controls {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.12);
    padding: 8px 18px;
    border-radius: 25px;
}

.ehg-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.ehg-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.ehg-counter {
    color: #ddd;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
}

/* Clickable zoom-in cursor for explicit triggers and auto-detected image links */
[data-eh-gallery],
[data-eh-auto-image="true"] {
    cursor: zoom-in;
}