.modal-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: #ffffffe6;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-in-out;
    z-index: 99;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%);
    transition: transform 0.3s ease-in-out;
    width: 100%;
    max-width: 30rem;
    background-color: white;
    padding: 3rem;
    line-height: 1.5rem;
    border: solid 3px black
}

.modal>h4 {
    font-weight: bold;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.modal>p {
    margin-bottom: 1rem;
}

.modal>form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal>form>* {
    font-family: 'Glr', sans-serif;
    line-height: 1.5rem;
    padding: 1rem;
    font-size: 1rem;
}

.modal>form>button {
    font-weight: 700;
    color: white;
    border: solid 3px black;
    background-color: black;
    transition: 200ms;
    cursor: pointer;
}

.modal>form>button:hover {
    color: black;
    background-color: white;
}

input:checked~.modal-overlay {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

input:checked~.modal-overlay .modal {
    transform: translate(-50%, -50%);
}

.modal-button>h2 {
    background-color: black;
    color: white;
    cursor: pointer;
    transition: 200ms;
}

.modal-button>h2:hover {
    background-color: white;
    color: black;
}

.modal-close {
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
    transition: 200ms ease-out;
    width: 3rem;
    height: 3rem;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.modal-close>img {
    width: 1rem;
    height: 1rem;
}

.modal-close:hover {
    transform: rotate(180deg);
}

.modal-social {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: 2rem;
    text-wrap: balance;
}

.modal-social img {
    width: 2rem;
}

@media (max-width: 70rem) {
    .modal-button {
        display: inline-flex;
        position: fixed;
        bottom: 1rem;
        right: 1rem;
        z-index: 9;
    }
}

@media (max-width: 42.5rem) {
    .modal {
        top: 50%;
        left: 1rem;
        right: 1rem;
        transform: translate(0, -50%) !important;
        box-sizing: border-box;
        max-width: unset;
        width: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
    }
}

@media (max-width: 32rem) {
    .modal-button {
        bottom: .5rem;
        left: .5rem;
        right: .5rem;
    }

    .modal-button>h2 {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}