/* consentBanner.css — Syndesi cookie / consent banner (added 2026-09-29, per Anthony).
   Accept and Reject are styled the same on purpose (GDPR: equal prominence). */

.syndesi-consent[hidden] { display: none !important; }

.syndesi-consent {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483000; /* above the chat bubble */
    display: flex;
    justify-content: center;
    pointer-events: none;
}
.syndesi-consent-inner {
    pointer-events: auto;
    width: 100%;
    max-width: 720px;
    box-sizing: border-box;
    background: var(--color-white);
    color: var(--color-secondary);
    border-top: 4px solid var(--color-primary);
    border-radius: 8px;
    box-shadow: 0 6px 28px rgba(var(--color-shadow-rgb), 0.18);
    padding: 20px 24px;
    font-family: var(--font-body);
    font-size: calc(10.5pt * var(--lang-font-scale));
    line-height: 1.55;
}
.syndesi-consent-title {
    font-family: var(--font-elegant);
    font-weight: 700;
    font-size: calc(13pt * var(--lang-font-scale));
    color: var(--color-primary);
    margin: 0 0 8px 0;
}
.syndesi-consent-text { margin: 0 0 16px 0; }
/* 2026-10-17: title + language flags on one line. */
.syndesi-consent-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 8px 0; }
.syndesi-consent-head .syndesi-consent-title { margin: 0; }
.syndesi-consent-head .lang-switcher { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.syndesi-consent-head .lang-switcher li { margin: 0; padding: 0; line-height: 0; }
.syndesi-consent-head .lang-switcher a,
.syndesi-consent-head .lang-switcher span { display: inline-block; padding: 3px; border-radius: 3px; border-bottom: 2px solid transparent; }
.syndesi-consent-head .lang-switcher .is-current span { border-bottom-color: var(--color-primary); }
.syndesi-consent-head .lang-switcher a:hover { background: rgba(var(--color-primary-rgb), 0.1); }
.syndesi-consent-head .lang-switcher a:focus-visible { outline: 2px solid var(--color-highlight); outline-offset: 2px; }
.syndesi-consent-head .lang-flag { width: 24px; height: 16px; display: block; box-shadow: 0 0 0 1px rgba(var(--color-shadow-rgb), 0.15); }
.syndesi-consent-text a {
    color: var(--color-primary);
    text-decoration: underline;
    white-space: nowrap;
}
.syndesi-consent-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

/* 2026-10-17: "Customize" + settings view (one switch per service). */
.syndesi-consent-buttons { align-items: center; }
.syndesi-consent-customize { margin-right: auto; }
.syndesi-consent-settings[hidden], .syndesi-consent-inner > [hidden] { display: none !important; }
.syndesi-consent-inner { max-height: calc(100vh - 32px); overflow-y: auto; }
.syndesi-consent-list { list-style: none; margin: 0 0 16px 0; padding: 0; border-top: 1px solid rgba(var(--color-primary-rgb), 0.18); }
.syndesi-consent-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.18);
}
.syndesi-consent-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; cursor: pointer; }
.syndesi-consent-row-text span { font-size: 0.92em; opacity: 0.85; }
.syndesi-consent-always { font-size: 0.9em; color: var(--color-primary); white-space: nowrap; }
.syndesi-consent-switch {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto;
    width: 44px;
    height: 24px;
    margin: 0;
    border-radius: 9999px;
    background: rgba(var(--color-shadow-rgb), 0.25);
    position: relative;
    cursor: pointer;
    transition: background 0.15s;
}
.syndesi-consent-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-white);
    box-shadow: 0 1px 3px rgba(var(--color-shadow-rgb), 0.3);
    transition: transform 0.15s;
}
.syndesi-consent-switch:checked { background: var(--color-primary); }
.syndesi-consent-switch:checked::after { transform: translateX(20px); }
.syndesi-consent-switch:focus-visible { outline: 2px solid var(--color-highlight); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .syndesi-consent-switch, .syndesi-consent-switch::after { transition: none; } }

