
.tbtc_manager_checkout_enabled {

    #payment .wc_payment_method:not(.payment_method_cheque) {
        display: none;
    }

}

.tbtc_manager_checkout {
    .tbtc_manager_checkout_group {
        position: relative;

        &.tbtc_checkout_additional_buttons {
            margin-bottom: 8px;
        }

        @media (max-width: 480px) {
            grid-template-columns: 1fr;

            .tbtc-checkout-input-grid,
            &.cheque_container,
            &.worldpay_container {
                grid-template-columns: 1fr !important;
            }

            &.tbtc_checkout_gift_aid_parent {
                display: grid;
            }
        }

        &.cheque_container, &.worldpay_container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2em;

            label {
                font-size: 1rem;
                margin-bottom: 8px;
                font-weight: bold;
            }
        }

        .tbtc_checkout_close {
            position: absolute;
            width: 30px;
            height: 30px;
            color: var(--color-red);
            top: 10px;
            right: 10px;
            cursor: pointer;

            * {
                pointer-events: none;
            }
        }
    }

    .tbtc_checkout_donation_parent, .tbtc_checkout_gift_aid_parent {
        background: white;
        border-radius: 8px;
        box-sizing: border-box;
        box-shadow: var(--box-shadow-default);
        padding: 20px;
        margin-bottom: 20px;

        input[type="date"] {
            width: fit-content;
        }

        .tbtc_manager_checkout_field.form-row .woocommerce-input-wrapper > label {
            border: 3px solid #dcd7e2;
            box-shadow: none;

            &:not(:has(input:checked)):hover {
                border-color: #f4f4f4;
            }
        }

        #tbtc_gift_aid_field {
            position: relative;

            label.radio-label {
                padding: 10px 16px;

                svg {
                    height: 33px;
                    width: 33px;
                }
            }

            input {
                position: absolute;
                opacity: 0;
                left: 0;
                top: 0;
                width: 0;
                height: 0;
            }
        }

        #tbtc_donation_amount_field > span {
            display: flex;
            flex-direction: row;
            align-items: center;
        
            &::before {
                content: '£';
                position: relative;
                display: inline-block;
                margin-right: 4px;
                font-size: 1.15em;
            }
        }
    }

    .tbtc_manager_checkout_field.form-row {

        span.required {
            display: none;
        }

        & > label.radio {
            font-size: 1rem;
            margin-bottom: 8px;
            font-weight: bold;
            
        }

        &.tbtc_add_button .woocommerce-input-wrapper {
            label {
                position: relative;

                &:not(:first-of-type) {
                    display: none;
                }

                input {
                    opacity: 0;
                    position: absolute;
                    width: 0;
                    height: 0;
                    left: 0;
                }
            }
        }

        .woocommerce-input-wrapper {
            display: flex;
            flex-direction: column;
            position: relative;
            padding-right: 8px;

            label {
                background: white;
                display: flex;
                align-items: center;
                margin-bottom: 8px;
                padding: 14px 16px;
                border-radius: 8px;
                border: 3px solid rgba(0,0,0,0);
                cursor: pointer;
                user-select: none;
                accent-color: var(--color-teal-dark);
                box-shadow: var(--box-shadow-default);

                &:not(:has(input:checked)):hover {
                    background: #f4f4f4;
                    outline: 3px solid var(--color-teal-dark);
                }

                svg {
                    flex-grow: 0;
                    width: 36px;
                    height: 36px;
                }

                input {
                    order: 2;
                    width: 18px;
                    aspect-ratio: 1/1;;
                }

                /* Options that have an icon */
                svg ~ span {
                    margin-left: 18px;
                }

                span.option-text {
                    flex-grow: 1;
                    order: 1;
                    display: flex;
                    flex-direction: column;
                    line-height: 1.5;

                    span:first-of-type {
                        font-weight: bold;
                    }

                    small.option-desc {
                        order: 2;
                        line-height: inherit;
                    }
                }

                &:has(input:checked) {
                    border: 3px solid var(--color-teal-dark);
                    background: var(--color-teal-base);
                }
            }
        }
    }
}