/* Stable consent checkbox and validation message.
 * jQuery Validate inserts label.error directly after the input, therefore
 * the visible consent label must be selected as a general sibling. */
.agree {
    position: relative;
    min-height: 44px;
    padding-bottom: 22px;
}

.agree .custom-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    opacity: 0;
    z-index: auto;
}

.agree .custom-checkbox ~ label:not(.error) {
    display: inline-block;
    line-height: 1.35;
    cursor: pointer;
    user-select: none;
}

.agree .custom-checkbox ~ label:not(.error)::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin: 1px .55em 0 0;
    flex: 0 0 18px;
    border: 1px solid #8f8f93;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 10px 10px;
    vertical-align: top;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.agree .custom-checkbox:not(:disabled):not(:checked) ~ label:not(.error):hover::before {
    border-color: #476cba;
    background-color: #f7f9fd;
}

.agree .custom-checkbox:focus-visible ~ label:not(.error)::before {
    border-color: #476cba;
    box-shadow: 0 0 0 3px rgba(71, 108, 186, .2);
}

.agree .custom-checkbox:checked ~ label:not(.error)::before {
    border-color: #476cba;
    background-color: #476cba;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

.agree .custom-checkbox:disabled ~ label:not(.error)::before {
    background-color: #eceef2;
    cursor: not-allowed;
}

.agree .custom-checkbox + label.error::before {
    content: none;
    display: none;
}

.agree > label.error {
    display: block;
    position: absolute;
    left: 0;
    top: auto;
    bottom: 0;
    margin: 0;
    line-height: 1.25;
}
