/* Баннер согласия на cookie - модуль kommutator.cookieconsent */

.ccc {
    --ccc-accent: #0a84ff;
    --ccc-bg: #ffffff;
    --ccc-text: #1c1f23;
    --ccc-muted: #5c6470;
    --ccc-border: rgba(0, 0, 0, .1);
    --ccc-radius: 14px;
    --ccc-shadow: 0 12px 40px rgba(15, 20, 30, .18);

    position: fixed;
    z-index: 100000;
    inset: auto 0 0 0;
    display: block;
    color: var(--ccc-text);
    font-size: 14px;
    line-height: 1.5;
    font-family: inherit;
}

.ccc[hidden] {
    display: none;
}

.ccc--dark {
    --ccc-bg: #1e2229;
    --ccc-text: #f2f4f7;
    --ccc-muted: #a9b1bd;
    --ccc-border: rgba(255, 255, 255, .14);
    --ccc-shadow: 0 12px 40px rgba(0, 0, 0, .5);
}

/* --- Позиционирование --------------------------------------------------- */

.ccc--bottom .ccc__window {
    margin: 0 auto 16px;
    max-width: 1140px;
}

.ccc--top {
    inset: 0 0 auto 0;
}

.ccc--top .ccc__window {
    margin: 16px auto 0;
    max-width: 1140px;
}

.ccc--bottom-left .ccc__window,
.ccc--bottom-right .ccc__window {
    max-width: 420px;
    margin-bottom: 16px;
}

.ccc--bottom-left .ccc__window {
    margin-left: 16px;
    margin-right: auto;
}

.ccc--bottom-right .ccc__window {
    margin-left: auto;
    margin-right: 16px;
}

.ccc--center {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ccc--center .ccc__window {
    max-width: 560px;
    margin: 16px;
}

/* --- Окно --------------------------------------------------------------- */

.ccc__overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, .45);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .25s ease;
}

.ccc--visible .ccc__overlay {
    opacity: 1;
}

.ccc__window {
    position: relative;
    box-sizing: border-box;
    background: var(--ccc-bg);
    border: 1px solid var(--ccc-border);
    border-radius: var(--ccc-radius);
    box-shadow: var(--ccc-shadow);
    padding: 20px 22px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .25s ease, transform .25s ease;
}

.ccc--top .ccc__window {
    transform: translateY(-16px);
}

.ccc--visible .ccc__window {
    opacity: 1;
    transform: translateY(0);
}

.ccc__pane[hidden] {
    display: none;
}

.ccc__pane--main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.ccc__icon {
    flex: 0 0 auto;
    color: var(--ccc-accent);
    line-height: 0;
    padding-top: 2px;
}

.ccc__icon-image,
.ccc__reopen-image {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.ccc__reopen-image {
    width: 26px;
    height: 26px;
}

.ccc__reopen {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--ccc-accent, #0a84ff);
    color: #fff;
    box-shadow: 0 5px 18px rgba(15, 20, 30, .28);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.ccc__reopen[hidden] {
    display: none !important;
}

.ccc__reopen:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(15, 20, 30, .34);
}

.ccc__reopen:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px var(--ccc-accent, #0a84ff), 0 7px 22px rgba(15, 20, 30, .34);
}

.ccc__content {
    flex: 1 1 320px;
    min-width: 240px;
}

.ccc__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.ccc__title:focus {
    outline: none;
}

.ccc__text {
    color: var(--ccc-muted);
}

.ccc__link {
    color: var(--ccc-accent);
    text-decoration: underline;
}

.ccc__link:hover {
    text-decoration: none;
}

.ccc__version {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    opacity: .75;
}

/* --- Кнопки ------------------------------------------------------------- */

.ccc__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.ccc__pane--settings .ccc__actions {
    margin-top: 18px;
    justify-content: flex-end;
}

.ccc__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, opacity .15s ease;
    white-space: nowrap;
}

.ccc__btn:focus-visible {
    outline: 2px solid var(--ccc-accent);
    outline-offset: 2px;
}

.ccc__btn--primary {
    background: var(--ccc-accent);
    color: #fff;
}

.ccc__btn--primary:hover {
    opacity: .9;
}

.ccc__btn--secondary {
    background: transparent;
    border-color: var(--ccc-border);
    color: var(--ccc-text);
}

.ccc__btn--secondary:hover {
    border-color: var(--ccc-accent);
    color: var(--ccc-accent);
}

.ccc__btn--link {
    background: none;
    padding: 10px 6px;
    color: var(--ccc-muted);
    text-decoration: underline;
}

.ccc__btn--link:hover {
    color: var(--ccc-accent);
}

.ccc__close {
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    color: var(--ccc-muted);
    cursor: pointer;
    padding: 0 4px;
}

.ccc__close:hover {
    color: var(--ccc-text);
}

/* --- Панель настроек ---------------------------------------------------- */

.ccc__settings-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.ccc__categories {
    margin-top: 16px;
    max-height: 46vh;
    overflow-y: auto;
    display: grid;
    gap: 10px;
}

.ccc__category {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid var(--ccc-border);
    border-radius: 10px;
    cursor: pointer;
}

.ccc__category-body {
    display: block;
}

.ccc__category-title {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.ccc__category-desc {
    display: block;
    color: var(--ccc-muted);
    font-size: 13px;
}

.ccc__badge {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 20px;
    background: var(--ccc-border);
    color: var(--ccc-muted);
    font-size: 11px;
    font-style: normal;
    font-weight: 500;
    vertical-align: middle;
}

/* --- Переключатель ------------------------------------------------------ */

.ccc__switch {
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 22px;
    margin-top: 2px;
}

.ccc__switch input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.ccc__slider {
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: var(--ccc-border);
    transition: background-color .2s ease;
    pointer-events: none;
}

.ccc__slider::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform .2s ease;
}

.ccc__switch input:checked + .ccc__slider {
    background: var(--ccc-accent);
}

.ccc__switch input:checked + .ccc__slider::before {
    transform: translateX(18px);
}

.ccc__switch input:disabled + .ccc__slider {
    opacity: .55;
}

.ccc__switch input:focus-visible + .ccc__slider {
    outline: 2px solid var(--ccc-accent);
    outline-offset: 2px;
}

/* --- Адаптив ------------------------------------------------------------ */

@media (max-width: 767px) {
    .ccc__reopen {
        right: 12px;
        bottom: 12px;
        width: 44px;
        height: 44px;
    }

    .ccc__window {
        margin: 8px !important;
        max-width: none !important;
        padding: 18px;
    }

    .ccc__actions {
        width: 100%;
    }

    .ccc__btn {
        flex: 1 1 140px;
    }

    .ccc__categories {
        max-height: 40vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ccc__window,
    .ccc__overlay,
    .ccc__reopen {
        transition: none;
    }
}
