@use "../theme";

.infoBox {
  padding: theme.spacing(4);
  border-radius: theme.border-radius("xl");
  display: flex;
  flex-flow: row nowrap;
  gap: theme.spacing(1);

  .icon {
    flex: none;
    font-size: theme.spacing(6);
  }

  .body {
    display: flex;
    flex-flow: column nowrap;
    gap: theme.spacing(2);
    padding: 0 theme.spacing(2);

    .header {
      @include theme.text("base", "medium");

      color: theme.color("heading");
      line-height: theme.spacing(6);
    }

    .contents {
      @include theme.text("sm", "normal");

      color: theme.color("paragraph");
      line-height: theme.spacing(6);
    }
  }

  @each $variant in ("neutral", "info", "warning", "error", "data", "success") {
    &[data-variant="#{$variant}"] {
      background-color: theme.color("states", $variant, "background");

      .icon {
        color: theme.color("states", $variant, "normal");
      }
    }
  }
}
