@use "./variables" as *;

.#{$component-prefix}notice-bar {
  position: relative;
  display: flex;
  align-items: center;
  height: $notice-bar-height;
  padding: $notice-bar-padding;
  font-size: $notice-bar-font-size;
  line-height: $notice-bar-line-height;
  color: $notice-bar-color;
  background: $notice-bar-background-color;

  &__icon,
  &__action {
    min-width: $notice-bar-icon-min-width;
    font-size: $notice-bar-icon-size;
  }

  &__action {
    text-align: right;
    cursor: pointer;
  }

  &__wrap {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    height: 100%;
    overflow: hidden;
  }

  &__content {
    position: absolute;
    white-space: nowrap;
    transition-timing-function: linear;

    &.#{$component-prefix}ellipsis {
      max-width: 100%;
    }
  }

  &--wordwrap {
    height: auto;
    padding: $notice-bar-wordwrap-padding;

    .#{$component-prefix}notice-bar {
      &__wrap {
        height: auto;
      }

      &__content {
        position: relative;
        word-wrap: break-word;
        white-space: normal;
      }
    }
  }
}
