/* --- 1. OVERLAY & VISIBILITY --- */
.modal-overlay {
    /* Hide the overlay by default */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;

    /* Full-screen dark background */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent background */

    /* Be on top all other elements */
    z-index: 2000;

    /* Center the card */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Show the modal when this class is applied */
.modal-overlay.is-visible {
    visibility: visible;
    opacity: 1;
}

/* Apply the animation when the overlay is shown */
.modal-overlay.is-visible .popup-card {
    transform: scale(1); /* Scale up to full size */
    animation: pop-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* --- 2. THE CARD --- */
.popup-card {
    background-color: #2b2b2b; /*charcoal*/
    color: #ccc;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    transform: scale(0.8); /* Start smaller for the animation */
    transition: transform 0.3s ease-out; /* Add transition for smoothness */
}

/* Animation Keyframes */
@keyframes pop-in {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* actions (buttons) area */
.popup-card-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 10px;
}

.popup-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.popup-card-long-text {
    margin : 20px 0 10px;
}

.popup-card-credits-text {
    margin : 20px;
    font-size: 0.6rem;
    font-weight: 300;
}
.popup-card-link:link {
    /* href link color */
    color: #e0e0e0;
}
.popup-card-link:visited {
    /* href link color */
    color: #e0e0e0;
}
.popup-card-link:hover {
    /* href link color */
    color: #ffffff;
}

#popup-card-title {
    display: flex;
    justify-content: center;
}

.popup-card-lang-bar {
    display: flex;
    justify-content: right;
    /*Add some bottom margin*/
    margin-bottom: 20px;
}
