/* ============== Donation card with tabs (Gust component form__donate_tabs) ============== */

.jj-donate__tabs {
    display: flex;
    border-bottom: 1px solid #E0E0E0;
    margin-bottom: 1rem;
}

.jj-donate .jj-donate__tab {
    flex: 1;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    padding: 0.5rem;
    font-family: 'Open sans';
    font-size: 14px;
    color: #737373;
    cursor: pointer;
}

.jj-donate .jj-donate__tab:hover {
    color: #333;
}

.jj-donate .jj-donate__tab[aria-selected="true"] {
    border-bottom-color: #009CDE;
    color: #009CDE;
    font-weight: 700;
}

.jj-donate .jj-donate__tab:focus-visible {
    outline: 2px solid #009CDE;
    outline-offset: -2px;
}

.jj-donate__panel[hidden] {
    display: none;
}

/* Step counter at the top of the card, so it does not collide with the logos */
.jj-donate form.form-donate .gf_progressbar_wrapper {
    position: static;
    margin-bottom: 0.75rem;
}

/* The tabs replace the link between the private and business form */
.jj-donate .gfield:has(> .form-link),
.jj-donate .form-link {
    display: none;
}

.jj-donate__logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.jj-donate__logos img {
    width: auto;
    height: 48px;
}

/* ============== Mobile: choices as tiles in two columns ============== */

@media screen and (max-width: 767px) {
    .jj-donate form.form-donate .gfield_radio {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.625rem;
    }

    .jj-donate form.form-donate .gfield_radio .gchoice {
        display: flex;
        position: relative;
        margin: 0;
    }

    /* column-reverse puts the description above the amount */
    .jj-donate form.form-donate .gfield_radio .gchoice label {
        display: flex;
        flex-direction: column-reverse;
        justify-content: center;
        align-items: center;
        gap: 0.125rem;
        position: relative;
        width: 100%;
        max-width: 100%;
        min-height: 3rem;
        margin: 0;
        padding: 0.75rem 0.5rem;
        border: 1px solid #E0E0E0;
        border-radius: 12px;
        font-family: 'Open sans';
        font-size: 14px;
        text-align: center;
        text-decoration: none;
        color: #333;
        cursor: pointer;
    }

    .jj-donate form.form-donate .gfield_radio .gchoice label::before {
        display: none;
    }

    .jj-donate form.form-donate .gfield_radio .gchoice input[type=radio]:checked~label {
        background-color: #009CDE;
        border-color: #009CDE;
        color: #fff;
    }

    .jj-donate form.form-donate .gfield_radio .gchoice input[type=radio]:checked~label b {
        color: #fff;
    }

    /* Heart badge on the selected tile */
    .jj-donate form.form-donate .gfield_radio .gchoice input[type=radio]:checked~label::after {
        content: '\2665\FE0E';
        position: absolute;
        top: -10px;
        right: -8px;
        left: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        border: 2px solid #fff;
        border-radius: 50%;
        background-color: #009CDE;
        color: #fff;
        font-size: 11px;
        line-height: 1;
    }

    /* !important: the Gravity Forms theme sets the button width with higher specificity */
    .jj-donate form.form-donate .gform_page_footer .gform_next_button {
        width: 100% !important;
    }
}
