/*
    The card's blanket rule (.contact-form-card .form-group input) strips the
    border, background and background-repeat off every input inside a form
    group, including the consent checkbox. Bootstrap draws its tick as a
    background-image, so with repeat restored the tick tiled down the box and
    the box itself became invisible. The control is drawn from scratch here.
*/
.contact-form-card .form-group.form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-left: 0;
    margin-bottom: 26px;
}

.contact-form-card .form-group.form-check input.form-check-input {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    /* style.css sets a global min-height of 50px on every input, which
       otherwise stretches this box into a tall rectangle. */
    min-height: 0;
    margin: 1px 0 0;
    padding: 0;
    float: none;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid #b7b8dd;
    border-radius: 6px;
    background-color: #fff;
    background-image: none;
    box-shadow: none;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.contact-form-card .form-group.form-check input.form-check-input:hover {
    border-color: var(--color-primary, #7476ff);
}

.contact-form-card .form-group.form-check input.form-check-input:checked {
    border-color: var(--color-primary, #7476ff);
    background-color: var(--color-primary, #7476ff);
    background-image: none;
    position: relative;
}

/* The tick is drawn, not a background image, so nothing can tile it. */
.contact-form-card .form-group.form-check input.form-check-input:checked::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.contact-form-card .form-group.form-check input.form-check-input:focus-visible {
    outline: 2px solid var(--color-primary, #7476ff);
    outline-offset: 2px;
}

.contact-form-card .form-group.form-check input.form-check-input.is-invalid {
    border-color: #d63946;
}

.contact-form-card .form-group.form-check .form-check-label {
    margin: 0;
    font-size: 15px;
    line-height: 24px;
    color: var(--color-paragraph, #60616c);
    cursor: pointer;
}

.contact-form-card .form-group.form-check .alert-error {
    flex: 1 1 100%;
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #d63946;
}

@media (prefers-reduced-motion: reduce) {
    .contact-form-card .form-group.form-check input.form-check-input {
        transition: none;
    }
}
