Toast style in an Ionic Module

Hello.

I am making an Ionic Module following this tutorial .

In my module I use toasts but I am not being able to apply a style to it (in a normal Ionic App I can do it with no problems).

My code is the following:

imports...

const HTML = `Hello`

const CSS = `
.toast-error > div {
  text-align: center;
  background-color: red;
}
`

@Component({
  selector: 'my-component',
  template: HTML_TEMPLATE,
  styles: [CSS]
})
export class MyComponent{

  public constructor(private toastCtrl: ToastController) { }

  public async myMethod(): Promise<any> {
    this.modal.create(MyModalComponent, {
      "list": list
    }).present().then(() => console.log("done")
      .catch((error) => {
        console.log(error)
        this.toastCtrl.create({
          message: "An error has occurred",
          duration: 4000,
          position: "top",
          cssClass: "toast-error"
        }).present();
      });
  }
}

How can I make it work?

Thanks.