.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.popup {
    background: var(--white);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
}

.header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--black);
}

.closeButton {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
}

.closeButton:hover {
    color: var(--wine);
}

.content {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Reusing similar style as org list but with hover effect for selection */
.organizationCard {
    margin-bottom: 15px;
    border-radius: 8px;
    padding: 15px;
    background-color: var(--organization-card, var(--wine));
    cursor: pointer;
    box-shadow: 0px 2px 8px -4px rgba(0,0,0,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.organizationCard:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px -4px rgba(0,0,0,0.6);
}

.organizationCard h3 {
    margin: 0 0 5px 0;
    font-size: 17px;
    color: var(--white);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.organizationCard p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.roleTag {
    font-size: 13px;
    color: var(--white);
    font-weight: bold;
    background-color: var(--organization-flag, rgba(0,0,0,0.3));
    border-radius: 4px;
    padding: 4px 10px 4px 30px;
    display: inline-block;
}

.organizationCardRolOwner {
    background-image: url("/icon-key.svg");
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 14px;
}

.organizationCardRolCollaborator {
    background-image: url("/icon-collaborator.svg");
    background-repeat: no-repeat;
    background-position: 8px center;
    background-size: 14px;
}
