/* Consent and newsletter checkboxes for the pages that do not load main.css
   (onboarding, portal). The main.css pages get the same rules from
   stylesheets/components/_form-consultation.scss -- change both together. */

.privacy-policy__container,
.newsletter-subscribe__container {
    width: 100%;
    max-width: 320px;
    margin: 16px auto 0;
    text-align: left;
    white-space: normal;
}

.privacy-policy__container + .newsletter-subscribe__container {
    margin-top: 12px;
}

.privacy-policy__container .styled-checkbox + label,
.newsletter-subscribe__container .styled-checkbox + label {
    display: block;
    position: relative;
    min-height: 20px;
    padding-left: 30px;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    text-align: left;
}

.privacy-policy__container label a,
.newsletter-subscribe__container label a {
    display: inline;
    font-size: inherit;
    color: inherit;
    text-decoration: underline;
}

/* header.css turns hovered and focused links #222; keep the label colour */
.privacy-policy__container label a:hover,
.privacy-policy__container label a:focus,
.privacy-policy__container label a:active,
.newsletter-subscribe__container label a:hover,
.newsletter-subscribe__container label a:focus,
.newsletter-subscribe__container label a:active {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.privacy-policy__container label > span:empty,
.newsletter-subscribe__container label > span:empty {
    display: none;
}

.privacy-policy__container .styled-checkbox + label:before,
.newsletter-subscribe__container .styled-checkbox + label:before {
    position: absolute;
    left: 0;
    top: 0;
    box-sizing: border-box;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 2px solid #00aeef;
    border-radius: 3px;
    background: #fff;
}

.privacy-policy__container .styled-checkbox:hover + label:before,
.newsletter-subscribe__container .styled-checkbox:hover + label:before {
    background: #e3f2fd;
}

.privacy-policy__container .styled-checkbox:focus-visible + label:before,
.newsletter-subscribe__container .styled-checkbox:focus-visible + label:before {
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.35);
}

.privacy-policy__container .styled-checkbox:checked + label:before,
.newsletter-subscribe__container .styled-checkbox:checked + label:before {
    background: #00aeef;
}

.privacy-policy__container .styled-checkbox:checked + label:after,
.newsletter-subscribe__container .styled-checkbox:checked + label:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    background: none;
    box-shadow: none;
}

.privacy-policy__container .field-error-message {
    font-size: 14px;
}
