/*
 * Frebix Consent — banner and preferences. Accept and Reject always look the same.
 *
 * The root carries: fc-style-{clear|soft|minimal|bold|classic}, fc-theme-{light|dark|auto},
 * fc-pos-{corner|bar|center}, fc-corners-{square|soft|round}, fc-btns-{fill|line}, fc-font-{system|site}.
 * Change any of these variables in Custom CSS: --fc-accent, --fc-accent-ink, --fc-bg, --fc-ink, --fc-ink-2,
 * --fc-line, --fc-card-bg, --fc-card-ink, --fc-card-ink-2, --fc-radius, --fc-btn-radius, --fc-shadow.
 */
.fc-root {
    --fc-accent: var(--fc-accent-set, #18181b);
    --fc-accent-ink: var(--fc-accent-ink-set, #ffffff);
    --fc-bg: #ffffff;
    --fc-ink: #18181b;
    --fc-ink-2: rgba(24, 24, 27, .68);
    --fc-line: rgba(0, 0, 0, .1);
    --fc-btn: rgba(0, 0, 0, .05);
    --fc-btn-hover: rgba(0, 0, 0, .09);
    --fc-shadow: 0 18px 50px -18px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .06);
    --fc-radius: 16px;
    --fc-btn-radius: 10px;
    --fc-heading-font: inherit;
    /* The banner card (the preferences window always uses bg/ink) */
    --fc-card-bg: var(--fc-bg);
    --fc-card-ink: var(--fc-ink);
    --fc-card-ink-2: var(--fc-ink-2);
    --fc-card-shadow: var(--fc-shadow);
    font-family: inherit; font-size: 14px; line-height: 1.55; font-weight: 400;
    color: var(--fc-ink);
    -webkit-font-smoothing: antialiased;
}
.fc-root.fc-font-system { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif; --fc-heading-font: inherit; }
.fc-root.fc-theme-dark {
    --fc-bg: #18181b; --fc-ink: #f4f4f5; --fc-ink-2: rgba(244, 244, 245, .7); --fc-line: rgba(255, 255, 255, .12);
    --fc-btn: rgba(255, 255, 255, .08); --fc-btn-hover: rgba(255, 255, 255, .14);
    --fc-shadow: 0 18px 50px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
}
@media (prefers-color-scheme: dark) {
    .fc-root.fc-theme-auto {
        --fc-bg: #18181b; --fc-ink: #f4f4f5; --fc-ink-2: rgba(244, 244, 245, .7); --fc-line: rgba(255, 255, 255, .12);
        --fc-btn: rgba(255, 255, 255, .08); --fc-btn-hover: rgba(255, 255, 255, .14);
        --fc-shadow: 0 18px 50px -18px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
    }
}

/* A near-black accent on a dark banner turns near-white, so the buttons still show */
.fc-root.fc-theme-dark.fc-accent-dark:not(.fc-style-bold):not(.fc-style-classic) { --fc-accent: #f4f4f5; --fc-accent-ink: #18181b; }
@media (prefers-color-scheme: dark) { .fc-root.fc-theme-auto.fc-accent-dark:not(.fc-style-bold):not(.fc-style-classic) { --fc-accent: #f4f4f5; --fc-accent-ink: #18181b; } }

/* Corners */
.fc-root.fc-corners-square { --fc-radius: 4px; --fc-btn-radius: 6px; }
.fc-root.fc-corners-round { --fc-radius: 26px; --fc-btn-radius: 999px; }

.fc-root *, .fc-root *::before, .fc-root *::after { box-sizing: border-box; }
.fc-root .fc-title { margin: 0; font-family: var(--fc-heading-font); font-size: 16px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; color: inherit; }
.fc-root p { margin: 6px 0 0; color: var(--fc-ink-2); font-size: 13.5px; }
.fc-root a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.fc-root button { font: inherit; }
.fc-root .fc-btn, .fc-root .fc-link { font-weight: 600; font-size: 14px; }
.fc-style-minimal .fc-banner .fc-btn { font-size: 13.5px; }

/* Buttons: Accept and Reject always share one look */
.fc-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border: 1.5px solid var(--fc-accent); border-radius: var(--fc-btn-radius); background: var(--fc-accent); color: var(--fc-accent-ink); font-weight: 600; font-size: 14px; line-height: 1.2; cursor: pointer; transition: background .15s, border-color .15s, filter .15s; white-space: nowrap; }
.fc-btn:hover { filter: brightness(1.08); }
.fc-btns-line .fc-btn { background: transparent; color: var(--fc-card-ink); border-color: var(--fc-line); border-color: color-mix(in srgb, var(--fc-card-ink) 28%, transparent); }
.fc-btns-line .fc-btn:hover { filter: none; background: var(--fc-btn); }
.fc-btn.is-primary, .fc-btns-line .fc-btn.is-primary { background: var(--fc-accent); border-color: var(--fc-accent); color: var(--fc-accent-ink); }
.fc-link { padding: 6px 2px; border: 0; background: none; color: inherit; font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fc-root :focus-visible { outline: 2px solid var(--fc-accent); outline-offset: 2px; }

/* Banner */
.fc-banner { position: fixed; z-index: 2147483000; background: var(--fc-card-bg); color: var(--fc-card-ink); box-shadow: var(--fc-card-shadow); border-radius: var(--fc-radius); padding: 20px; opacity: 0; transform: translateY(16px); transition: opacity .3s cubic-bezier(.16, 1, .3, 1), transform .3s cubic-bezier(.16, 1, .3, 1); }
.fc-banner p { color: var(--fc-card-ink-2); }
.fc-banner.is-in { opacity: 1; transform: none; }
.fc-banner.is-leaving { opacity: 0; transform: translateY(12px); }
.fc-banner__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.fc-banner__actions .fc-btn { flex: 1 1 0; }
.fc-banner__actions .fc-link { flex-basis: 100%; text-align: center; }
.fc-mark { display: none; }
.fc-pos-corner .fc-banner { left: 20px; bottom: 20px; width: min(400px, calc(100vw - 40px)); }
.fc-pos-bar .fc-banner { left: 20px; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 24px; padding: 18px 22px; }
.fc-pos-bar .fc-banner__text { flex: 1; min-width: 0; }
.fc-pos-bar .fc-banner__actions { margin: 0; flex-wrap: nowrap; }
.fc-pos-bar .fc-banner__actions .fc-link { flex-basis: auto; }
.fc-pos-center .fc-banner { left: 50%; top: 50%; width: min(460px, calc(100vw - 32px)); transform: translate(-50%, calc(-50% + 16px)); }
.fc-pos-center .fc-banner.is-in { transform: translate(-50%, -50%); }

/* Style: Soft — tinted with the accent, roomy, a small shield */
.fc-style-soft { --fc-card-bg: var(--fc-bg); --fc-card-bg: color-mix(in srgb, var(--fc-accent) 7%, var(--fc-bg)); --fc-card-shadow: 0 24px 60px -24px rgba(0, 0, 0, .35); --fc-card-shadow: 0 24px 60px -24px color-mix(in srgb, var(--fc-accent) 45%, transparent); }
.fc-style-soft.fc-theme-dark { --fc-card-bg: color-mix(in srgb, var(--fc-accent) 16%, var(--fc-bg)); }
@media (prefers-color-scheme: dark) { .fc-style-soft.fc-theme-auto { --fc-card-bg: color-mix(in srgb, var(--fc-accent) 16%, var(--fc-bg)); } }
.fc-style-soft .fc-banner { padding: 22px; }
.fc-style-soft .fc-mark { display: grid; place-items: center; flex: none; width: 36px; height: 36px; margin-bottom: 12px; border-radius: 12px; background: var(--fc-btn); background: color-mix(in srgb, var(--fc-accent) 16%, transparent); color: var(--fc-accent); }
.fc-style-soft.fc-theme-dark .fc-mark { color: color-mix(in srgb, var(--fc-accent) 55%, #fff); }
.fc-style-soft.fc-pos-bar .fc-mark { margin: 0; }

/* Style: Minimal — one slim line flush with the bottom edge */
.fc-style-minimal { --fc-card-shadow: none; }
.fc-style-minimal.fc-pos-corner .fc-banner, .fc-style-minimal.fc-pos-bar .fc-banner {
    left: 0; right: 0; bottom: 0; width: auto; display: flex; align-items: center; gap: 24px; border-radius: 0; border-top: 1px solid var(--fc-line);
    padding: 14px max(24px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
}
.fc-style-minimal .fc-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fc-style-minimal .fc-banner p { margin: 0; color: var(--fc-card-ink); }
.fc-style-minimal .fc-banner__text { flex: 1; min-width: 0; }
.fc-style-minimal .fc-banner__actions { margin: 0; flex-wrap: nowrap; }
.fc-style-minimal .fc-banner__actions .fc-btn { flex: none; min-height: 36px; padding: 0 14px; }
.fc-style-minimal .fc-banner__actions .fc-link { flex-basis: auto; order: -1; }
.fc-style-minimal.fc-pos-center .fc-banner { border: 1px solid var(--fc-line); }
.fc-style-minimal.fc-pos-center .fc-banner__actions { margin-top: 14px; flex-wrap: wrap; }

/* Style: Bold — the accent is the card, big title */
.fc-style-bold { --fc-card-bg: var(--fc-accent); --fc-card-ink: var(--fc-accent-ink); --fc-card-ink-2: var(--fc-accent-ink); --fc-card-ink-2: color-mix(in srgb, var(--fc-accent-ink) 80%, transparent); --fc-card-shadow: 0 30px 70px -24px rgba(0, 0, 0, .55); --fc-card-shadow: 0 30px 70px -24px color-mix(in srgb, var(--fc-accent) 70%, #000); }
.fc-style-bold .fc-banner { padding: 26px; }
.fc-style-bold .fc-banner .fc-title { font-size: 22px; line-height: 1.2; }
.fc-style-bold .fc-banner .fc-btn { background: var(--fc-accent-ink); border-color: var(--fc-accent-ink); color: var(--fc-accent); }
.fc-style-bold.fc-btns-line .fc-banner .fc-btn { background: transparent; color: var(--fc-accent-ink); border-color: color-mix(in srgb, var(--fc-accent-ink) 50%, transparent); }
.fc-style-bold .fc-banner :focus-visible { outline-color: var(--fc-accent-ink); }

/* Style: Original — the look from before styles existed (warm dark, round, neutral buttons). Corners and buttons don't apply. */
.fc-root.fc-style-classic {
    --fc-accent-ink: #16130e; --fc-radius: 18px; --fc-btn-radius: 999px;
    --fc-bg: #15130f; --fc-ink: #f4f1ea; --fc-ink-2: rgba(244, 241, 234, .72); --fc-line: rgba(255, 255, 255, .1);
    --fc-btn: rgba(255, 255, 255, .08); --fc-btn-hover: rgba(255, 255, 255, .14);
    --fc-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
}
.fc-root.fc-style-classic.fc-theme-light {
    --fc-bg: #ffffff; --fc-ink: #16130e; --fc-ink-2: rgba(22, 19, 14, .7); --fc-line: rgba(0, 0, 0, .1);
    --fc-btn: rgba(0, 0, 0, .05); --fc-btn-hover: rgba(0, 0, 0, .09);
    --fc-shadow: 0 24px 60px -24px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .06);
}
@media (prefers-color-scheme: light) {
    .fc-root.fc-style-classic.fc-theme-auto {
        --fc-bg: #ffffff; --fc-ink: #16130e; --fc-ink-2: rgba(22, 19, 14, .7); --fc-line: rgba(0, 0, 0, .1);
        --fc-btn: rgba(0, 0, 0, .05); --fc-btn-hover: rgba(0, 0, 0, .09);
        --fc-shadow: 0 24px 60px -24px rgba(0, 0, 0, .35), 0 0 0 1px rgba(0, 0, 0, .06);
    }
}
.fc-style-classic .fc-banner { border-radius: 18px; }
.fc-style-classic .fc-btn, .fc-style-classic.fc-btns-line .fc-btn { border: 1px solid var(--fc-line); border-radius: 999px; background: var(--fc-btn); color: var(--fc-ink); }
.fc-style-classic .fc-btn:hover { filter: none; background: var(--fc-btn-hover); }
.fc-style-classic .fc-btn.is-primary { background: var(--fc-accent); border-color: var(--fc-accent); color: #16130e; }
.fc-style-classic .fc-btn.is-primary:hover { filter: brightness(1.05); }
.fc-style-classic .fc-title { font-weight: 650; }

/* Phones: always at the bottom */
@media (max-width: 720px) {
    .fc-root .fc-banner, .fc-pos-bar .fc-banner, .fc-pos-center .fc-banner { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); top: auto; width: auto; display: block; padding: 18px; transform: translateY(16px); }
    .fc-root .fc-banner.is-in { transform: none; }
    .fc-root .fc-banner__actions, .fc-pos-bar .fc-banner__actions { margin-top: 14px; flex-wrap: wrap; }
    .fc-root .fc-banner__actions .fc-link { flex-basis: 100%; order: 0; }
    .fc-style-minimal .fc-banner, .fc-style-minimal.fc-pos-corner .fc-banner, .fc-style-minimal.fc-pos-bar .fc-banner, .fc-style-minimal.fc-pos-center .fc-banner { left: 0; right: 0; bottom: 0; display: block; border-radius: 0; border: 0; border-top: 1px solid var(--fc-line); padding: 14px 16px max(14px, env(safe-area-inset-bottom)); }
    .fc-style-minimal .fc-banner__actions .fc-btn { flex: 1 1 0; }
    .fc-style-soft.fc-pos-bar .fc-mark { margin-bottom: 12px; }
}

/* Preferences window */
.fc-modal { position: fixed; inset: 0; z-index: 2147483001; display: grid; place-items: center; padding: 16px; }
.fc-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.fc-modal__box { position: relative; display: flex; flex-direction: column; width: min(560px, 100%); max-height: min(720px, calc(100vh - 32px)); background: var(--fc-bg); color: var(--fc-ink); border-radius: calc(var(--fc-radius) + 4px); box-shadow: var(--fc-shadow); opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .25s cubic-bezier(.16, 1, .3, 1), transform .25s cubic-bezier(.16, 1, .3, 1); }
.fc-modal .fc-btn:not(.is-primary) { --fc-card-ink: var(--fc-ink); }
.fc-modal.is-in .fc-modal__backdrop { opacity: 1; }
.fc-modal.is-in .fc-modal__box { opacity: 1; transform: none; }
.fc-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 6px; }
.fc-x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--fc-btn); color: var(--fc-ink); font-size: 22px; line-height: 1; cursor: pointer; }
.fc-x:hover { background: var(--fc-btn-hover); }
.fc-modal__body { overflow: auto; padding: 4px 22px 8px; }
.fc-intro { margin-bottom: 8px !important; }
.fc-cat { padding: 14px 0; border-top: 1px solid var(--fc-line); }
.fc-cat:first-of-type { border-top: 0; }
.fc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.fc-cat h3 { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--fc-ink); }
.fc-cat__uses { font-size: 12.5px !important; opacity: .85; }
.fc-always { font-size: 12px; font-weight: 600; color: var(--fc-ink-2); white-space: nowrap; }
.fc-modal__foot { display: flex; gap: 10px; padding: 14px 22px 20px; border-top: 1px solid var(--fc-line); }
.fc-modal__foot .fc-btn { flex: 1 1 0; }
@media (max-width: 520px) {
    .fc-modal { align-items: end; padding: 0; }
    .fc-modal__box { width: 100%; max-height: 88vh; border-radius: calc(var(--fc-radius) + 4px) calc(var(--fc-radius) + 4px) 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .fc-modal__foot { flex-wrap: wrap; }
    .fc-modal__foot .fc-btn.is-primary { flex-basis: 100%; order: -1; }
}

/* Switch */
.fc-switch { position: relative; flex: none; display: inline-block; width: 44px; height: 26px; cursor: pointer; }
.fc-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fc-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--fc-btn-hover); border: 1px solid var(--fc-line); transition: background .18s; pointer-events: none; }
.fc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .18s; }
.fc-switch input:checked + span { background: var(--fc-accent); border-color: var(--fc-accent); }
.fc-switch input:checked + span::after { transform: translateX(18px); }
.fc-switch input:focus-visible + span { outline: 2px solid var(--fc-accent); outline-offset: 2px; }

/* Reopen button */
.fc-reopen { position: fixed; left: max(16px, env(safe-area-inset-left, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 2147482999; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--fc-line); border-radius: 50%; background: var(--fc-bg); color: var(--fc-ink); box-shadow: var(--fc-shadow); cursor: pointer; }
html.fc-locked { overflow: hidden; }

/* Cookie policy table ([frebix_cookie_table]) */
.fc-table table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 14px; }
.fc-table th, .fc-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid currentColor; border-color: rgba(127, 127, 127, .25); }
.fc-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.fc-table code { font-size: 12.5px; word-break: break-all; }
@media (prefers-reduced-motion: reduce) { .fc-banner, .fc-modal__box, .fc-modal__backdrop { transition: none; } }
