/* cookie-consent.css: the cookie banner, Customize window and cookie button (assets/js/cookie-consent.js) */

.tkc, .tkc-reopen {
    --tkc-bg: #ffffff;
    --tkc-ink: #18181b;
    --tkc-muted: #52525b;
    --tkc-line: #e4e4e7;
    --tkc-hover: #f4f4f5;
    --tkc-primary: #18181b;
    --tkc-on-primary: #ffffff;
    font-family: inherit;
    color: var(--tkc-ink);
}
.tkc.tkc-dark, .tkc-reopen.tkc-dark {
    --tkc-bg: #18181b;
    --tkc-ink: #fafafa;
    --tkc-muted: #a1a1aa;
    --tkc-line: #3f3f46;
    --tkc-hover: #27272a;
    --tkc-primary: #fafafa;
    --tkc-on-primary: #18181b;
}
.tkc *, .tkc-reopen * { box-sizing: border-box; }

/* Banner */
.tkc-box {
    position: fixed;
    z-index: 3500;
    background: var(--tkc-bg);
    border: 1px solid var(--tkc-line);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
    padding: 20px;
    animation: tkc-in .2s ease;
}
.tkc-box-left .tkc-box, .tkc-box-right .tkc-box { bottom: 16px; width: min(400px, calc(100% - 32px)); }
.tkc-box-left .tkc-box { left: 16px; }
.tkc-box-right .tkc-box { right: 16px; }
.tkc-bar .tkc-box {
    left: 0; right: 0; bottom: 0;
    border-radius: 0;
    border-width: 1px 0 0;
    display: flex; align-items: center; justify-content: center; gap: 12px 32px;
    padding: 16px 24px;
}
.tkc-bar .tkc-body { max-width: 720px; }
.tkc-modal .tkc-box, .tkc-prefs .tkc-box {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, calc(100% - 32px));
    max-height: calc(100% - 32px);
    overflow-y: auto;
    animation: none;
}
.tkc-prefs .tkc-box { z-index: 3600; width: min(520px, calc(100% - 32px)); }
.tkc-backdrop { position: fixed; inset: 0; z-index: 3500; background: rgba(0, 0, 0, .4); }
.tkc-prefs .tkc-backdrop { z-index: 3600; }

.tkc-title { margin: 0 0 8px; font-size: 16px; font-weight: 600; line-height: 1.35; color: var(--tkc-ink); }
.tkc-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--tkc-muted); }
.tkc-text a { color: var(--tkc-ink); text-decoration: underline; text-underline-offset: 3px; }

.tkc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tkc-box-left .tkc-btn, .tkc-box-right .tkc-btn, .tkc-modal .tkc-btn { flex: 1 1 auto; }
.tkc-bar .tkc-actions { margin-top: 0; flex: none; }
.tkc-btn {
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--tkc-line);
    border-radius: 10px;
    background: var(--tkc-bg);
    color: var(--tkc-ink);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.tkc-btn:hover { background: var(--tkc-hover); }
.tkc-btn.tkc-primary { background: var(--tkc-primary); border-color: var(--tkc-primary); color: var(--tkc-on-primary); }
.tkc-btn.tkc-primary:hover { opacity: .9; }
.tkc-btn:focus-visible, .tkc-x:focus-visible, .tkc-switch:focus-visible, .tkc-reopen:focus-visible, .tkc-text a:focus-visible {
    outline: 2px solid var(--tkc-ink);
    outline-offset: 2px;
}

/* Customize window */
.tkc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.tkc-head .tkc-title { margin: 0; }
.tkc-x {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border: 0; border-radius: 8px;
    background: transparent;
    color: var(--tkc-muted);
    cursor: pointer;
}
.tkc-x:hover { background: var(--tkc-hover); color: var(--tkc-ink); }
.tkc-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.tkc-cats { display: flex; flex-direction: column; }
.tkc-cat {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--tkc-line);
    cursor: pointer;
}
.tkc-cat-text { display: flex; flex-direction: column; gap: 4px; }
.tkc-cat-name { font-size: 14px; font-weight: 600; color: var(--tkc-ink); }
.tkc-cat-desc { font-size: 13px; line-height: 1.5; color: var(--tkc-muted); }
.tkc-switch {
    appearance: none; -webkit-appearance: none;
    flex: none;
    position: relative;
    width: 36px; height: 20px;
    margin: 2px 0 0;
    border-radius: 999px;
    background: var(--tkc-line);
    cursor: pointer;
    transition: background .15s;
}
.tkc-switch::after {
    content: "";
    position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    transition: transform .15s;
}
.tkc-switch:checked { background: var(--tkc-primary); }
.tkc-dark .tkc-switch:checked::after { background: #18181b; }
.tkc-switch:checked::after { transform: translateX(16px); }
.tkc-switch:disabled { opacity: .5; cursor: default; }

/* Cookie button after a choice */
.tkc-reopen {
    position: fixed; right: 16px; bottom: 16px; z-index: 3400;
    display: inline-flex; align-items: center; gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--tkc-line);
    border-radius: 999px;
    background: var(--tkc-bg);
    color: var(--tkc-ink);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    font: inherit; font-size: 13px; font-weight: 600;
    cursor: pointer;
}
.tkc-reopen[hidden] { display: none; }
.tkc-reopen svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@keyframes tkc-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
    .tkc-box-left .tkc-box, .tkc-box-right .tkc-box { left: 12px; right: 12px; bottom: 12px; width: auto; }
    .tkc-bar .tkc-box { flex-direction: column; align-items: stretch; }
    .tkc-bar .tkc-btn { flex: 1 1 auto; }
    .tkc-reopen span { display: none; }
    .tkc-reopen { width: 36px; padding: 0; justify-content: center; right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .tkc-box { animation: none; }
    .tkc-btn, .tkc-switch, .tkc-switch::after { transition: none; }
}
