body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.3s ease, visibility 0.3s ease;

    z-index: 1000000;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-container {
    position: relative;
    min-width: 500px;
    max-width: 96%;

    background: #ffffff;
    border-radius: 8px;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);

    /* EFEITO SUAVE */
    transform: translateY(-20px) scale(0.95);
    transition: transform 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0px 10px;
    border-bottom: 1px solid #ddd;

    background-color: var(--corNivel2);
    color: var(--corNivel5);

    border-radius: 8px 8px 0px 0px;
}
.modal-header h2 {
    margin: 10px;
}

.modal-close {
    background: #f13f2b;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 48%;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}
button.modal-close {position: absolute; top: -10px; right: -10px;}
button.modal-close:hover {opacity: 0.9;}

.modal-close:hover {
    background: #c0392b;
}

.modal-close:active {
    transform: scale(0.95);
}

.modal-body {
    padding: 20px;
    max-height: 700px;
    overflow: auto;
}



@media (max-width: 992px) {
    .modal-container {width: 95%;}
}