/* Shared pill button (banner + "blocked" messages) */
.syndesi-consent-btn {
    cursor: pointer;
    font-family: var(--font-button);
    font-size: calc(11pt * var(--lang-font-scale));
    line-height: 1.2;
    color: var(--color-white);
    background: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 9999px;
    padding: 0.55em 1.6em;
    min-width: 10em;
    white-space: nowrap;
}
.syndesi-consent-btn:hover { filter: brightness(0.92); }
.syndesi-consent-btn:focus-visible,
.syndesi-consent-link:focus-visible {
    outline: 2px solid var(--color-highlight);
    outline-offset: 2px;
}
.syndesi-consent-btn--small {
    min-width: 0;
    padding: 0.4em 1.2em;
    font-size: calc(10.5pt * var(--lang-font-scale));
}
.syndesi-consent-link {
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0.4em 0.2em;
    color: var(--color-primary);
    text-decoration: underline;
    font: inherit;
}

@media screen and (max-width: 600px) {
    .syndesi-consent { left: 8px; right: 8px; bottom: 8px; }
    .syndesi-consent-inner { padding: 16px; }
    .syndesi-consent-buttons { justify-content: stretch; }
    .syndesi-consent-buttons .syndesi-consent-btn { flex: 1 1 0; min-width: 0; }
    .syndesi-consent-customize { flex: 1 1 100%; margin: 0; text-align: center; }
}

/* "Blocked" message shown where a service would be (Calendly, chat, reCAPTCHA) */
.syndesi-consent-blocked {
    border: 1px dashed var(--color-primary);
    border-radius: 8px;
    padding: 14px 16px;
    margin: 0 0 16px 0;
    background: rgba(var(--color-primary-rgb), 0.06);
    color: var(--color-secondary);
    font-size: calc(10pt * var(--lang-font-scale));
    line-height: 1.5;
    text-align: left;
}
.syndesi-consent-blocked-text { margin: 0 0 10px 0; }
.syndesi-consent-blocked-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.syndesi-consent-blocked.is-flash { animation: syndesi-consent-flash 1.2s ease 2; }
@keyframes syndesi-consent-flash {
    0%, 100% { box-shadow: 0 0 0 0 rgba(var(--color-highlight-rgb), 0); }
    50% { box-shadow: 0 0 0 4px rgba(var(--color-highlight-rgb), 0.45); }
}
@media (prefers-reduced-motion: reduce) {
    .syndesi-consent-blocked.is-flash { animation: none; outline: 2px solid var(--color-highlight); }
}

/* 2026-10-17: "Allow <service>" box in place of a held-back video / embed. It fills
   the player's frame, which keeps its size (the player itself is only made invisible). */
.syndesi-consent-blocked--embed {
    position: absolute;
    inset: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: auto;
}

/* 2026-09-29: the theme's .chat-trigger-button sets display:block, which beat the
   [hidden] attribute, so the "Open chat" button stayed visible (and opened
   onWebChat's own page in a new tab) even after "Reject all". */
#open-chat-btn[hidden] { display: none !important; }

/* 2026-10-17: floating cookie button, bottom-left (the chat bubble and Google's
   reCAPTCHA badge sit bottom-right). Same brand colours as the banner. */
.syndesi-consent-fab {
    position: fixed;
    left: calc(16px + env(safe-area-inset-left, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 2147482000; /* under the banner, over the page */
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: 0 3px 12px rgba(var(--color-shadow-rgb), 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.syndesi-consent-fab:hover { background: var(--color-primary); color: var(--color-white); }
.syndesi-consent-fab:focus-visible { outline: 2px solid var(--color-highlight); outline-offset: 2px; }
/* Out of the way while the banner itself is open. */
.syndesi-consent:not([hidden]) ~ .syndesi-consent-fab { display: none; }
@media screen and (max-width: 600px) {
    .syndesi-consent-fab { width: 42px; height: 42px; left: calc(10px + env(safe-area-inset-left, 0px)); bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
}

/* Footer "Cookie settings" link */
.footer-links a[data-consent-open] { cursor: pointer; }

@media print {
    .syndesi-consent, .syndesi-consent-blocked, .syndesi-consent-fab { display: none !important; }
}
