@import '~antd/es/style/themes/default.less';

.ellipsis {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.alarm-log-card {
  .alarm-log-item {
    display: flex;
    margin-bottom: 20px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);

    .alarm-log-title {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 15%;
      padding: 10px;
      overflow: hidden;
      color: @primary-color;
      background-color: #f0f2f3;
      .alarm-log-level {
        position: absolute;
        top: 10px;
        right: -12px;
        display: flex;
        justify-content: center;
        width: 100px;
        padding: 2px 0;
        color: white;
        background-color: red;
        transform: skewX(45deg);
        .alarm-log-text {
          transform: skewX(-45deg);
        }
      }
      .alarm-log-title-text {
        margin: 0 10px;
        .ellipsis();
      }
    }
    .alarm-log-content {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 87%;
      padding: 20px;
      background: url('/images/alarm/background.png') no-repeat;
      background-size: 100% 100%;

      .alarm-log-image {
        display: flex;
        align-items: center;

        .alarm-type {
          max-width: 120px;
          padding-right: 50px;
          border-right: 1px solid rgba(0, 0, 0, 0.09);
          .name {
            color: #000;
            font-size: 18px;
          }

          .text {
            margin-top: 8px;
            color: #666;
            font-size: 14px;
            .ellipsis();
          }
        }
        .alarm-log-right {
          display: flex;
          padding-left: 40px;
          .alarm-log-time {
            max-width: 165px;
            margin: 0 10px;
            .log-title {
              margin-top: 8px;
              color: #666;
              font-size: 12px;
            }

            .context {
              margin-top: 8px;
              color: rgba(#000, 0.85);
              font-size: 14px;
              .ellipsis();
            }
          }
        }
      }

      .alarm-log-actions {
        .alarm-log-action {
          display: flex;
          justify-content: center;
          width: 72px;
          height: 72px;
          background-color: #fff;
          border: 1px solid @primary-color;

          .btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 72px;
            height: 72px;
            .icon {
              margin-bottom: 5px;
              color: @primary-color;
              font-size: 25px;
            }

            div {
              color: @primary-color;
              font-size: 12px;
            }
          }
        }
        .alarm-log-action:hover {
          background-color: @primary-color;
          .icon,
          div {
            color: #fff;
          }
        }
      }
    }
  }
}
