/* =========================================
   MODAL OVERLAY
   ========================================= */

.custom-modal {
    display: none;
    position: fixed;
    z-index: 99999;

    inset: 0;

    width: 100%;
    height: 100%;

    /* Dark transparent background */
    background: rgba(0, 0, 0, 0.35);

    /* Center the modal */
    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    box-sizing: border-box;

    overflow-y: auto;
}


/* =========================================
   MODAL BOX
   ========================================= */

.custom-modal-content {
    position: relative;

    width: 90%;
    max-width: 600px;

    /* Semi-transparent white */
    background: rgba(255, 255, 255, 0.92);

    padding: 40px 30px;

    border-radius: 20px;

    box-sizing: border-box;

    text-align: center;

    /* Shadow */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);

    /* Prevent it from becoming too tall */
    max-height: 90vh;
    overflow-y: auto;
}


/* =========================================
   HEADING
   ========================================= */

.custom-modal-content h1 {
    margin: 0 0 35px 0;

    color: #172b4d;

    font-size: 36px;

    line-height: 1.3;
}


/* =========================================
   CLOSE BUTTON
   ========================================= */

.custom-close {
    position: absolute;

    right: 15px;
    top: 8px;

    color: #000;

    font-size: 35px;
    font-weight: bold;

    line-height: 1;

    cursor: pointer;

    z-index: 10;
}

.custom-close:hover {
    color: red;
}


/* =========================================
   BUTTON AREA
   ========================================= */

.modal-buttons {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 15px;

    flex-wrap: wrap;
}


/* =========================================
   BUTTONS
   ========================================= */

.modal-buttons a {
    display: inline-block;

    padding: 12px 25px;

    text-decoration: none;

    min-width: 170px;

    box-sizing: border-box;
}


/* =========================================
   MOBILE
   ========================================= */

@media screen and (max-width: 480px) {

    .custom-modal {
        padding: 15px;
    }

    .custom-modal-content {
        width: 90%;

        max-width: none;

        padding: 35px 20px;

        border-radius: 18px;

        max-height: 90vh;
    }

    .custom-modal-content h1 {
        font-size: 28px;

        margin-bottom: 30px;
    }

    .modal-buttons {
        flex-direction: column;

        gap: 15px;
    }

    .modal-buttons a {
        width: 100%;

        max-width: 250px;
    }

    .custom-close {
        right: 12px;
        top: 8px;

        font-size: 30px;
    }
}


/* =========================================
   VERY SMALL MOBILE
   ========================================= */

@media screen and (max-width: 300px) {

    .custom-modal {
        padding: 10px;
    }

    .custom-modal-content {
        width: 90%;

        padding: 30px 15px;

        border-radius: 15px;
    }

    .custom-modal-content h1 {
        font-size: 24px;
    }

    .modal-buttons a {
        max-width: 100%;
    }
}