/*
VMG Popup CSS + Click Button CSS
LWF FINAL (Responsive + Center Fix + Mobile Safe)
*/

/* =========================
   CLICK HERE BUTTON (UNCHANGED)
========================= */

#vmg-click-btn,
.vmg-click-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    min-height: 52px;
    padding: 12px 20px;
    background: #ffeb00;
    color: #d40000;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    border: 2px solid #d4b300;
    text-decoration: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#vmg-click-btn:hover,
.vmg-click-btn:hover {
    transform: translateY(-1px);
}

/* =========================
   POPUP OVERLAY (UNCHANGED)
========================= */

#vmg-popup,
.vmg-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999 !important;

    display: none;

    align-items: center;
    justify-content: center;

    width: 100vw;
    height: 100vh;

    background: rgba(0, 0, 0, 0.55);

    padding: 20px;
    box-sizing: border-box;

    overflow-y: auto;

    transform: none !important;
}

/* =========================
   POPUP CONTENT (FIXED ONLY HERE)
========================= */

.vmg-popup-content {
    position: absolute; /* 🔥 FIX */

    top: 50%;           /* 🔥 FIX */
    left: 50%;          /* 🔥 FIX */

    transform: translate(-50%, -50%); /* 🔥 FIX */

    width: 100%;
    max-width: 420px;

    max-height: 80vh;
    overflow-y: auto;

    background: #ffffff;
    border-radius: 14px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);

    padding: 22px 20px 20px;

    box-sizing: border-box;

    animation: vmgFadeIn 0.3s ease;

    margin: 0; /* 🔥 FIX (center conflict avoid) */

    align-self: center;
}

/* =========================
   CLOSE BUTTON (UNCHANGED)
========================= */

.vmg-popup-close,
#vmg-popup-close {
    position: absolute;
    top: 10px;
    right: 14px;

    font-size: 28px;
    line-height: 1;
    font-weight: 700;

    color: #444444;

    cursor: pointer;
    user-select: none;
}

/* =========================
   BODY (UNCHANGED)
========================= */

.vmg-popup-body {
    margin-top: 8px;
    color: #222222;
    font-size: 16px;
    line-height: 1.6;
}

.vmg-popup-body p {
    margin: 0;
}

/* =========================
   ANIMATION (UNCHANGED)
========================= */

@keyframes vmgFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =========================
   TABLET (UNCHANGED)
========================= */

@media (max-width: 1024px) {
    .vmg-popup-content {
        max-width: 90%;
    }
}

/* =========================
   MOBILE (UNCHANGED)
========================= */

@media (max-width: 767px) {

    #vmg-click-btn,
    .vmg-click-btn {
        right: 14px;
        bottom: 14px;
        min-width: 130px;
        min-height: 46px;
        padding: 10px 14px;
        font-size: 17px;
        border-radius: 8px;
    }

    .vmg-popup-content {
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        overflow-y: auto;
        padding: 18px 14px 16px;
        border-radius: 12px;
    }

    .vmg-popup-body {
        font-size: 15px;
    }
}

/* =========================
   SMALL MOBILE (UNCHANGED)
========================= */

@media (max-width: 400px) {

    .vmg-popup-content {
        padding: 16px 12px 14px;
    }

    .vmg-popup-body {
        font-size: 14px;
    }

    .vmg-popup-close {
        font-size: 24px;
        top: 8px;
        right: 10px;
    }
}