/* static-consent-kit v1.0 - self-contained styles, system font stack */
.csck-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1c1c1e;
}
.csck-root *, .csck-root *::before, .csck-root *::after { box-sizing: border-box; }

/* Banner */
.csck-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 2147483000;
    background: #ffffff;
    border: 1px solid #e3e3e6;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    max-width: 720px;
    margin: 0 auto;
}
.csck-banner__body { padding: 18px 20px; }
.csck-banner__title { margin: 0 0 6px; font-weight: 700; font-size: 16px; }
.csck-banner__text { margin: 0 0 14px; color: #4a4a4f; }
.csck-banner__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* Buttons - accept and reject with equal prominence */
.csck-btn {
    appearance: none;
    border: 1px solid #c9c9ce;
    background: #f4f4f6;
    color: #1c1c1e;
    border-radius: 10px;
    padding: 9px 16px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.csck-btn:hover { background: #e9e9ed; }
.csck-btn:focus-visible { outline: 2px solid #4a6cf7; outline-offset: 2px; }
.csck-btn--primary { background: #1c1c1e; border-color: #1c1c1e; color: #ffffff; }
.csck-btn--primary:hover { background: #333338; }
.csck-btn--ghost { background: #f4f4f6; }

.csck-link { color: #4a6cf7; text-decoration: underline; }

/* Modal */
.csck-modal { position: fixed; inset: 0; z-index: 2147483001; }
.csck-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); }
.csck-modal__box {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 64px);
    overflow: auto;
    margin: 32px auto;
    padding: 22px 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.csck-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    color: #6a6a70;
    padding: 4px 8px;
}
.csck-modal__title { margin: 0 0 8px; font-size: 19px; }
.csck-modal__text { margin: 0 0 16px; color: #4a4a4f; }
.csck-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 18px;
}

/* Category rows */
.csck-cats { display: flex; flex-direction: column; gap: 12px; }
.csck-cat { border: 1px solid #e3e3e6; border-radius: 10px; padding: 12px 14px; }
.csck-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.csck-cat__name { font-weight: 600; }
.csck-cat__desc { margin: 6px 0 0; color: #6a6a70; font-size: 13.5px; }

/* Toggle switch */
.csck-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.csck-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.csck-switch input:disabled { cursor: not-allowed; }
.csck-switch__track {
    position: absolute;
    inset: 0;
    background: #c9c9ce;
    border-radius: 999px;
    transition: background 0.15s ease;
    pointer-events: none;
}
.csck-switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.15s ease;
}
.csck-switch input:checked + .csck-switch__track { background: #2e9e5b; }
.csck-switch input:checked + .csck-switch__track::after { transform: translateX(20px); }
.csck-switch input:disabled + .csck-switch__track { opacity: 0.6; }
.csck-switch input:focus-visible + .csck-switch__track { outline: 2px solid #4a6cf7; outline-offset: 2px; }

/* Reopen button */
.csck-reopen {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 2147482999;
    border: 1px solid #c9c9ce;
    background: #ffffff;
    color: #1c1c1e;
    border-radius: 999px;
    padding: 8px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
.csck-reopen:hover { background: #f4f4f6; }

@media (max-width: 480px) {
    .csck-banner { left: 8px; right: 8px; bottom: 8px; }
    .csck-banner__actions { justify-content: stretch; }
    .csck-banner__actions .csck-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .csck-switch__track, .csck-switch__track::after { transition: none; }
}
