.metrix-consent {
    position: fixed;
    z-index: 2147483000;
    left: max(1rem, env(safe-area-inset-left));
    bottom: max(1rem, env(safe-area-inset-bottom));
    display: flex;
    width: min(700px, calc(100vw - 2rem));
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem 1.1rem;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    font: inherit;
    animation: metrix-consent-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.theme-dark .metrix-consent,
body.dark-mode .metrix-consent {
    color: #f8fafc;
    background: rgba(10, 15, 30, 0.94);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 22px 65px rgba(0, 0, 0, 0.42);
}

.metrix-consent__copy {
    min-width: 0;
}

.metrix-consent__copy strong {
    display: block;
    margin-bottom: 0.2rem;
    color: inherit;
    font-size: 0.98rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.metrix-consent__copy p {
    margin: 0;
    color: #475569;
    font-size: 0.84rem;
    line-height: 1.55;
}

.theme-dark .metrix-consent__copy p,
body.dark-mode .metrix-consent__copy p {
    color: #cbd5e1;
}

.metrix-consent__copy a {
    color: #2563eb;
    font-weight: 700;
    text-underline-offset: 3px;
}

.theme-dark .metrix-consent__copy a,
body.dark-mode .metrix-consent__copy a {
    color: #60a5fa;
}

.metrix-consent__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.55rem;
}

.metrix-consent__button {
    min-height: 44px;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 750;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.metrix-consent__button--primary {
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}

.metrix-consent__button--secondary {
    color: #334155;
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(71, 85, 105, 0.18);
}

.theme-dark .metrix-consent__button--secondary,
body.dark-mode .metrix-consent__button--secondary {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}

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

.metrix-consent__button--primary:hover {
    box-shadow: 0 11px 28px rgba(37, 99, 235, 0.34);
}

.metrix-consent__button:focus-visible,
.metrix-consent__copy a:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.42);
    outline-offset: 3px;
}

@keyframes metrix-consent-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .metrix-consent {
        right: max(0.75rem, env(safe-area-inset-right));
        left: max(0.75rem, env(safe-area-inset-left));
        bottom: max(0.75rem, env(safe-area-inset-bottom));
        width: auto;
        align-items: stretch;
        flex-direction: column;
        gap: 0.85rem;
        padding: 0.95rem;
        border-radius: 16px;
    }

    .metrix-consent__actions {
        width: 100%;
    }

    .metrix-consent__button {
        flex: 1 1 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .metrix-consent {
        animation: none;
    }

    .metrix-consent__button {
        transition: none;
    }
}
