/* Full screen overlay */
.modal {
    display: none;
    /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    z-index: 999999 !important;
}

/* Modal content box */
.modal-content {
    position: relative;
    z-index: 1000000;
    background-color: #fff;
    margin: 12% auto;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Modal header */
.modal-header {
    position: relative;
    padding-bottom: 10px;
}

/* Close button */
.modal-header .close {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    display: block;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #0e7d3f, #12a150);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.modal-header .close:hover {
    transform: scale(1.1) rotate(90deg);
    background: linear-gradient(135deg, #12a150, #0e7d3f);
}

/* Modal body */
.modal-body {
    margin-top: 10px;
}

/* Modal footer */
.modal-footer {
    margin-top: 20px;
    display: block;
    justify-content: flex-end;
    /* default align right */
    gap: 10px;
    flex-wrap: wrap;
}

.modal-footer a {
    padding: 8px 22px;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
}

/* Modal heading */
#customModal h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Responsive: mobile */
@media (max-width: 500px) {
    .modal-footer {

        display: flex;

    }

    #customModal h3 {
        font-size: 1.1rem;
    }

    .modal-footer {
        justify-content: center;
        /* center all buttons */
        gap: 12px;
    }

    .modal-footer a {
        width: 80%;
        /* almost full width */
        font-size: 1.1rem;
    }

    .modal-footer a.decline {
        margin: 0;
        /* center align second button */
        font-size: 1rem;
        font-weight: 500;
    }
}