#popup-plugin {
    display: none;
    position: fixed;
    right: 20px; /* This keeps the popup 20px from the right edge */
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    text-align: center;
    width: 400px; /* Sets the width of the popup for desktop */
    /* left and margin-left properties are removed */
}

@media screen and (max-width: 768px) {
    #popup-plugin {
        width: 100%; /* Full width */
        max-width: 320px; /* Maximum width of 320px */
        left: 0; /* Align left edge with viewport */
        right: 0; /* Align right edge with viewport */
        bottom: 0; /* Align bottom edge with viewport */
        top: auto; /* Override top positioning from desktop styles */
        margin-left: auto; /* Center the popup when max-width is less than the screen width */
        margin-right: auto; /* Center the popup when max-width is less than the screen width */
        transform: none; /* Reset transform for mobile */
        box-shadow: 0 0 10px rgba(0,0,0,0.5);
    }
}

.popup-close {
    position: absolute;
    right: 10px;
    top: 10px;
    cursor: pointer;
    z-index: 10;
    text-decoration: none;
    color: inherit;
}

.popup-button {
    display: block;
    margin: 20px auto;
    text-decoration: none;
    padding: 10px 20px;
    cursor: pointer;
    border: none;
}
