.custom-popup-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--overlay-bg);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 1rem;
}

.custom-popup-backdrop.active {
    opacity: 1;
}
 
.custom-popup-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 840px;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); 
}

.custom-popup-card--large {
    max-width: 1200px;
}

.custom-popup-backdrop.active .custom-popup-card {
    transform: scale(1);
}

/* Popup Header */
.custom-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.custom-popup-title {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.custom-popup-close-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    line-height: 1;
}

.custom-popup-close-btn:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}
 
.custom-popup-body {
    padding: 1.5rem; 
    line-height: 1.6;
}
 
.custom-popup-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background-color: rgba(0, 0, 0, 0.01);
}
 