.analytics-consent {
    position: fixed;
    z-index: 10000;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: max(1rem, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    width: min(760px, calc(100% - 2rem));
    margin-inline: auto;
    padding: 1.25rem;
    color: #12333d;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #c9e2e9;
    border-radius: 1rem;
    box-shadow: 0 16px 48px rgba(9, 52, 64, 0.22);
}

.analytics-consent-copy {
    min-width: 0;
}

.analytics-consent h2 {
    margin: 0 0 0.25rem;
    color: #12333d;
    font-size: 1.05rem;
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.analytics-consent p {
    margin: 0;
    color: #526e77;
    font-size: 0.9rem;
    line-height: 1.5;
}

.analytics-consent a {
    color: #006b85;
    font-weight: 700;
    text-underline-offset: 0.15em;
}

.analytics-consent-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.75rem;
}

.analytics-consent-button,
.analytics-preferences-button {
    min-height: 44px;
    padding: 0.75rem 1rem;
    border: 2px solid #0786a5;
    border-radius: 0.75rem;
    font: inherit;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
}

.analytics-consent-button-primary {
    color: #fff;
    background: #0786a5;
}

.analytics-consent-button-secondary,
.analytics-preferences-button {
    color: #006b85;
    background: #fff;
}

.analytics-consent-button:hover,
.analytics-preferences-button:hover {
    border-color: #045c72;
}

.analytics-consent-button-primary:hover {
    background: #045c72;
}

.analytics-consent :focus-visible,
.analytics-preferences-button:focus-visible {
    outline: 3px solid #f2b863;
    outline-offset: 3px;
}

@media (max-width: 680px) {
    .analytics-consent {
        align-items: stretch;
        flex-direction: column;
        gap: 1rem;
    }

    .analytics-consent-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 420px) {
    .analytics-consent-actions {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .analytics-consent,
    .analytics-consent * {
        scroll-behavior: auto;
    }
}

@media (prefers-color-scheme: dark) {
    .analytics-consent {
        border-color: #577681;
        background: rgba(15, 42, 51, 0.98);
        color: #eaf7fa;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.46);
    }

    .analytics-consent h2 {
        color: #eaf7fa;
    }

    .analytics-consent p {
        color: #afc7ce;
    }

    .analytics-consent a,
    .analytics-consent-button-secondary,
    .analytics-preferences-button {
        color: #9ce8f3;
    }

    .analytics-consent-button,
    .analytics-preferences-button {
        border-color: #6fd7ea;
    }

    .analytics-consent-button-primary {
        background: #6fd7ea;
        color: #062e3b;
    }

    .analytics-consent-button-secondary,
    .analytics-preferences-button {
        background: #163b46;
    }

    .analytics-consent-button:hover,
    .analytics-preferences-button:hover {
        border-color: #91e1ef;
    }

    .analytics-consent-button-primary:hover {
        background: #91e1ef;
    }
}
