.pdf-popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    text-align: center;
    overflow: auto;
}

.pdf-popup-content {
    position: relative;
    display: inline-block;
    margin: 3% auto;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    max-width: 90vw;
    max-height: 95vh;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.pdf-popup-content iframe {
    width: 100%;
    height: 90vh;
    border: none;
    border-radius: 6px;
    transform: scale(0.999); /* Make toolbar icon nearly invisible */
    clip-path: inset(40px 0 0 0); /* Clip top toolbar */
    margin-top: -40px; /* Shift up to hide toolbar */
}

@media (min-width: 1024px) {
    .pdf-popup-content {
        max-width: 90vw;
    }
    .pdf-popup-content iframe {
        max-height: 90vh;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .pdf-popup-content {
        max-width: 85vw;
        margin: 3% auto;
    }
    .pdf-popup-content iframe {
        max-height: 80vh;
    }
}

@media (max-width: 767px) {
    .pdf-popup-content {
        max-width: 95vw;
        margin: 2% auto;
        padding: 3px;
    }
    .pdf-popup-content iframe {
        max-height: 75vh;
    }
}

.pdf-popup-close {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 22px;
    color: #d61212;
    z-index: 10000;
}

.pdf-popup-trigger img {
    transition: transform 0.2s;
}

.pdf-popup-trigger img:hover {
    transform: scale(1.05);
}