/* django-script-consent: тема по design.png.
   Грузится после banner.css пакета (см. templates/script_consent/banner.html). */

.cc-banner,
.cc-launcher {
    --cc-bg: #ffffff;
    --cc-fg: #17171a;
    --cc-muted: #6f7583;
    --cc-border: #17171a;
    --cc-accent: #00c4bc;
    --cc-accent-fg: #ffffff;
    --cc-secondary-bg: #ffffff;
    --cc-secondary-fg: #17171a;
    --cc-shadow: 0 12px 40px rgba(23, 23, 26, 0.18);
    --cc-radius: 0;
    --cc-font: "Roboto", system-ui, sans-serif;
    --cc-focus: 0 0 0 3px rgba(54, 196, 187, 0.35);
    --cc-launcher-size: 48px;
    --cc-launcher-right: 16px;
    --cc-launcher-bottom: 16px;
    --cc-launcher-radius: 0;
    --cc-launcher-attention-glow: 0 0 0 6px rgba(54, 196, 187, 0.28);
}

.cc-banner {
    inset: 0;
    justify-content: center;
    align-items: center;
    background: rgba(23, 23, 26, 0.28);
    pointer-events: auto;
}

.cc-banner__panel {
    width: min(680px, calc(100% - 32px));
    max-width: 680px;
    max-height: min(96vh, 96dvh);
    overflow-x: hidden;
    overflow-y: auto;
    margin: 24px auto;
    border: 2px solid #17171a;
    border-radius: 0;
    box-shadow: var(--cc-shadow);
    padding: 36px 36px 28px;
}

.cc-banner__close {
    width: 32px;
    height: 32px;
    margin: 0;
    font-size: 22px;
    line-height: 1;
    color: #17171a;
}

.cc-banner__title {
    margin: 0 36px 12px 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: #17171a;
}

.cc-banner__text {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.5;
    color: #4a4e57;
}

.cc-banner__legend {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.cc-banner__categories {
    margin: 12px 0 0;
    padding: 0;
    border: none;
}

.cc-banner__list {
    display: block;
    gap: 0;
    margin: 0;
    padding: 0;
}

.cc-banner__item {
    margin: 0;
    border: none;
    border-top: 1px solid #e6e7ea;
}

.cc-banner__item:last-child {
    border-bottom: 1px solid #e6e7ea;
}

.cc-banner__label {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 0;
    padding: 20px 0 18px;
    border: none;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
}

.cc-banner__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 22px;
}

.cc-banner__cat-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    color: #17171a;
}

.cc-banner__badge {
    display: inline;
    margin-left: 8px;
    padding: 0;
    background: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 22px;
    color: #9498a3;
    vertical-align: baseline;
}

.cc-banner__badge_on {
    display: none;
}

.cc-banner__label:has(.cc-banner__checkbox:checked) .cc-banner__badge_off {
    display: none;
}

.cc-banner__label:has(.cc-banner__checkbox:checked) .cc-banner__badge_on {
    display: inline;
}

.cc-banner__cat-desc,
.cc-banner__recipients {
    display: block;
    grid-column: auto;
    font-size: 14px;
    line-height: 1.45;
    color: #4a4e57;
}

.cc-banner__recipients {
    color: #8a8f99;
}

/* Выкл: серый квадрат слева в белой рамке. Вкл: толстая бирюзовая рамка, белая середина. */
.cc-banner input[type="checkbox"].cc-banner__checkbox {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    box-sizing: border-box;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
    border: 1px solid #c5c7cc;
    border-radius: 0;
    background-color: #fff;
    background-image: linear-gradient(#9a9a9a, #9a9a9a);
    background-repeat: no-repeat;
    background-size: 13px 13px;
    background-position: 3px 4px;
    accent-color: #00c4bc;
    cursor: pointer;
}

.cc-banner input[type="checkbox"].cc-banner__checkbox:checked {
    border: 5px solid #00c4bc;
    background-color: #fff;
    background-image: none;
    box-shadow: none;
}

.cc-banner input[type="checkbox"].cc-banner__checkbox:disabled {
    opacity: 1;
    cursor: default;
}

.cc-banner input[type="checkbox"].cc-banner__checkbox:focus-visible {
    outline: none;
    box-shadow: var(--cc-focus);
}

.cc-banner__actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    justify-content: stretch;
    margin-top: 24px;
}

.cc-btn {
    min-height: 44px;
    padding: 10px 8px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.cc-btn--secondary {
    background: #fff;
    border: 2px solid #17171a;
    color: #17171a;
}

.cc-btn--secondary:hover {
    filter: none;
    background: #f6f6f7;
}

.cc-btn--primary {
    background: #00c4bc;
    border: 2px solid #00c4bc;
    color: #fff;
}

.cc-btn--primary:hover {
    filter: none;
    background: #05aaa7;
    border-color: #05aaa7;
}

.cc-banner__close-hint,
.cc-banner__operator {
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #6f7583;
}

.cc-banner__operator {
    padding-top: 16px;
    border-top: 1px solid #e6e7ea;
}

.cc-banner__operator a,
.cc-banner__privacy a {
    color: #00c4bc;
}

@media (max-width: 480px) {
    .cc-banner__panel {
        width: calc(100% - 16px);
        max-width: none;
        max-height: min(96vh, 96dvh);
        margin: 8px auto;
        padding: 22px 16px 18px;
        border-radius: 0;
    }

    .cc-banner__title {
        font-size: 18px;
        margin-right: 32px;
    }

    .cc-btn {
        font-size: 13px;
        padding: 10px 4px;
    }
}
