// 工单详情样式
.ticket-detail {
  min-height: 100vh;
  background: #f5f5f5;
  padding-bottom: calc(160px + env(safe-area-inset-bottom));
}

.loading, .empty {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 400px;
  color: #999;
  font-size: 28px;
}

// 工单信息
.ticket-info {
  background: #fff;
  padding: 32px;
  margin-bottom: 16px;
  
  .info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    
    .ticket-no {
      font-size: 24px;
      color: #999;
    }
    
    .status-tag {
      padding: 8px 20px;
      border-radius: 20px;
      font-size: 24px;
    }
  }
  
  .ticket-title {
    font-size: 36px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: block;
    margin-bottom: 20px;
  }
  
  .info-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    
    .priority-badge {
      font-size: 24px;
      font-weight: 600;
      margin-right: 24px;
    }
    
    .type-text, .time-text {
      font-size: 24px;
      color: #999;
      margin-right: 24px;
    }
  }
}

// 内容区域
.content-section, .replies-section, .solution-section {
  background: #fff;
  padding: 32px;
  margin-bottom: 16px;
}

.section-label {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin-bottom: 24px;
}

// 用户消息
.content-body {
  .user-message {
    display: flex;
    
    .user-avatar {
      width: 80px;
      height: 80px;
      border-radius: 50%;
      margin-right: 20px;
      flex-shrink: 0;
    }
    
    .message-content {
      flex: 1;
      
      .message-header {
        margin-bottom: 12px;
        
        .user-name {
          font-size: 28px;
          font-weight: 600;
          color: #333;
        }
      }
      
      .message-body {
        background: #f5f5f5;
        padding: 24px;
        border-radius: 20px;
        border-top-left-radius: 8px;
        
        .message-text {
          font-size: 28px;
          color: #333;
          line-height: 1.6;
          white-space: pre-wrap;
        }
      }
    }
  }
}

// 回复列表
.replies-list {
  .reply-item {
    display: flex;
    margin-bottom: 32px;
    
    &:last-child { margin-bottom: 0; }
    
    &.support {
      flex-direction: row-reverse;
      
      .reply-content {
        align-items: flex-end;
        
        .reply-body {
          background: #e6f0ff;
          border-radius: 20px;
          border-top-right-radius: 8px;
        }
      }
      
      .reply-header {
        flex-direction: row-reverse;
        
        .reply-name {
          display: flex;
          align-items: center;
        }
      }
    }
    
    .reply-avatar {
      width: 72px;
      height: 72px;
      border-radius: 50%;
      margin-right: 16px;
      flex-shrink: 0;
    }
    
    .reply-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      max-width: calc(100% - 200px);
      
      .reply-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 12px;
        
        .reply-name {
          font-size: 28px;
          font-weight: 600;
          color: #333;
          
          .support-tag {
            margin-left: 8px;
            padding: 4px 12px;
            background: #007aff;
            color: #fff;
            font-size: 20px;
            border-radius: 8px;
            font-weight: normal;
          }
        }
        
        .reply-time {
          font-size: 22px;
          color: #999;
        }
      }
      
      .reply-body {
        background: #f5f5f5;
        padding: 20px;
        border-radius: 20px;
        border-top-left-radius: 8px;
        
        .reply-text {
          font-size: 28px;
          color: #333;
          line-height: 1.5;
        }
      }
    }
  }
}

// 解决方案
.solution-content {
  background: #f0fff0;
  padding: 24px;
  border-radius: 16px;
  border-left: 8px solid #34c759;
  
  Text {
    font-size: 28px;
    color: #333;
    line-height: 1.6;
  }
}

// 回复输入
.reply-input {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding: 20px 24px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #eee;
  
  .input-field {
    flex: 1;
    height: 80px;
    padding: 0 24px;
    background: #f5f5f5;
    border-radius: 40px;
    font-size: 28px;
  }
  
  .send-btn {
    margin-left: 20px;
    padding: 0 36px;
    height: 80px;
    line-height: 80px;
    background: #007aff;
    color: #fff;
    font-size: 28px;
    border-radius: 40px;
    
    &::after { border: none; }
  }
}
