:root.light {
    --pop-bg-color: #ececec;
    --pop-text-color1: rgba(24, 24, 24, 0.95);
    --pop-text-color2: rgba(25, 25, 25, 0.7);
    --pop-container-color1: rgb(255, 255, 255);
    --pop-container-color2: rgba(255, 255, 255);
}

:root.dark {
    --pop-bg-color: #202020;
    --pop-text-color1: rgba(255, 255, 255, 0.95);
    --pop-text-color2: rgba(255, 255, 255, 0.7);
    --pop-container-color1: rgba(255, 255, 255, 0.05);
    --pop-container-color2: rgba(255, 255, 255, 0.08);
}

.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow: hidden;
}

.popup {
    background-color: var(--pop-bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: popupFadeIn 0.3s ease;
    padding:30px;
    overflow-y: auto;
    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
}

/* Webkit scrollbar styles (Chrome, Safari, Opera) */
.popup::-webkit-scrollbar {
    width: 4px;
    /* Very thin scrollbar */
}

.popup::-webkit-scrollbar-track {
    background: transparent;
    /* Transparent track */
}

.popup::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.5);
    /* White with some transparency */
    border-radius: 3px;
    /* Rounded corners */
}

/* Add this rule to prevent body scrolling when popup is open */
body.popup-open {
    overflow: hidden;
}

/* Add this rule to prevent body scrolling when popup is open */
body.popup-open {
    overflow: hidden;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 15px 0;
    border-bottom: 1px solid rgba(221, 221, 221, 0.2);
    margin-bottom: 20px;
}

.popup-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--pop-text-color1);
}

.popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #f6f6f6;
    background-color: #3a7bc8;
    border-radius: 5px;
    border:none;
    padding:5px 20px;
}
.popup-close:hover{
    background-color: #104f9b;
}

.popup-content {
    padding: 0px;
}

.document-link-container {
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 8px;
    background-color: var(--pop-container-color1);
    transition: all 0.2s ease;
}

.document-link-container:hover {
    transform: translateY(-2px);
    background-color: var(--pop-container-color2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.document-link-container h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--pop-text-color1);
}

.document-link-container p {
    margin-bottom: 12px;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--pop-text-color2);
}

.document-link {
    display: inline-block;
    padding: 6px 14px;
    background-color: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.document-link:hover {
    background-color: #3a7bc8;
}

.popup-card {
    position: relative;
    cursor: pointer;
}

/* Dark mode adjustments */
.dark .document-link-container {
    background-color: #393939;
}

.dark .popup-header {
    border-bottom-color: #a0a0a0;
}