.magic-cookie {
    position: fixed;
    right: 50%;
    bottom: 24px;
    z-index: 300;
    box-sizing: border-box;
    width: min(940px, calc(100vw - 32px));
    max-width: 940px;
    padding: 20px 24px;
    color: #121b21;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(18, 27, 33, 0.1);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(18, 27, 33, 0.16);
    transform: translateX(50%);
    backdrop-filter: blur(10px);
}

.magic-cookie_left {
    left: auto;
    right: 50%;
}

.magic-cookie__close {
    position: absolute;
    right: 12px;
    top: 12px;
    display: flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(18, 27, 33, 0.48);
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.magic-cookie__close:hover {
    color: #121b21;
    background: rgba(18, 27, 33, 0.06);
}

.magic-cookie__close:before,
.magic-cookie__close:after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    display: block;
    width: 11px;
    height: 1.5px;
    background-color: currentColor;
    border-radius: 999px;
}

.magic-cookie__close:before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.magic-cookie__close:after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.magic-cookie__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-right: 24px;
}

.magic-cookie__text {
    max-width: 680px;
    margin: 0;
    color: #121b21;
    font: 400 16px/1.45 Arial, Helvetica, sans-serif;
}

.magic-cookie__content a,
.magic-cookie__link {
    color: #393285;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.magic-cookie__content a:hover,
.magic-cookie__link:hover {
    color: #008cd1;
}

.magic-cookie__button.button {
    --button-bg-color: #40ade3;
    --button-bg-color-hover: #008cd1;
    --button-border-color: #40ade3;
    --button-border-color-hover: #008cd1;
    --button-text-color: #ffffff;
    --button-text-color-hover: #ffffff;
    --button-icon-color: #ffffff;
    --button-icon-color-hover: #ffffff;
    --button-radius: 8px;
    flex: 0 0 auto;
    min-width: 132px;
    min-height: 48px;
}

.magic-cookie__button.button:before {
    background-color: #40ade3;
    border-color: #40ade3;
    opacity: 1;
}

.magic-cookie__button.button:hover:before {
    background-color: #008cd1;
    border-color: #008cd1;
}

.magic-cookie__button .button__text,
.magic-cookie__button .text {
    color: #ffffff;
    font: 700 16px/1 Arial, Helvetica, sans-serif;
}

@media screen and (max-width: 767px) {
    .magic-cookie {
        bottom: 16px;
        width: min(520px, calc(100vw - 24px));
        padding: 20px;
    }

    .magic-cookie__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding-right: 18px;
    }

    .magic-cookie__text {
        max-width: none;
        font-size: 15px;
    }

    .magic-cookie__button.button {
        width: 100%;
        min-width: 0;
    }
}

@media screen and (max-width: 430px) {
    .magic-cookie {
        right: 0;
        bottom: 0;
        width: 100vw;
        max-width: none;
        padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 12px 12px 0 0;
        transform: none;
    }

    .magic-cookie_left {
        right: 0;
    }
}
