.cc-banner,
.cc-dialog {
    box-sizing: border-box;
    color: #20252b;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
}

.cc-banner *,
.cc-dialog * {
    box-sizing: border-box;
}

.cc-banner[hidden] {
    display: none !important;
}

/* Баннер внизу страницы */
.cc-banner {
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    max-width: 1160px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    margin: 0 auto;
    padding: 24px;
    overflow: auto;

    background: #fff;
    border: 1px solid #d8dee5;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
}

.cc-banner__text {
    flex: 1;
    min-width: 0;
}

.cc-banner h2,
.cc-dialog h2 {
    margin: 0 0 10px;
    color: #20252b;
    font-size: 20px;
    line-height: 1.3;
}

.cc-banner p {
    margin: 0 0 8px;
}

.cc-banner a,
.cc-dialog a {
    color: #155ba7;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Кнопки */
.cc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cc-banner > .cc-actions {
    flex: 0 1 380px;
}

.cc-button {
    flex: 1 1 auto;
    min-height: 44px;
    padding: 11px 16px;

    color: #20252b;
    font: inherit;
    font-weight: 600;
    text-align: center;

    background: #f4f6f8;
    border: 1px solid #bfc9d4;
    border-radius: 8px;
    cursor: pointer;
}

.cc-button:hover {
    background: #e7edf3;
}

.cc-button:focus-visible,
.cc-close:focus-visible,
.cc-checkbox:focus-visible,
.cc-banner a:focus-visible,
.cc-dialog a:focus-visible {
    outline: 3px solid #1368ce;
    outline-offset: 3px;
}

/* Окно настроек */
.cc-dialog {
    width: min(560px, calc(100% - 32px));
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 24px;
    overflow: auto;

    background: #fff;
    border: 1px solid #d8dee5;
    border-radius: 16px;
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.25);
}

.cc-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.cc-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.cc-close {
    display: grid;
    flex-shrink: 0;
    place-items: center;

    width: 40px;
    height: 40px;
    padding: 0;

    color: #20252b;
    font-size: 28px;
    line-height: 1;
    background: #f4f6f8;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.cc-dialog__intro {
    margin: 8px 0 20px;
}

/* Категории cookie */
.cc-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0;
    border-top: 1px solid #d8dee5;
}

.cc-category h3,
.cc-category__title {
    display: block;
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.cc-category p,
.cc-category__description {
    display: block;
    margin: 0;
    color: #555f6a;
    font-size: 14px;
}

label.cc-category {
    cursor: pointer;
}

.cc-status {
    flex-shrink: 0;
    color: #555f6a;
    font-size: 12px;
}

.cc-checkbox {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: #155ba7;
}

.cc-dialog__policy {
    margin: 12px 0 20px;
    font-size: 14px;
}

/* Кнопка настроек в футере */
.cookie-settings-link {
    padding: 0;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.cookie-settings-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* Мобильная версия */
@media (max-width: 760px) {
    .cc-banner {
        right: 12px;
        bottom: 12px;
        left: 12px;

        display: block;
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        padding: 18px;
    }

    .cc-banner > .cc-actions {
        margin-top: 16px;
    }

    .cc-banner .cc-button {
        flex-basis: 100%;
    }

    .cc-dialog {
        padding: 20px;
    }

    .cc-category {
        gap: 12px;
    }

    .cc-status {
        max-width: 85px;
        text-align: right;
    }
}

/* Компактный баннер cookie */
.cc-banner {
    right: auto;
    bottom: 16px;
    left: 16px;

    display: block;
    width: calc(100% - 32px);
    max-width: 440px;
    margin: 0;
    padding: 18px;

    border: 1px solid #e3e7dc;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);

    font-size: 13px;
    line-height: 1.45;
}

.cc-banner h2 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
}

.cc-banner p {
    margin: 0 0 8px;
}

.cc-banner__text > a {
    font-size: 12px;
}

.cc-banner > .cc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
}

.cc-banner .cc-button {
    min-height: 38px;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.3;
    border-radius: 7px;
}

/* Зелёный акцент в цвет сайта */
.cc-banner .cc-button[data-cc-action="all"] {
    color: #fff;
    background: #568500;
    border-color: #568500;
}

.cc-banner .cc-button[data-cc-action="all"]:hover {
    background: #456c00;
    border-color: #456c00;
}

.cc-banner .cc-button[data-cc-action="settings"] {
    grid-column: 1 / -1;
    min-height: 28px;
    padding: 4px 8px;

    color: #59624e;
    font-weight: 400;
    text-decoration: underline;
    text-underline-offset: 3px;

    background: transparent;
    border-color: transparent;
}

.cc-banner .cc-button[data-cc-action="settings"]:hover {
    color: #20252b;
    background: #f5f7f1;
}

@media (max-width: 480px) {
    .cc-banner {
        bottom: 10px;
        left: 10px;
        width: calc(100% - 20px);
        max-height: calc(100dvh - 20px);
        padding: 14px;
    }

    .cc-banner h2 {
        font-size: 15px;
    }

    .cc-banner > .cc-actions {
        margin-top: 10px;
    }
}