@import '../../style/theme/index.scss';

$box-prefix-cls: #{$cui-prefix}-notice-bar;

.#{$box-prefix-cls} {
  display: flex;
  align-items: center;
  width: 100%;
  font-size: 28px;
  line-height: 28px;
  border-radius: 8px;
  border: 1px solid #eee;
  padding: 0 10px;

  &-title {
    padding: 0 8px;
  }

  &-content {
    flex: 1;
    flex-wrap: nowrap;
    overflow: hidden;
    position: relative;
    height: 40px;
  }

  &-noticeInner {
    white-space: nowrap;
    display: inline;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(0, -50%);
    animation-name: move;
    animation-fill-mode: forwards;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-delay: 0.5s;
  }

  @keyframes move {
    from {
      transform: translate(0, -50%);
    }

    to {
      transform: translate(-100%, -50%);
    }
  }
}