/* CK Cookie Consent - banner + settings panel. Scoped under #ck-consent; brand tokens in :root. */
:root {
    --ckc-bg: #ffffff;
    --ckc-text: #1f2a24;
    --ckc-muted: #5b675f;
    --ckc-primary: #2f6f4e;
    --ckc-primary-text: #ffffff;
    --ckc-border: #c9d3cc;
    --ckc-radius: 10px;
    --ckc-shadow: 0 -4px 24px rgba(0, 0, 0, .12);
    --ckc-font: inherit;
}

#ck-consent { font-family: var(--ckc-font); color: var(--ckc-text); line-height: 1.45; }
#ck-consent[hidden], #ck-consent [hidden] { display: none !important; }
#ck-consent *, #ck-consent *::before, #ck-consent *::after { box-sizing: border-box; }
#ck-consent p { margin: 0; }
#ck-consent a { color: inherit; text-decoration: underline; }
#ck-consent button { font: inherit; cursor: pointer; }
#ck-consent button:focus-visible, #ck-consent input:focus-visible { outline: 3px solid #7fb69a; outline-offset: 2px; }
.ck-consent__sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Banner */
.ck-consent__banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 99990;
    margin: 0 auto; max-width: 980px; padding: 16px 52px 16px 20px;
    background: var(--ckc-bg); border: 1px solid var(--ckc-border); border-radius: var(--ckc-radius); box-shadow: var(--ckc-shadow);
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
}
.ck-consent__text { flex: 1 1 320px; font-size: 15px; }
.ck-consent__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ck-consent__btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 120px; padding: 10px 18px;
    border-radius: 999px; border: 2px solid var(--ckc-primary); background: var(--ckc-bg); color: var(--ckc-primary);
    font-size: 15px; font-weight: 600; white-space: nowrap;
}
.ck-consent__btn--primary { background: var(--ckc-primary); color: var(--ckc-primary-text); }
.ck-consent__btn:hover { filter: brightness(.95); }
/* Equal-style buttons (legal-conservative option, toggled in settings) */
#ck-consent[data-equal="1"] .ck-consent__btn--primary { background: var(--ckc-bg); color: var(--ckc-primary); }
.ck-consent__gear {
    position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; padding: 0;
    border: 0; border-radius: 50%; background: transparent; color: var(--ckc-muted);
    display: inline-flex; align-items: center; justify-content: center;
}
.ck-consent__gear:hover { background: #eef3f0; color: var(--ckc-text); }
.ck-consent__gear svg { width: 22px; height: 22px; fill: currentColor; }

/* Settings panel */
.ck-consent__panel {
    position: fixed; inset: 0; z-index: 99995; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(20, 30, 24, .45);
}
.ck-consent__dialog {
    width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto;
    background: var(--ckc-bg); border-radius: var(--ckc-radius); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); padding: 22px 24px;
    position: relative;
}
.ck-consent__title { margin: 0 36px 8px 0; font-size: 20px; font-weight: 700; }
.ck-consent__intro { color: var(--ckc-muted); font-size: 14px; margin-bottom: 14px; }
.ck-consent__close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; background: transparent; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--ckc-muted); }
.ck-consent__close:hover { background: #eef3f0; }
.ck-consent__list { list-style: none; margin: 0 0 16px; padding: 0; }
.ck-consent__item { padding: 12px 0; border-top: 1px solid var(--ckc-border); }
.ck-consent__item:last-child { border-bottom: 1px solid var(--ckc-border); }
.ck-consent__label { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.ck-consent__label input { width: 20px; height: 20px; margin: 0; accent-color: var(--ckc-primary); }
.ck-consent__label input:disabled { cursor: not-allowed; }
.ck-consent__desc { color: var(--ckc-muted); font-size: 13.5px; margin-top: 4px; padding-left: 30px; }
.ck-consent__panel-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Footer link fallback pill */
.ck-consent-footer-fallback { position: fixed; left: 12px; bottom: 12px; z-index: 99980; }
.ck-consent-footer-fallback a { display: inline-block; padding: 6px 12px; font-size: 12px; border-radius: 999px; background: #eef3f0; color: var(--ckc-text); text-decoration: none; border: 1px solid var(--ckc-border); }
html.ck-consent-visible .ck-consent-footer-fallback { display: none; }

/* Debug badge (shop managers only) */
#ck-consent-debug { position: fixed; left: 12px; top: 12px; z-index: 99999; background: #111; color: #9fe0b8; font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; padding: 8px 10px; border-radius: 6px; max-width: 90vw; }
#ck-consent-debug button { margin-left: 8px; font: inherit; background: #333; color: #fff; border: 0; border-radius: 4px; padding: 2px 8px; cursor: pointer; }

@media (max-width: 640px) {
    .ck-consent__banner { left: 8px; right: 8px; bottom: 8px; padding: 14px 46px 14px 16px; }
    .ck-consent__actions { width: 100%; }
    .ck-consent__btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: no-preference) {
    .ck-consent__banner { animation: ckc-in .25s ease-out; }
    @keyframes ckc-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
}
