@layer components {
    :where(html[data-ds]) .alert {
        --alert-accent: var(--ds-color-text);
        position: relative;
        display: flex;
        flex-direction: column;
        gap: var(--ds-space-1);
        padding-block: var(--ds-space-3);
        padding-inline: calc(var(--ds-space-3) + var(--ds-space-1) + var(--ds-space-3)) var(--ds-space-5);
        border-radius: var(--ds-radius-md);
        background-color: var(--ds-color-surface);
        color: var(--ds-color-text);
    }

    :where(html[data-ds]) .alert::before {
        content: "";
        position: absolute;
        inset-block: var(--ds-space-3);
        inset-inline-start: var(--ds-space-3);
        inline-size: var(--ds-space-1);
        border-radius: var(--ds-radius-pill);
        background-color: var(--alert-accent);
    }

    :where(html[data-ds]) .alert-title {
        font-weight: var(--ds-font-weight-semibold);
    }

    :where(html[data-ds]) .alert-text {
        font-size: var(--ds-text-body-sm-size);
        line-height: var(--ds-text-body-sm-line-height);
    }

    :where(html[data-ds]) .alert-success {
        --alert-accent: var(--ds-color-success);
    }

    :where(html[data-ds]) .alert-warning {
        --alert-accent: var(--ds-color-warning);
    }

    :where(html[data-ds]) .alert-danger {
        --alert-accent: var(--ds-color-danger);
    }
}
