/* Cookie consent banner, preferences modal, privacy choices buttons and the privacy request form. */
:root {
    --cf-privacy-accent: #77c34a;
    --cf-privacy-accent-dark: #629f3d;
    --cf-privacy-ink: #000;
    --cf-privacy-muted: #56646b;
    --cf-privacy-line: #e8eff3;
}

/* The author rule display: flex / grid on these elements would otherwise beat the hidden attribute. */
.cf-consent[hidden],
.cf-modal[hidden],
.privacy-request [hidden] {
    display: none !important;
}

/* ---- shared buttons ---- */
.cf-btn,
.privacy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 28px;
    border: 1px solid var(--cf-privacy-accent);
    border-radius: 5px;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color .3s, border-color .3s, color .3s;
}

.cf-btn--solid,
.privacy-btn--primary {
    background: var(--cf-privacy-accent);
    color: #fff;
}

.cf-btn--solid:hover,
.privacy-btn--primary:hover {
    background: #fff;
    border-color: var(--cf-privacy-accent);
    color: var(--cf-privacy-ink);
}

.cf-btn--outline {
    background: #fff;
    color: var(--cf-privacy-ink);
}

.cf-btn--outline:hover {
    background: var(--cf-privacy-accent);
    color: #fff;
}

.cf-btn:focus-visible,
.privacy-btn:focus-visible,
.cf-modal__close:focus-visible,
.privacy-action:focus-visible {
    outline: 3px solid #37651f;
    outline-offset: 2px;
}

.privacy-btn:disabled {
    opacity: .6;
    cursor: wait;
}

/* ---- banner ---- */
.cf-consent {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483000;
    padding: 12px;
    pointer-events: none;
}

.cf-consent__inner {
    pointer-events: auto;
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
    padding: 16px 20px;
    background: #fff;
    color: var(--cf-privacy-ink);
    border: 1px solid var(--cf-privacy-line);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(32, 48, 39, .12);
}

.cf-consent__text h2 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}

.cf-consent__text p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--cf-privacy-muted);
}

.cf-consent__links {
    margin-top: 6px !important;
}

.cf-consent__links a {
    margin-right: 14px;
    color: var(--cf-privacy-ink);
    text-decoration: underline;
}

.cf-consent__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

@media (min-width: 861px) and (max-width: 1100px) {
    .cf-consent__inner {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 860px) {
    .cf-consent {
        padding: 8px;
    }

    .cf-consent__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
        max-height: 85vh;
        overflow-y: auto;
    }

    .cf-consent__actions {
        flex-direction: column;
    }

    .cf-consent__actions .cf-btn {
        width: 100%;
    }
}

/* ---- modal ---- */
.cf-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 28, .55);
}

.cf-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 620px;
    max-height: calc(100vh - 32px);
    background: #fff;
    color: var(--cf-privacy-ink);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
    outline: none;
}

.cf-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--cf-privacy-line);
}

.cf-modal__head h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.cf-modal__close {
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--cf-privacy-muted);
}

.cf-modal__body {
    padding: 18px 22px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
}

.cf-modal__body a {
    color: #37651f;
    text-decoration: underline;
}

.cf-modal__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 22px;
    border-top: 1px solid var(--cf-privacy-line);
}

.cf-cat {
    padding: 14px 0;
    border-bottom: 1px solid var(--cf-privacy-line);
}

.cf-cat:last-child {
    border-bottom: 0;
}

.cf-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cf-cat h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.cf-cat p {
    margin: 6px 0 0;
    color: var(--cf-privacy-muted);
}

.cf-cat .cf-cat__note {
    color: var(--cf-privacy-ink);
}

.cf-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.cf-switch.is-disabled {
    cursor: default;
    opacity: .75;
}

.cf-switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.cf-switch__ui {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #c5cbcf;
    transition: background-color .2s;
}

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

.cf-switch input:checked + .cf-switch__ui {
    background: var(--cf-privacy-accent);
}

.cf-switch input:checked + .cf-switch__ui::after {
    transform: translateX(18px);
}

.cf-switch input:focus-visible + .cf-switch__ui {
    outline: 3px solid #37651f;
    outline-offset: 2px;
}

html.cf-modal-open {
    overflow: hidden;
}

@media (max-width: 560px) {
    .cf-modal {
        padding: 0;
        align-items: flex-end;
    }

    .cf-modal__dialog {
        max-height: 92vh;
        border-radius: 10px 10px 0 0;
    }

    .cf-modal__foot {
        flex-direction: column;
    }

    .cf-modal__foot .cf-btn {
        width: 100%;
    }
}

/* ---- toast ---- */
.cf-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 2147483200;
    max-width: calc(100vw - 32px);
    padding: 12px 20px;
    border-radius: 8px;
    background: #2b2e31;
    color: #fff;
    font-size: 14px;
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s, transform .25s;
}

.cf-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---- buttons placed inside legal pages from the CRM ---- */
.text-content a.privacy-action {
    display: inline-flex;
    width: auto;
    height: auto;
    min-height: 40px;
    margin: 4px 0 12px;
    padding: 10px 20px;
    white-space: normal;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.text-content .privacy-status,
.text-content .privacy-gpc-status {
    margin: 12px 0 20px;
    padding: 16px 20px;
    border: 1px solid var(--cf-privacy-line);
    border-radius: 8px;
    background: #fafbfb;
}

.privacy-status h3 {
    margin: 12px 0 6px;
}

.privacy-status h3:first-child {
    margin-top: 0;
}

.privacy-status__note {
    margin-top: 10px;
    color: var(--cf-privacy-muted);
}

/* ---- privacy request form ---- */
.privacy-request__card {
    max-width: 930px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border-radius: 12px;
    color: var(--cf-privacy-ink);
}

.privacy-request__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    margin-bottom: 16px;
}

.privacy-field {
    margin-bottom: 16px;
}

.privacy-request__grid .privacy-field {
    margin-bottom: 0;
}

.privacy-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

.privacy-field label span {
    color: var(--cf-privacy-muted);
    font-weight: 400;
}

.privacy-field input[type="text"],
.privacy-field input[type="email"],
.privacy-field input[type="tel"],
.privacy-field select,
.privacy-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #c9cfd3;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--cf-privacy-ink);
}

.privacy-field input:focus-visible,
.privacy-field select:focus-visible,
.privacy-field textarea:focus-visible {
    outline: 3px solid #1a73e8;
    outline-offset: 1px;
}

.privacy-field--check label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-weight: 400;
}

.privacy-field--check input {
    margin-top: 4px;
    flex-shrink: 0;
}

.privacy-field__error,
.privacy-request__error {
    min-height: 0;
    margin: 4px 0 0;
    font-size: 13px;
    color: #c62828;
}

.privacy-field__error:empty {
    display: none;
}

.privacy-request__notice {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--cf-privacy-muted);
}

.privacy-request__notice a {
    color: var(--cf-privacy-accent);
    text-decoration: underline;
}

.privacy-request__form {
    margin-top: 16px;
}

.privacy-request__done {
    padding: 8px 0;
}

.privacy-request__done h2 {
    margin: 0 0 12px;
}

.privacy-request__id {
    font-size: 20px;
}

@media (max-width: 700px) {
    .privacy-request__card {
        padding: 20px 16px;
    }

    .privacy-request__grid {
        grid-template-columns: 1fr;
    }

    .privacy-btn {
        width: 100%;
    }
}

/* Live ON / OFF value inside legal headings */
.privacy-state {
    font-weight: 700;
}
