@import '../../_variables.scss';

.smart-follow-agent {
  height: 60vh;
  display: flex;
  flex-direction: column;
  background-color: #fbfbff;

  .agent-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    gap: 8px;
  }

  .chat-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 12px;
    /* default/white */
    background: #fff;
    /* boxShadow */
    box-shadow:
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02);
  }

  .preview-section {
    width: 30%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .smart-follow-agent-preview {
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    background: #fff;
    box-shadow:
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02);

    .preview-header {
      padding: 16px 20px 12px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      .preview-title {
        font-size: 16px;
        font-weight: 600;
        color: rgba(16, 1, 1, 0.88);
      }

      .refresh-btn {
        color: #4161fd;
        font-size: 12px;
      }
    }

    .preview-loading {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .preview-error {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .preview-content {
      flex: 1;
      overflow-y: auto;
      padding: 16px 20px;

      .order-info {
        .info-item {
          margin-bottom: 8px;
          display: flex;
          font-size: 12px;
          line-height: 1.5;

          .label {
            color: #1a1a1a;
            font-weight: 500;
            flex-shrink: 0;
          }
          .value {
            color: #333;
          }
        }
      }

      .divider {
        height: 1px;
        background-color: #e7e8ed;
        margin: 12px 0;
      }

      .health-score {
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        font-size: 14px;

        .label {
          color: #1a1a1a;
        }
        .score {
          font-weight: bold;
          margin: 0 4px;
        }
        .trend {
          font-size: 12px;
          &.up {
            color: #52c41a;
          }
        }
      }

      .status-item {
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        font-size: 12px;
        line-height: 1.6;

        .icon {
          margin-right: 8px;
        }
        .label {
          color: #333;
          flex-shrink: 0;
        }
        .value {
          color: #333;
        }
        .tag-wrapper {
          margin-left: 8px;
        }
      }

      .prediction-note {
        font-size: 12px;
        color: #999;
        padding-left: 24px;
        margin-bottom: 12px;
      }

      .risk-radar-title {
        font-size: 12px;
        color: #333;
        margin-bottom: 12px;
      }

      .risk-table {
        margin-top: 12px;

        .next-table {
          font-size: 12px;

          .next-table-header .next-table-cell {
            background-color: #f4f4f6;
            color: #000;
            font-weight: 500;
            padding: 10px 12px;
          }

          .next-table-body .next-table-cell {
            padding: 10px 12px;
            color: #333;
          }
        }

        .text-warning {
          color: #e19705;
        }
      }
    }
  }
}
