.cookie-box {
    display: none;
    position: fixed;
    bottom: 15px;
    left: 15px;
    max-width: 336px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 20;
    border-radius: 20px;
    -webkit-border-radius: 20px;
    -moz-border-radius: 20px;
    -ms-border-radius: 20px;
    -o-border-radius: 20px;
    border: 1px solid rgba(13, 103, 199, 0.08);
    box-shadow: 0 10px 28px rgba(7, 31, 68, 0.08);
    overflow: hidden;
    transform-origin: bottom left;
    animation: cookieAccordionOpen 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
    will-change: transform, opacity, clip-path;
}

.cookie-box.is-closing {
    pointer-events: none;
    animation: cookieAccordionClose 0.48s cubic-bezier(0.55, 0, 0.45, 1) both;
}

.cookie-top {
    margin-bottom: 20px;
}

.cookie-text {
    color: var(--color-text-soft);
    font-family: var(--regular);
    font-size: 13px;
    line-height: 1.45;
}

.cookie-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 22;
}

.cookie-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid rgba(13, 103, 199, 0.14);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-accent-strong);
    transition: 0.4s;
    -webkit-transition: 0.4s;
    -moz-transition: 0.4s;
    -ms-transition: 0.4s;
    -o-transition: 0.4s;
    border-radius: 15px;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    -ms-border-radius: 15px;
    -o-border-radius: 15px;
    background: rgba(255, 255, 255, 0.92);
    overflow: hidden;
    isolation: isolate;
}

.cookie-btn-no {
    color: var(--color-accent-strong);
    background: rgba(255, 255, 255, 0.9);
}

.cookie-btn-ok {
    color: #ffffff;
    border-color: rgba(13, 103, 199, 0.08);
    background: transparent;
    box-shadow: var(--shadow-button);
}

.cookie-btn-ok::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--gradient-main);
    background-size: 140% 140%;
    background-position: 0% 50%;
    transition: background-position var(--transition-base);
    z-index: -1;
}

@keyframes cookieAccordionOpen {
    0% {
        opacity: 0;
        transform: translateY(14px) scaleY(0.18);
        clip-path: inset(82% 0 0 0 round 20px);
        -webkit-clip-path: inset(82% 0 0 0 round 20px);
    }

    55% {
        opacity: 1;
        transform: translateY(0) scaleY(1.03);
        clip-path: inset(0 0 0 0 round 20px);
        -webkit-clip-path: inset(0 0 0 0 round 20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scaleY(1);
        clip-path: inset(0 0 0 0 round 20px);
        -webkit-clip-path: inset(0 0 0 0 round 20px);
    }
}

@keyframes cookieAccordionClose {
    0% {
        opacity: 1;
        transform: translateY(0) scaleY(1);
        clip-path: inset(0 0 0 0 round 20px);
        -webkit-clip-path: inset(0 0 0 0 round 20px);
    }

    45% {
        opacity: 0.96;
        transform: translateY(5px) scaleY(0.78);
        clip-path: inset(22% 0 0 0 round 20px);
        -webkit-clip-path: inset(22% 0 0 0 round 20px);
    }

    100% {
        opacity: 0;
        transform: translateY(15px) scaleY(0.18);
        clip-path: inset(82% 0 0 0 round 20px);
        -webkit-clip-path: inset(82% 0 0 0 round 20px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-box,
    .cookie-box.is-closing {
        animation: none;
    }
}

@media (hover: hover) {
    .cookie-btn:hover {
        transform: translateY(-1px);
    }

    .cookie-btn-no:hover {
        border-color: rgba(13, 103, 199, 0.32);
        background: rgba(255, 255, 255, 0.98);
    }

    .cookie-btn-ok:hover {
        box-shadow: var(--shadow-button-strong);
    }

    .cookie-btn-ok:hover::before {
        background-position: 100% 50%;
    }
}

@media (max-width: 500px) {
    .cookie-box {
        right: 15px;
        max-width: none;
    }

    .cookie-btn {
        flex: 1 1 auto;
    }
}

@media (min-width: 1200px) {
    .cookie-box {
        position: fixed;
        bottom: 30px;
        right: 30px;
        left: auto;
        max-width: 500px;
        padding: 20px;
        background-color: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(10px);
        transform-origin: bottom right;
    }

    .cookie-btn {
        min-width: 140px;
    }
}
