.kcc,
.kcc * {
    box-sizing: border-box;
}

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

.kcc {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 1100000;
    width: min(450px, calc(100vw - 36px));
    color: #0a1020;
    font-family: Inter, Arial, Helvetica, sans-serif;
    pointer-events: none;
    transform: translate3d(calc(100% + 44px), 0, 0);
    opacity: 0;
    visibility: hidden;
    transition: transform .52s cubic-bezier(.22, 1, .36, 1), opacity .22s ease, visibility 0s linear .52s;
}

.kcc.is-visible {
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.kcc.is-leaving {
    pointer-events: none;
    transform: translate3d(calc(100% + 44px), 0, 0);
    opacity: 0;
}

.kcc__card {
    position: relative;
    overflow: hidden;
    padding: 24px 24px 20px;
    border: 1px solid rgba(10, 16, 32, .08);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 54px rgba(2, 13, 30, .26);
}

.kcc__close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #0a1020;
    cursor: pointer;
}

.kcc__close:hover,
.kcc__close:focus-visible {
    background: #f1f4f8;
}

.kcc__close span::before,
.kcc__close span::after {
    content: "";
    position: absolute;
    top: 16px;
    left: 9px;
    width: 17px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.kcc__close span::before {
    transform: rotate(45deg);
}

.kcc__close span::after {
    transform: rotate(-45deg);
}

.kcc__intro {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding-right: 29px;
}

.kcc__icon {
    display: block;
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.kcc__copy h2,
.kcc__preferences h2 {
    margin: 0;
    color: #0a1020;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.015em;
}

.kcc__copy p,
.kcc__preferences-head p {
    margin: 8px 0 0;
    color: #3f4858;
    font-size: 13px;
    line-height: 1.55;
}

.kcc__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 20px;
}

.kcc__button {
    min-height: 48px;
    padding: 11px 16px;
    border: 1px solid #d9dee7;
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.kcc__button:hover {
    transform: translateY(-1px);
}

.kcc__button:focus-visible,
.kcc__close:focus-visible,
.kcc__links a:focus-visible,
.kcc__preference-row:has(input:focus-visible) {
    outline: 3px solid rgba(255, 84, 9, .28);
    outline-offset: 2px;
}

.kcc__button--primary {
    border-color: #ff4f08;
    background: linear-gradient(135deg, #ff6209 0%, #fa3d05 100%);
    color: #fff;
    box-shadow: 0 8px 18px rgba(250, 61, 5, .18);
}

.kcc__button--secondary {
    background: #fff;
    color: #0a1020;
}

.kcc__links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    color: #151d2c;
    font-size: 12px;
    font-weight: 700;
}

.kcc__links a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.kcc__preferences-head {
    padding-right: 30px;
}

.kcc__preference-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 13px;
    padding: 12px 13px;
    border: 1px solid #e2e6ed;
    border-radius: 10px;
    background: #fafbfc;
}

label.kcc__preference-row {
    cursor: pointer;
}

.kcc__preference-row strong,
.kcc__preference-row small {
    display: block;
}

.kcc__preference-row strong {
    font-size: 13px;
    line-height: 1.35;
}

.kcc__preference-row small {
    margin-top: 2px;
    color: #5f6876;
    font-size: 11px;
    line-height: 1.35;
}

.kcc__always {
    flex: 0 0 auto;
    color: #18794e;
    font-size: 11px;
    font-weight: 800;
}

.kcc__preference-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.kcc__toggle {
    position: relative;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    border-radius: 99px;
    background: #c7ced8;
    transition: background-color .2s ease;
}

.kcc__toggle::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 5px rgba(10, 16, 32, .24);
    transition: transform .2s ease;
}

.kcc__preference-row input:checked + .kcc__toggle {
    background: #ff4f08;
}

.kcc__preference-row input:checked + .kcc__toggle::after {
    transform: translateX(18px);
}

.kcc__actions--preferences {
    margin-top: 14px;
}

.kcc__audit-note {
    margin: 12px 2px 0;
    color: #667080;
    font-size: 10px;
    line-height: 1.45;
}

.site-footer__menu .kcc-footer-settings {
    cursor: pointer;
}

@media (max-width: 600px) {
    .kcc {
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: calc(100vw - 24px);
    }

    .kcc__card {
        max-height: calc(100vh - 24px - env(safe-area-inset-bottom));
        overflow-y: auto;
        padding: 20px 18px 17px;
        border-radius: 16px;
    }

    .kcc__close {
        top: 10px;
        right: 10px;
    }

    .kcc__intro {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 11px;
        padding-right: 24px;
    }

    .kcc__icon {
        width: 50px;
        height: 50px;
    }

    .kcc__copy h2,
    .kcc__preferences h2 {
        font-size: 16px;
    }

    .kcc__copy p,
    .kcc__preferences-head p {
        font-size: 12px;
        line-height: 1.45;
    }

    .kcc__actions {
        gap: 10px;
        margin-top: 16px;
    }

    .kcc__button {
        min-height: 44px;
        padding: 9px 12px;
        font-size: 13px;
    }

    .kcc__links {
        gap: 10px;
        margin-top: 14px;
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .kcc__actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kcc,
    .kcc__button,
    .kcc__toggle,
    .kcc__toggle::after {
        transition-duration: .01ms !important;
    }
}
