.ccb[hidden],
.ccb-modal[hidden] {
    display: none;
}

/* ---- Плавающая кнопка-виджет ---- */
.ccb-fab {
    position: fixed;
    bottom: 20px;
    z-index: 99997;
    width: 52px;
    height: 52px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
    font-size: 26px;
    line-height: 52px;
    text-align: center;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s;
}

.ccb-fab--left  { left: 20px; }
.ccb-fab--right { right: 20px; }

.ccb-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
}

/* ---- Нижний баннер ---- */
.ccb {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99998;
    padding: 16px;
}

.ccb__bar {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px 22px;
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
}

.ccb__text {
    flex: 1 1 auto;
    font-size: 14px;
    line-height: 1.5;
    color: #6b7177;
}

.ccb__text a {
    color: #57b333;
    text-decoration: none;
}

.ccb__text a:hover {
    text-decoration: underline;
}

.ccb__actions {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---- Кнопки ---- */
.ccb__btn {
    height: 42px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}

.ccb__btn--accent {
    background: #57b333;
    color: #fff;
}

.ccb__btn--accent:hover {
    background: #4a9c2b;
}

.ccb__btn--ghost {
    background: #fff;
    color: #57b333;
    border-color: #57b333;
}

.ccb__btn--ghost:hover {
    background: #f1f8ec;
}

/* ---- Модалка настроек ---- */
.ccb-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ccb-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
}

.ccb-modal__box {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

.ccb-modal__close {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #9aa0a6;
    cursor: pointer;
}

.ccb-modal__close:hover {
    color: #333;
}

.ccb-modal__title {
    margin: 0 0 8px;
    font-size: 22px;
    color: #333;
}

.ccb-modal__intro {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: #6b7177;
}

/* ---- Категория ---- */
.ccb-cat {
    padding: 16px 0;
    border-top: 1px solid #e3e6ea;
}

.ccb-cat__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.ccb-cat__name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.ccb-cat__always {
    font-size: 13px;
    color: #57b333;
}

.ccb-cat__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7177;
}

/* ---- Тумблер ---- */
.ccb-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex: 0 0 auto;
}

.ccb-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ccb-switch__slider {
    position: absolute;
    inset: 0;
    background: #c9ced4;
    border-radius: 24px;
    cursor: pointer;
    transition: background-color .2s;
}

.ccb-switch__slider::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
}

.ccb-switch input:checked + .ccb-switch__slider {
    background: #57b333;
}

.ccb-switch input:checked + .ccb-switch__slider::before {
    transform: translateX(20px);
}

.ccb-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* ---- Адаптив ---- */
@media (max-width: 768px) {
    .ccb__bar {
        flex-direction: column;
        align-items: stretch;
    }
    .ccb__actions {
        justify-content: stretch;
    }
    .ccb__actions .ccb__btn,
    .ccb-modal__actions .ccb__btn {
        flex: 1 1 auto;
    }
}
