:root {
    --cncb-ink: #241f29;
    --cncb-muted: #625b66;
    --cncb-paper: #f7f4ef;
    --cncb-white: #ffffff;
    --cncb-border: #d9d2c9;
    --cncb-focus: #6d86a5;
}

.cncb-banner,
.cncb-banner * {
    box-sizing: border-box;
}

.cncb-banner {
    position: fixed;
    z-index: 999997;
    right: 24px;
    bottom: 24px;
    left: 24px;
    width: min(820px, calc(100% - 48px));
    margin: 0 auto;
    padding: 22px;
    border: 1px solid var(--cncb-border);
    border-radius: 14px;
    background: var(--cncb-paper);
    color: var(--cncb-ink);
    box-shadow: 0 12px 34px rgba(36, 31, 41, 0.20);
    font: inherit;
    line-height: 1.5;
}

.cncb-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cncb-cookie-icon {
    display: block;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
}

.cncb-banner h2,
.cncb-banner p,
.cncb-banner fieldset,
.cncb-banner legend {
    margin: 0;
    padding: 0;
    color: inherit;
    font: inherit;
}

.cncb-banner h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
}

.cncb-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 178px;
    gap: 24px;
    align-items: end;
}

.cncb-copy p {
    max-width: 610px;
    color: var(--cncb-muted);
    font-size: 14px;
}

.cncb-copy a {
    color: var(--cncb-ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cncb-customize {
    display: inline-flex;
    margin-top: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--cncb-ink);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cncb-choices {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--cncb-border);
}

.cncb-choices[hidden],
.cncb-save[hidden] {
    display: none;
}

.cncb-choices fieldset {
    border: 0;
}

.cncb-choices legend {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
}

.cncb-choices label {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
    margin: 10px 0;
    cursor: pointer;
    font-size: 13px;
}

.cncb-choices label:has(input:disabled) {
    cursor: default;
}

.cncb-choices input {
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    accent-color: var(--cncb-ink);
}

.cncb-choices strong,
.cncb-choices small {
    display: block;
}

.cncb-choices strong {
    color: var(--cncb-ink);
    font-size: 13px;
}

.cncb-choices small {
    margin-top: 1px;
    color: var(--cncb-muted);
    font-size: 12px;
    font-weight: 400;
}

.cncb-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 9px;
}

.cncb-button {
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid var(--cncb-ink);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.cncb-button:hover {
    box-shadow: 0 4px 10px rgba(36, 31, 41, 0.15);
    transform: translateY(-1px);
}

.cncb-accept,
.cncb-save {
    background: var(--cncb-ink);
    color: var(--cncb-white);
}

.cncb-reject {
    background: transparent;
    color: var(--cncb-ink);
}

.cncb-banner button:focus-visible,
.cncb-banner a:focus-visible,
.cncb-banner input:focus-visible {
    outline: 3px solid var(--cncb-focus);
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .cncb-banner {
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: min(88vh, 720px);
        margin: 0;
        overflow-y: auto;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 14px 14px 0 0;
        padding: 18px;
    }

    .cncb-layout {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cncb-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .cncb-save:not([hidden]) {
        grid-column: 1 / -1;
        display: block;
    }
}

@media (max-width: 430px) {
    .cncb-actions {
        display: flex;
        flex-direction: column-reverse;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cncb-button {
        transition: none;
    }
}
