.popup{
    width: 100%;
    height: auto;
    background-color:var(--third-color);
    color: var(--main-color);
    font-family: 'Med';
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 2rem;
}

.popup span{
    font-family: 'Strong';
}

.popup img{
    width: 15rem;
    height: auto;
}


.popup{
    width: 100%;
    height: auto;
    background-color:var(--third-color);
    color: var(--main-color);
    font-family: 'Med';
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    padding-bottom: 2rem;
}

.popup span{
    font-family: 'Strong';
}

.popup img{
    width: 15rem;
    height: auto;
}

/* ================= MODAL ================= */

.modal-overlay{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
    box-sizing: border-box;
}

.modal-overlay.active{
    opacity: 1;
    visibility: visible;
}

.modal-box{
    background-color: #ffffff;
    color: var(--main-color);
    width: 100%;
    max-width: 480px;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    position: relative;
    text-align: center;
    font-family: 'Med';
    box-sizing: border-box;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.modal-overlay.active .modal-box{
    transform: translateY(0) scale(1);
}

.modal-close{
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--main-color);
}

.modal-icon{
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.modal-title{
    font-family: 'Strong';
    font-size: 2rem;
    margin: 0 0 0.5rem 0;
}

.modal-subtitle{
    font-size: 1rem;
    margin: 0 0 1.5rem 0;
    color: #555555;
}

.modal-code-wrapper{
    background-color: var(--secondary-color, #f0f0f0);
    border: 2px dashed var(--third-color);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.modal-code{
    font-family: 'Strong';
    font-size: 1.6rem;
    letter-spacing: 0.15rem;
    word-break: break-all;
}

.modal-actions{
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-btn{
    width: 100%;
    padding: 0.9rem;
    border-radius: 2rem;
    border: none;
    font-size: 1rem;
    font-family: 'Med';
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.copy-btn{
    background-color: var(--main-color);
    color: #ffffff;
}

.download-btn{
    background-color: var(--third-color);
    color: var(--main-color);
}

.modal-btn:hover{
    opacity: 0.85;
}

.copy-feedback{
    display: block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: green;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-feedback.show{
    opacity: 1;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px){
    .modal-box{
        padding: 2rem 1.5rem;
        border-radius: 1.25rem;
    }
    .modal-title{
        font-size: 1.6rem;
    }
    .modal-code{
        font-size: 1.3rem;
    }
}

@media (max-width: 480px){
    .modal-box{
        padding: 1.75rem 1.25rem;
    }
    .modal-title{
        font-size: 1.4rem;
    }
    .modal-subtitle{
        font-size: 0.9rem;
    }
    .modal-code{
        font-size: 1.1rem;
    }
    .modal-btn{
        font-size: 0.9rem;
        padding: 0.8rem;
    }
}