/* Баннер согласия. Шрифт и оформление наследуются от темы, цвета приходят из настроек. */

.ccp-popup,
.ccp-reopen {
    box-sizing: border-box;
}

.ccp-popup {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999990;
    display: none;
    margin: 0;
    padding: 0;
    background: var(--ccp-bg, #ffffff);
    color: var(--ccp-text, #111111);
    border-top: 1px solid var(--ccp-border, #e6e6e6);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.06);
    font-family: var(--ccp-font, inherit);
    font-size: var(--ccp-size, 16px);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
}

.ccp-popup *,
.ccp-popup *::before,
.ccp-popup *::after,
.ccp-reopen,
.ccp-reopen * {
    box-sizing: border-box;
}

.ccp-popup.ccp-visible {
    display: block;
}

.ccp-popup-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.ccp-content {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 680px;
}

.ccp-title {
    margin: 0 0 8px;
    padding: 0;
    color: var(--ccp-text, #111111);
    font-family: inherit;
    font-size: 1.15em;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
}

.ccp-message {
    margin: 0;
    padding: 0;
    max-width: 640px;
    color: var(--ccp-muted, #3a3a3a);
    font-family: inherit;
    font-size: 0.95em;
    font-weight: 400;
    line-height: 1.5;
    text-transform: none;
}

.ccp-message p {
    margin: 0;
}

.ccp-message p + p {
    margin-top: 6px;
}

.ccp-policy {
    display: inline-block;
    margin-top: 10px;
    color: var(--ccp-muted, #4a4a4a);
    font-family: inherit;
    font-size: 0.95em;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: underline;
    text-underline-offset: 2px;
    text-transform: none;
    background: none;
    border: 0;
}

.ccp-policy:hover,
.ccp-policy:focus {
    color: var(--ccp-text, #111111);
}

.ccp-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 28px;
    margin-top: 18px;
}

#ccp-popup .ccp-cat {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    color: var(--ccp-text, #111111);
    font-family: inherit;
    font-size: 0.95em;
    font-weight: 400;
    line-height: 1.3;
    text-transform: none;
    cursor: pointer;
    user-select: none;
}

/* Нативный input оставляем для клика и скрипта, но прячем:
   темы часто обнуляют checkbox через appearance: none. */
#ccp-popup .ccp-check {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#ccp-popup .ccp-box {
    display: inline-block !important;
    box-sizing: border-box !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    flex: 0 0 16px;
    margin: 0 !important;
    padding: 0 !important;
    border: 1.5px solid #6b6b6b !important;
    border-radius: 2px !important;
    background: #ffffff !important;
    box-shadow: none !important;
    position: relative;
    vertical-align: middle;
}

#ccp-popup .ccp-box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #1a1a1a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

#ccp-popup .ccp-check:checked + .ccp-box {
    background: #ffffff !important;
    border-color: #1a1a1a !important;
}

#ccp-popup .ccp-check:checked + .ccp-box::after {
    opacity: 1;
}

#ccp-popup .ccp-check:focus-visible + .ccp-box {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

#ccp-popup .ccp-cat-label {
    display: inline-block;
    color: inherit;
    line-height: 1.3;
}

.ccp-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

#ccp-popup .ccp-btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 2px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    text-shadow: none;
    white-space: nowrap;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#ccp-popup .ccp-btn-accept,
#ccp-popup .ccp-btn-reject {
    background: #f7f7f7;
    color: #2b2b2b;
    border: 1px solid #cfcfcf;
}

#ccp-popup .ccp-btn-accept:hover,
#ccp-popup .ccp-btn-accept:focus,
#ccp-popup .ccp-btn-reject:hover,
#ccp-popup .ccp-btn-reject:focus {
    background: #efefef;
    border-color: #bdbdbd;
    color: #111111;
}

#ccp-popup .ccp-btn-save {
    background: transparent;
    color: var(--ccp-text, #111111);
    border: 0;
    padding-left: 8px;
    padding-right: 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 400;
}

#ccp-popup .ccp-btn-save:hover,
#ccp-popup .ccp-btn-save:focus {
    background: transparent;
    color: var(--ccp-text, #111111);
    opacity: 0.7;
}

#ccp-popup .ccp-btn:focus-visible,
.ccp-reopen:focus-visible,
.ccp-policy:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

.ccp-reopen {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 999989;
    display: none;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    margin: 0;
    padding: 3px 12px 4px;
    border: 1px solid #d0d0d0;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: #f4f4f4;
    color: #4a4a4a;
    box-shadow: none;
    cursor: pointer;
    font-family: var(--ccp-font, inherit);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
}

.ccp-reopen.ccp-visible {
    display: inline-flex;
}

.ccp-reopen:hover,
.ccp-reopen:focus {
    background: #ececec;
    border-color: #bdbdbd;
    color: #222222;
}

@media (max-width: 900px) {
    .ccp-popup-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 22px;
        padding: 22px 18px 18px;
    }

    .ccp-content {
        max-width: none;
    }

    .ccp-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    #ccp-popup .ccp-btn-accept,
    #ccp-popup .ccp-btn-reject {
        flex: 1 1 auto;
    }

    .ccp-reopen {
        font-size: 11px;
        padding: 3px 10px 4px;
    }
}

@media print {
    .ccp-popup,
    .ccp-reopen {
        display: none !important;
    }
}
