.wcad-custom-charge-form {
    background: #eee;
    border-radius: 10px;
    padding: 1em;
}

.wcad-custom-charge-form .wcad-charge-modes {
    border: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 0;
}

.wcad-charge-modes label {
    position: relative;
    cursor: pointer;
}

.wcad-charge-modes input {
    position: absolute;
    opacity: 0;
}

.wcad-charge-modes input:checked + span {
    background: var(--bs-primary, #175ee5);
    color: #fff;
}

.wcad-charge-modes input:focus-visible + span {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.wcad-charge-switch {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}

.wcad-charge-switch input {
    position: absolute;
    opacity: 0;
}

.wcad-charge-switch__control {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border-radius: 999px;
    background: #b7b7b7;
    transition: background-color .2s ease;
}

.wcad-charge-switch__control::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .2s ease;
}

.wcad-charge-switch input:checked + .wcad-charge-switch__control {
    background: var(--bs-primary, #175ee5);
}

.wcad-charge-switch input:checked + .wcad-charge-switch__control::after {
    transform: translateX(18px);
}

.wcad-charge-switch input:focus-visible + .wcad-charge-switch__control {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.wcad-charge-field input,
.wcad-charge-field select {
    width: 100%;
    padding: .625rem 1rem;
}

.wcad-charge-field label {
    display: block;
    margin-bottom: 6px;
}

.wcad-charge-error {
    color: #b32d2e;
    margin-bottom: .5rem;
}

.wcad-custom-charge-form [type="submit"]:disabled {
    opacity: .6;
    cursor: wait;
}

.wcad-custom-charge-form .customCharge__image_wrapper {
    position: relative;
}

.wcad-custom-charge-form .customCharge__image {
    transition: opacity .2s ease;
}

.wcad-charge-loading {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
}

.wcad-custom-charge-form[aria-busy="true"] .wcad-charge-loading {
    display: flex;
}

.wcad-custom-charge-form[aria-busy="true"] .customCharge__image {
    opacity: .35;
}

.wcad-charge-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(23, 94, 229, .2);
    border-top-color: var(--bs-primary, #175ee5);
    border-radius: 50%;
    animation: wcad-charge-spin .75s linear infinite;
}

@keyframes wcad-charge-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .wcad-charge-spinner {
        animation-duration: 1.5s;
    }
}
