/* Uncode Popup Manager — Frontend Styles */

/* ── Overlay ───────────────────────────────────────────────── */
.upm-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    z-index: 99998 !important;
    cursor: pointer;
    animation: upmFadeIn 0.35s ease both;
}
.upm-overlay.upm-visible { display: block; }

/* ── Popup ─────────────────────────────────────────────────── */
.upm-popup {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 99999 !important;
    width: 92%;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0,0,0,.45), 0 4px 16px rgba(0,0,0,.15);
    background: transparent;
    margin: 0 !important;
    padding: 0 !important;
    animation: upmPopIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
.upm-popup.upm-visible { display: block; }

@keyframes upmFadeIn {
    from { opacity: 0; } to { opacity: 1; }
}
@keyframes upmPopIn {
    from { opacity: 0; transform: translate(-50%, -46%) scale(0.96) !important; }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1)    !important; }
}

/* ── Bouton fermer ─────────────────────────────────────────── */
.upm-close-btn {
    position: absolute !important;
    top: 12px !important; right: 12px !important;
    z-index: 10;
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    background: rgba(0,0,0,.35);
    border: 2px solid currentColor;
    border-radius: 50%;
    cursor: pointer; padding: 0; opacity: .85;
    transition: opacity .2s, transform .2s, background-color .2s;
    backdrop-filter: blur(4px);
}
.upm-close-btn:hover {
    opacity: 1;
    transform: rotate(90deg) !important;
    background: rgba(0,0,0,.55);
}
.upm-close-btn svg { width: 16px; height: 16px; display: block; pointer-events: none; }

/* ── Image ─────────────────────────────────────────────────── */
.upm-thumbnail-img {
    display: block; width: 100%; height: auto;
    vertical-align: middle; margin: 0 !important; padding: 0 !important;
}
.upm-image-link { display: block; line-height: 0; transition: opacity .2s; }
.upm-image-link:hover { opacity: .92; }

@media (max-width: 600px) { .upm-popup { border-radius: 10px; } }
