.mx-cookie {
    position: fixed;
    inset: auto 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 9999;
    display: flex;
    justify-content: center;
    pointer-events: none;
    transform: translateY(calc(100% + 1.5rem));
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.mx-cookie.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.mx-cookie__dialog {
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.15rem 1.35rem;
    width: min(100%, 56rem);
    padding: 1.15rem 1.25rem;
    border-radius: 1.15rem;
    background:
        linear-gradient(145deg, rgba(18, 22, 36, 0.97), rgba(10, 14, 26, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(253, 120, 0, 0.08) inset,
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.mx-cookie__dialog::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(253, 120, 0, 0.35), rgba(255, 255, 255, 0.06), rgba(253, 120, 0, 0.12));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
}

.mx-cookie__dialog {
    position: relative;
}

.mx-cookie__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.95rem;
    color: #ffb366;
    background: linear-gradient(145deg, rgba(253, 120, 0, 0.18), rgba(253, 120, 0, 0.06));
    border: 1px solid rgba(253, 120, 0, 0.22);
    box-shadow: 0 10px 24px rgba(253, 120, 0, 0.12);
    flex-shrink: 0;
}

.mx-cookie__body {
    min-width: 0;
}

.mx-cookie__eyebrow {
    margin: 0 0 0.3rem;
    color: #ffb366;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.mx-cookie__title {
    margin: 0 0 0.4rem;
    color: #fff;
    font-family: var(--mx-font-heading, 'Jost', sans-serif);
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.mx-cookie__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.84rem;
    line-height: 1.6;
    max-width: 42rem;
}

.mx-cookie__text a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(253, 120, 0, 0.55);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.mx-cookie__text a:hover {
    color: #ffb366;
    border-color: #ffb366;
}

.mx-cookie__actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.55rem;
}

.mx-cookie__btn {
    border: 0;
    border-radius: 999px;
    padding: 0.78rem 1.2rem;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.mx-cookie__btn:focus-visible {
    outline: 2px solid #ffb366;
    outline-offset: 2px;
}

.mx-cookie__btn--primary {
    background: linear-gradient(135deg, #fd7800 0%, #e56a00 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(253, 120, 0, 0.28);
}

.mx-cookie__btn--primary:hover {
    box-shadow: 0 14px 28px rgba(253, 120, 0, 0.36);
}

.mx-cookie__btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.mx-cookie__btn--ghost:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 767px) {
    .mx-cookie {
        inset: auto 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    }

    .mx-cookie__dialog {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            'icon body'
            'actions actions';
        gap: 0.9rem 0.85rem;
        padding: 1rem;
        border-radius: 1rem;
    }

    .mx-cookie__icon {
        grid-area: icon;
        width: 2.65rem;
        height: 2.65rem;
    }

    .mx-cookie__body {
        grid-area: body;
    }

    .mx-cookie__actions {
        grid-area: actions;
        width: 100%;
    }

    .mx-cookie__btn {
        flex: 1 1 0;
        text-align: center;
        padding: 0.82rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mx-cookie,
    .mx-cookie__btn {
        transition: none;
    }
}
